[CMake] No debugging symbols found when using -DCMAKE_BUILD_TYPE=Debug

Chuck Atkins chuck.atkins at kitware.com
Wed Jun 1 16:54:02 EDT 2016


Wow, so this is actually a pretty obscure find.  You've definitely stumbled
across a bug.  It has nothing to do with debug symbols and everything to do
with compiler identification.  It seems that our binary strings parsing is
broken when "[anything]" is in the file path.  Without looking at the code
too deeply, i imagine something is not getting properly escaped somewhere.
As a workaround for now, rename your "[Code]" folder to "Code" and then it
should work (lame I know).  I would ask you to please file a bug report but
new user registration is currently disabled due to some spam issues we were
having.  I'll put it in the queue for issues to address in future releases
but I doubt it will make it into the 3.6 release since it seems to have
been there for a long time without affecting too many users but it should
be able to get fixed in a future release.

Once we open the bug tracker up again then please definitely report the
issue (unless you already have an account then go ahead and report it now).

Thanks for the find!



- Chuck

On Wed, Jun 1, 2016 at 1:59 PM, Esch Nigma <eschnigma at openmailbox.org>
wrote:

> I tried it out just now.
>
>
>
> I pulled and installed a couple 5.x packages from the Arch archive:
>
> https://archive.archlinux.org/packages/l/
>
>
>
> The packages:
>
> gcc-libs-multilib-5.3.0-4-x86_64.pkg.tar.xz
>
> gcc-multilib-5.3.0-4-x86_64.pkg.tar.xz
>
> lib32-gcc-libs-5.3.0-4-x86_64.p
>
>
>
> The downgrade didn't change anything for my Hello World program.
>
>
>
> For the project I'm actively working on, it broke everything, since C++11
> is no longer recognized.
>
> On my system I had to pull the 'multilib' versions, as this is what my
> system seems to be using. If requested, I can try to switch to normal gcc
> to test that out.
>
>
> On Wednesday, June 1, 2016 11:46:40 AM EEST Chuck Atkins wrote:
>
> Interesting.  It seems CMake is having trouble identifying GCC in 6.1.1.
> Do you have a 5.x compiler available?  If so does it work with that?  That
> would help narrow it down to a gcc6 issue vs something about how Manjaro
> packages compilers.
>
>
> - Chuck
>
>
> On Wed, Jun 1, 2016 at 10:49 AM, Esch Nigma <eschnigma at openmailbox.org>
> wrote:
>
> The standard choice is c++
>
>
>
> [eschnigma at manjaro ~]$ c++ --version
> c++ (GCC) 6.1.1 20160501
> Copyright (C) 2016 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> But I've tried enforcing g++ as such:
>
>
>
> -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc
> -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++
>
>
>
> And that has the same results.
>
>
>
> Version:
>
>
>
> [eschnigma at manjaro ~]$ g++ --version
> g++ (GCC) 6.1.1 20160501
> Copyright (C) 2016 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> On Wednesday, June 1, 2016 10:05:21 AM EEST Chuck Atkins wrote:
>
>    [eschnigma at manjaro build]$ cmake .. -DCMAKE_BUILD_TYPE:STRING="Debug"
> -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown
>
>
> This is definitely the reason for no debug symbols.  If the compiler is
> unknown then CMake won't know the right flags to pass to generate debug
> info.  The more important question though is why the compiler can't be
> identified.  What compiler is being used?  Can check with /usr/bin/c++
> --version ?
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160601/26e9e970/attachment.html>


More information about the CMake mailing list