[MacPorts] #31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries ----------------------------------+----------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: qt4 debug | Port: qt4-mac +debug ----------------------------------+----------------------------------------- OSX 10.6.7 XCode 4.0 Build 4A304a The compiler used was /Developer/usr/bin/llvm-g++-4.2 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. This problem was first posted to the mailing list (http://lists.macosforge.org/pipermail/macports- users/2011-October/025840.html) -- Ticket URL: <https://trac.macports.org/ticket/31611> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries ----------------------------------+----------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: qt4 debug | Port: qt4-mac +debug ----------------------------------+----------------------------------------- Comment(by michaelld@…): Can you provide a debug log for the build: {{{ sudo port clean qt4-mac sudo port -d build qt4-mac +debug > ~/Desktop/qt4-mac-build-log.txt 2>&1 bzip2 ~/Desktop/qt4-mac-build-log.txt }}} and then attach the compressed logfile to this ticket. -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries ----------------------------------+----------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: qt4-mac ----------------------------------+----------------------------------------- Changes (by macsforever2000@…): * keywords: qt4 debug => * port: qt4-mac +debug => qt4-mac -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries ----------------------------------+----------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: qt4-mac ----------------------------------+----------------------------------------- Comment(by michaelld@…): It looks from the log file like the debug libraries are being formed correctly -- with "-g -gdwarf-2". Can you double-check this ticket's issue? I did just update qt4-mac so-as to use llvm-g++ instead of clang++ -- so maybe that makes a difference? clang has some known issues already, which is why some ports cannot use it. -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries ----------------------------------+----------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: qt4-mac ----------------------------------+----------------------------------------- Comment(by kierans777@…): Upgrading to qt4-mac @4.7.4_1+debug+quartz fixed the issue. One does have to remember to use the -k option when building the debug libraries however so that the source doesn't disappear at the end of the build. -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries -----------------------------------+---------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: qt4-mac | -----------------------------------+---------------------------------------- Changes (by michaelld@…): * status: new => closed * resolution: => fixed Comment: Yes, you do need to -k(eep) the source when using dwarf2 symbols; see < http://doc.qt.nokia.com/stable/debug.html#debug-symbols-and-size >. IIRC, we can enable debug but disable dwarf2 so that you don't need the source any longer, but that solution takes a -lot- longer to produce, results in -much- larger libraries, and also has issues (being created at all) under 10.4 and 10.5. So, your solution is the preferred way until something better comes along. -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries -----------------------------------+---------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: qt4-mac | -----------------------------------+---------------------------------------- Comment(by macporter90210@…): Replying to [comment:5 kierans777@…]:
Upgrading to qt4-mac @4.7.4_1+debug+quartz fixed the issue.
One does have to remember to use the -k option when building the debug libraries however so that the source doesn't disappear at the end of the build.
I am trying to build an unrelated port for debug symbols and have similar issues. Where do you specify the -k option? -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31611: qt4-mac @4.7.4_0+debug+quartz fails to leave debug symbols in the resulting shared libraries -----------------------------------+---------------------------------------- Reporter: kierans777@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: qt4-mac | -----------------------------------+---------------------------------------- Comment(by michaelld@…): As in "sudo port -k install qt4-mac". Do "man port" for more info. -- Ticket URL: <https://trac.macports.org/ticket/31611#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts