[MacPorts] #34831: eliminate missing symbols from gdb compatible compilers
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40,apple-gcc42,gcc42,gcc43,gcc44,gcc45,gcc46,gcc47,gcc48,clang-2.9,clang-3.0,clang-3.1,clang-3.2,dragonegg-3.0,dragonegg-3.1,dragonegg-3.2,llvm-2.9,llvm-3.0,llvm-3.1,llvm-3.2,llvm-gcc42,g95 -------------------------------------------+-------------------------------- The hundreds of lines of output of missing object files causes much grief and, in some cases, will prevent debugging entirely. The goal of this patch is to completely get rid of all warnings and errors due to missing symbols. The importance of this is high since all compilers are effected and this in turn affects *any* user compiled code. For compilers that are gdb compatible (c, c++, and fortran), the portfile needs to keep the debug symbols. This patch fixes dsymutil being called for apple-gcc4{0,2}, gcc4{2,3,4,5,6,7,8}, {clang,llvm}-{2.9,3.0,3.1}, llvm-gcc42, g95, and dragonegg-3.{0,1,2}. Alternatively, as suggested by Jeremy, each portfile could strip the symbols from the compiler's shared libraries. This could work but I don't know how to implement this method off the top of my head. Attached to this ticket is: 1) patch that calls dsymutil for each port 2) a simple test program 3) the gdb output of (2) -- Ticket URL: <https://trac.macports.org/ticket/34831> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => jeremyhu@… * port: apple-gcc40,apple- gcc42,gcc42,gcc43,gcc44,gcc45,gcc46,gcc47,gcc48,clang-2.9,clang-3.0,clang-3.1,clang-3.2,dragonegg-3.0,dragonegg-3.1,dragonegg-3.2,llvm-2.9,llvm-3.0,llvm-3.1,llvm-3.2 ,llvm-gcc42,g95 => apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by jeremyhu@…): No, using dsymutil is not the answer. E See #34491:
If you want to debug gcc47's runtime bits, then use '-k' to keep those object files around. If you are just concerned about the messages printed by gdb, then perhaps we should just strip those object files.
-- Ticket URL: <https://trac.macports.org/ticket/34831#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by sean.michael.farley@…): Replying to [comment:5 jeremyhu@…]:
See #34491:
If you are just concerned about the messages printed by gdb, then perhaps we should just strip those object files.
Right, but how does one safely do that? -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by jeremyhu@…): See the man page for strip, or use -s if you use install. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by sean.michael.farley@…): This turned out to be easier than I thought it would be. The hardest part was compiling *every* compiler to test. I tested each C and Fortran compiler and all versions worked. There were no warning messages and no hanging when attaching a debugger. Let me know if this version of the patch (strip.patch) works for MacPorts. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by jeremyhu@…): I am going to be gone for 2 weeks, but this looks good to me if someone else wants to commit the strip.patch -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by sean.michael.farley@…): Replying to [comment:9 jeremyhu@…]:
I am going to be gone for 2 weeks, but this looks good to me if someone else wants to commit the strip.patch
Any update for getting strip.patch committed? -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by jeremyhu@…): Yeah, I was on vacation for a month and came back to an inbox 1-month long. You will need to be patient, sorry. I'll get to these issues based on priority, or someone else can certainly commit it if they are willing to test. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Comment(by sean.michael.farley@…): Gotcha. No worries, I was just checking in :-) -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------+-------------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Keywords: | Port: apple-gcc40 apple-gcc42 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-gcc42 g95 -------------------------------------------+-------------------------------- Changes (by jmr@…): * cc: mww@…, erickt@…, mfeiri@…, takeshi@… (added) -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------------+------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Resolution: | Keywords: Port: apple-gcc40 apple-gcc42 gcc42 | gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 | clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 | dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 | llvm-3.1 llvm-3.2 llvm-gcc42 g95 | -------------------------------------------------+------------------------- Changes (by mfeiri@…): * cc: mfeiri@… (removed) -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------------+------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Resolution: | Keywords: Port: apple-gcc40 apple-gcc42 gcc42 | gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 | clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 | dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 | llvm-3.1 llvm-3.2 llvm-gcc42 g95 | -------------------------------------------------+------------------------- Comment (by takeshi@…): Committed the patch for g95 in r101293. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------------+------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Resolution: | Keywords: Port: apple-gcc40 apple-gcc42 gcc42 | gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 | clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 | dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 | llvm-3.1 llvm-3.2 llvm-gcc42 g95 | -------------------------------------------------+------------------------- Comment (by sean@…): Replying to [comment:15 takeshi@…]:
Committed the patch for g95 in r101293.
Thanks! Jeremy, would you have any objection to me rebasing and applying this patches myself? -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------------+------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Resolution: | Keywords: Port: apple-gcc40 apple-gcc42 gcc42 | gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 | clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 | dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 | llvm-3.1 llvm-3.2 llvm-gcc42 g95 | -------------------------------------------------+------------------------- Comment (by jeremyhu@…): I should roll this into the libgcc changes. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:18> MacPorts <http://www.macports.org/> Ports system for OS X
#34831: eliminate missing symbols from gdb compatible compilers -------------------------------------------------+------------------------- Reporter: sean.michael.farley@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.1 Resolution: fixed | Keywords: Port: apple-gcc40 apple-gcc42 gcc42 | gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 clang-2.9 | clang-3.0 clang-3.1 clang-3.2 dragonegg-3.0 | dragonegg-3.1 dragonegg-3.2 llvm-2.9 llvm-3.0 | llvm-3.1 llvm-3.2 llvm-gcc42 g95 | -------------------------------------------------+------------------------- Changes (by jeremyhu@…): * status: new => closed * resolution: => fixed Comment: r109291 should take care of this. -- Ticket URL: <https://trac.macports.org/ticket/34831#comment:19> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts