Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install MacPorts gdb; it seems to be poorly supported…

Running "port install" installs it to /opt/local/libexec/gnubin/gdb, but the intent doesn't seem to be to add that to $PATH. The portfile doesn't define any parameters for port select which is typically used to set a MacPorts installation to handle default Unix commands. But it does include these lines:

foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
    ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]

This is buried under an action labeled post-destroot. destroot is a MacPorts command but post-destroot is not. The script is apparently not run by port install or port activate, or if it's failing it's doing so silently.

Is there a better approach than creating the links manually?

share|improve this question
I suggest that you try debugging something with MacPorts gdb first. There is a high probability you won't be able to debug with MacPorts gdb at all. – Paul Oct 18 '12 at 7:53
@Paul Huh, previously when I upgraded by building from source the instructions at worked for the code signing issue, but now it doesn't. Hmmmmm, I'm sure there's a solution for that, though. – Potatoswatter Oct 18 '12 at 8:31
If you find the solution, please share. I hate using outdated gdb 6.3 w/o tui, but wasn't able to make new gdb work. – Paul Oct 18 '12 at 8:34
@Paul Will do. By the way, this question turned out to be a non-issue; I've answered myself below. – Potatoswatter Oct 18 '12 at 8:50

Woops, the binary was already installed as ggdb. Guess I misunderstood the glob command. However, as Paul noted in comments above, it still doesn't actually work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.