New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #23845 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

getopt +universal doesn't build on 10.4.11 PowerPC

Reported by: drechsel@… Owned by: boeyms@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: universal, tiger Cc: ryandesign@…
Port: getopt

Description (last modified by ryandesign@…) (diff)

DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/work/getopt-1.1.4" && /usr/bin/make -j1 all LIBCGETOPT=0 prefix=/opt/local mandir=/opt/local/share/man CC=/usr/bin/gcc-4.0'
/usr/bin/gcc-4.0 -L/opt/local/lib -lintl -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -o getopt getopt.o gnu/getopt.o gnu/getopt1.o
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: for architecture ppc
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libintl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_libiconv referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
_libiconv_open referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
_libiconv_set_relocation_prefix referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
collect2: ld returned 1 exit status
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libintl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_libiconv referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
_libiconv_open referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
_libiconv_set_relocation_prefix referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cc6Ffi5G.out (No such file or directory)
make: *** [getopt] Error 1
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/work/getopt-1.1.4" && /usr/bin/make -j1 all LIBCGETOPT=0 prefix=/opt/local mandir=/opt/local/share/man CC=/usr/bin/gcc-4.0 " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/work/getopt-1.1.4" && /usr/bin/make -j1 all LIBCGETOPT=0 prefix=/opt/local mandir=/opt/local/share/man CC=/usr/bin/gcc-4.0 " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for getopt): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Could this be the problem:

/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libintl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)

On my machine libiconv.2.dylib is NOT at

/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib

but at

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libiconv.2.dylib

Change History

comment:1 Changed 3 years ago by macsforever2000@…

  • Keywords universal, cross-platform removed
  • Owner changed from macports-tickets@… to boeyms@…

comment:2 Changed 3 years ago by jmr@…

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib is a symlink to /usr/local/lib. It's not supported to have anything installed in /usr/local because it's impossible to stop gcc from looking there.

comment:3 follow-up: ↓ 6 Changed 3 years ago by ryandesign@…

  • Keywords universal, tiger added
  • Cc ryandesign@… added
  • Summary changed from getopt +universal doesnt build on 10.4.11 to getopt +universal doesn't build on 10.4.11

That means: remove /usr/local, clean the port that didn't build, and try again.

But an error message about a missing file in /Developer/SDKs/MacOSX10.4u.sdk/opt/local is unique to building universal binaries on Tiger. The simple workaround for the user is to create the symlink /Developer/SDKs/MacOSX10.4u.sdk/opt pointing to /opt. I recall the real solution for the port maintainer / software developer is to make sure all the necessary link flags are being used; in this case, I presume "-liconv" is not being used but needs to be.

comment:4 Changed 3 years ago by ryandesign@…

  • Description modified (diff)

comment:5 Changed 3 years ago by drechsel@…

sudo ln -s /opt /Developer/SDKs/MacOSX10.4u.sdk/opt

worked for me - thanks!!

comment:6 in reply to: ↑ 3 Changed 3 years ago by ryandesign@…

  • Status changed from new to closed
  • Resolution set to fixed

Replying to ryandesign@…:

I presume "-liconv" is not being used but needs to be.

Fixed in r64828.

comment:7 Changed 3 years ago by ryandesign@…

  • Summary changed from getopt +universal doesn't build on 10.4.11 to getopt +universal doesn't build on 10.4.11 PowerPC
Note: See TracTickets for help on using tickets.