Debug symbols stripped from qt4-mac on library linking

Kieran Simpson kierans777 at gmail.com
Fri Oct 14 02:37:55 PDT 2011


I noticed when debugging a segfault, even though my binary was linked to 
the Qt_debug libraries no line numbers or other symbols were available. 
  My investigation found that no -g flags were passed to the 
Makefile.Debug LFLAGS, thus when the shared library was built the 
symbols disappeared.

I added the flags (-g -gdwarf-2 like what was in CXXFLAGS) and rebuilt 
Qt and retried my gdb session.  I got symbols, line numbers, code 
listings, etc.

Given that the Makefiles are generated from the qmake project files, is 
the bug in the way that they are generated or is this an upstream 
problem with the Qt release?

The port was qt4-mac @4.7.4_0+debug+quartz

Cheers,


More information about the macports-users mailing list