Opened 11 years ago

Closed 11 years ago

#38175 closed defect (invalid)

gimp2 @2.8.2 - "Unable to open port"

Reported by: max.ebbinghaus@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), dbevans (David B. Evans)
Port: gimp2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When trying to upgrade gimp2, I got this message:

Error: Unable to open port: can't set "compiler.blacklist": gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
child process exited abnormally

The message repeats every time I try to clean or upgrade gimp2. When upgrading or installing another port, I see that there are broken files and a broken port (gimp2), but MacPorts fails to rebuild gimp2 correctly.

I would be very happy to get some advice on how to avoid this compiler.blacklist problem. Thanks.

Change History (7)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… devans@… added
Description: modified (diff)
Keywords: gimp2 compiler.blacklist removed

The gimp2 portfile includes this line:

compiler.blacklist-append {gcc-4.2 >= 5646}

This means that MacPorts will check if the program gcc-4.2 exists. If so, it will run "gcc -v" and examine its output. If the build number mentioned in the output is less than 5646 then gcc-4.2 will be blacklisted (i.e. not allowed to be used).

In your case, MacPorts apparently determined that gcc-4.2 does exist, but running it caused it to crash, because /usr/bin/i686-apple-darwin11-gcc-4.2.1 doesn't exist. This points to a broken Xcode command line tools installation.

What version of OS X and Xcode do you have? If Lion or later, please upgrade to Xcode 4.6, then visit the Xcode application's Preferences window, click Downloads, and ensure the command line tools are installed and up to date. Hopefully that's all that's needed. Xcode 4.3 and later aren't supposed to contain gcc-4.2 anymore, so if the problem persists and gcc-4.2 is still on your system after installing the latest Xcode correctly, gcc-4.2 will have to be removed manually.

comment:2 Changed 11 years ago by max.ebbinghaus@…

Thanks for the reply. My machine is running Mountain Lion and Xcode is version 4.6. The command line tools are also up to date.

So, I guess, I will need to remove gcc-4.2 manually. Since I have no idea how to do that in a good and clean way, I would be grateful for any advice. Thanks.

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

I was hoping you weren't going to ask. :) You can solve the immediate problem by just removing the single file /usr/bin/gcc-4.2 (and /usr/bin/gcc-4.0 too if it exists). There are probably other parts of gcc still on your system, but they shouldn't cause any trouble as long as the main program is gone.

comment:4 Changed 11 years ago by max.ebbinghaus@…

That did it for me. Everything upgraded now without any problem. Therefore, the ticket can be closed. Thank you very much for your help.

comment:5 Changed 11 years ago by mf2k (Frank Schima)

Did you have an old version of Xcode - such as version 3.2.6 - in the /Developer directory? If so, you should run the uninstall script for it:

From memory:

sudo /Developer/Library/uninstall-devtools --mode=all

comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

There's probably some overlap between Xcode 3.2.6's files and 4.6's, so running the 3.2.6 uninstaller might remove still-needed files, so after doing so, reinstall the 4.6 command line tools. Not sure if you can do that from the Preferences window or if you have to download the standalone installer from the ADC website.

comment:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.