Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52705 closed defect (invalid)

libpng: configure fails with "C compiler cannot create executables"

Reported by: DGDanforth (Douglas G Danforth) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: libpng

Description (last modified by larryv (Lawrence Velázquez))

I have found two other tickets with the above title but the claim is the problem was fixed. It is not for me. I am running on OS X Lion (can not up grade due to 2006 hardware limitation). Xcode if 4.6.3

Here is the log file for libpng

version:1
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Executing org.macports.main (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.archivefetch (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (libpng)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Tue Oct 25 18:05:48 PDT 2016
:notice:configure --->  Configuring libpng
:debug:configure Using compiler 'Xcode Clang'
:debug:configure Executing org.macports.configure (libpng)
:debug:configure Environment:
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
<_release_tarballs_ports_graphics_libpng/libpng/main.log" [readonly] 76L, 5115C

Attachments (1)

config.log (9.9 KB) - added by DGDanforth (Douglas G Danforth) 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Keywords: install configure removed

This looks like you copied the text out of a Vim window.

Please run sudo port clean libpng, try installing again, and attach the log file.

comment:2 Changed 4 years ago by DGDanforth (Douglas G Danforth)

I don't know how to attach a Mac file. When I use Safari this ticket does not show "Attachments". It does when I use Firefox on Windows but I don't know how to move the log file on the OS X side to the Windows side so I can attach that.

What do you suggest?

Changed 4 years ago by DGDanforth (Douglas G Danforth)

Attachment: config.log added

comment:3 Changed 4 years ago by DGDanforth (Douglas G Danforth)

OK, found how to move file. It should be attached for you. -Doug

comment:4 Changed 4 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to ryandesign
Status: newassigned
Summary: Failed to install libpnglibpng: configure fails with "C compiler cannot create executables"

I meant the main.log that is mentioned prominently in the MacPorts error message, but I guess this might be sufficient.

comment:5 Changed 4 years ago by ken-cunningham-webuse

the first error is

ld: library not found for -lgcc

and that is kind of ominous. That is a basic library for all software to build. Something very odd has gone on, it would appear.

Can you install any software at all?

If nothing installs, I would first consider reinstalling Xcode and the command line tools. And after that, I'd give a very serious look at LibcxxOnOlderSystems before I went another step, as a lot of software you'll want to consider installing on this machine now and in the future will need that.

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

Resolution: invalid
Status: assignedclosed

You said you're running on Lion with Xcode 4.6.3, but the log also shows that you are using the clang-70 compiler, which is the version of clang that came with Xcode 3.2.5 which is not compatible with Lion. Please install the Xcode 4.6.3 version of the command line tools.

Following the instructions at LibcxxOnOlderSystems is drastic and I don't recommend it at this time, unless you need a port that can't be installed without it.

If you're having trouble using this Trac web site on your Mac, try Option-clicking the reload button to clear out cached content. We recently upgraded to a new version of Trac and if you visited our Trac before that, old versions of files might still be cached and causing problems.

comment:7 Changed 4 years ago by DGDanforth (Douglas G Danforth)

I did a clean all (which took forever) and then I downloaded and installed the appropriate command tools for Lion. I an mow running sudo port install wine and it seems to be working! -Doug

comment:8 in reply to:  6 Changed 4 years ago by ken-cunningham-webuse

Following the instructions at LibcxxOnOlderSystems is drastic and I don't recommend it at this time, unless you need a port that can't be installed without it.

Drastic? On Lion, it's a pretty fix modest -- adding three lines to macports.conf.

I suppose at present the main issue is it would mean he'd need to build from source, rather than download the prebuilt binaries. And that would be a PITA. Other than that I've found it pretty transparent. And he's fully rebuilding anyway.

I can't help thinking he'll need to do this very soon anyway (and then rebuild everything again) as stumbling across software that needs it is very common these days (for me). But time will tell.

Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

comment:9 Changed 4 years ago by ryandesign (Ryan Schmidt)

Yes, drastic, because

  1. it is unrelated to the problem the user was experiencing, which was caused by not having the correct version of the command line tools installed; we should not introduce irrelevant information;
  2. the user must uninstall and reinstall all ports;
  3. the user must forever build all ports from source, until we make some changes to base to allow us to distribute these binaries, and then set up the buildbot to do that;
  4. although it may solve some problems, it will most likely eventually cause the user to encounter some build error that is unique to that configuration, which most developers do not test, and will thus take additional time for the developer to solve.

I don't disagree that more and more software requires C++11, but I feel that before we wholesale recommend users use LibcxxOnOlderSystems, we need to improve the user experience of doing so.

Note: See TracTickets for help on using tickets.