[MacPorts] #32634: building R with debug symbols
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: R --------------------------------------+------------------------------------- I want to build R with debug symbols so I can more easily debug my C extensions and how they interact with R. I modified the portfile to use apple's gcc and the -g flag. It installed fine, but it seems that the debug symbols aren't found by gdb. 1. What should I do so that when I compile with -g, the symbols can be found? 2. Do I need to use apple's rather than the mp gcc to do this? 3. I think other people might find this useful so it would be nice if the debug variant, after appropriate corrections can be added to the port. I attach the port diff. -- Ticket URL: <https://trac.macports.org/ticket/32634> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: R --------------------------------------+------------------------------------- Comment(by macporter90210@…): The -k option as {{{ port -k install r +apple42debug -gcc44 }}} seems to do it. -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: kjell.konis@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: R --------------------------------------+------------------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => kjell.konis@… * type: request => enhancement Old description:
I want to build R with debug symbols so I can more easily debug my C extensions and how they interact with R. I modified the portfile to use apple's gcc and the -g flag. It installed fine, but it seems that the debug symbols aren't found by gdb.
1. What should I do so that when I compile with -g, the symbols can be found? 2. Do I need to use apple's rather than the mp gcc to do this? 3. I think other people might find this useful so it would be nice if the debug variant, after appropriate corrections can be added to the port.
I attach the port diff.
New description: I want to build R with debug symbols so I can more easily debug my C extensions and how they interact with R. I modified the portfile to use apple's gcc and the -g flag. It installed fine, but it seems that the debug symbols aren't found by gdb. 1. What should I do so that when I compile with -g, the symbols can be found? 2. Do I need to use apple's rather than the mp gcc to do this? 3. I think other people might find this useful so it would be nice if the debug variant, after appropriate corrections can be added to the port. I attach the port diff. -- Comment: The "`-k`" flag means '''k'''eep the build files after installation; I suppose this is necessary for debugging. The port currently forces the use of MacPorts gcc complier; I assume the maintainer has a good reason to do this and that we should not then offer the choice to override that. Would just this work? (Untested) {{{ variant debug {Build with debug symbols} { configure.optflags-append -g } }}} -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: kjell.konis@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: haspatch | Port: R --------------------------------------+------------------------------------- Changes (by ryandesign@…): * keywords: => haspatch -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: kjell.konis@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: haspatch | Port: R --------------------------------------+------------------------------------- Comment(by macporter90210@…): Replying to [comment:3 ryandesign@…]: You mean {{{ variant debug description {Build with debug symbols} { configure.optflags-append -g } }}} Yours gave the error {{{Error: Unable to open port: wrong # args: should be "proc name args body"}}}. Funny how that happens. I am trying to see if this does it. -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols --------------------------------------+------------------------------------- Reporter: macporter90210@… | Owner: kjell.konis@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: haspatch | Port: R --------------------------------------+------------------------------------- Comment(by kjell.konis@…): Maintainer here. I added the suggested variant and bumped the version to 2.14.1. Let me know if that solves your problem. Thanks. -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32634: building R with debug symbols ---------------------------------------+------------------------------------ Reporter: macporter90210@… | Owner: kjell.konis@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: haspatch Port: R | ---------------------------------------+------------------------------------ Changes (by dports@…): * cc: dports@… (added) * status: new => closed * resolution: => fixed Comment: Replying to [comment:5 kjell.konis@…]:
Maintainer here. I added the suggested variant and bumped the version to 2.14.1. Let me know if that solves your problem. Thanks.
Thanks, committed in r88382. -- Ticket URL: <https://trac.macports.org/ticket/32634#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts