[MacPorts] #18841: zlib does not build universal / Tiger-ppc
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib muniversal -----------------------------------+---------------------------------------- On Tiger ppc, zlib doesn't build i386 support for the dylib. Configure spits out: {{{ ---> Configuring zlib for architecture i386 Checking for shared library support... No shared library support; try without defining CC and CFLAGS Building static library libz.a version 1.2.3 with /usr/bin/gcc-4.0 -arch i386. Checking for unistd.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf() Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for errno.h... Yes. Checking for mmap support... Yes. }}} Putting some debugging into the configure script, it's failing due to: {{{ Checking for shared library support... /usr/bin/gcc-4.0 -arch i386 -c -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 ztest5532.c /usr/bin/gcc-4.0 -arch i386 -dynamiclib -install_name ${exec_prefix}/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.3 -o ztest5532.dylib ztest5532.o ld: Undefined symbols: _getchar /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit command failed No shared library support; try without defining CC and CFLAGS }}} The problem is with CC: {{{ ~/src/macports-trunk/dports/archivers/zlib/work/i386 $ sudo ./configure --shared Checking for shared library support... /usr/bin/gcc-4.0 -arch i386 -c -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 ztest6042.c /usr/bin/gcc-4.0 -arch i386 -dynamiclib -install_name ${exec_prefix}/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.3 -o ztest6042.dylib ztest6042.o ld: Undefined symbols: _getchar /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit command failed No shared library support; try without defining CC and CFLAGS Building static library libz.a version 1.2.3 with /usr/bin/gcc-4.0 -arch i386. Checking for unistd.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf() Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for errno.h... Yes. Checking for mmap support... Yes. (01:44:55 Sun Mar 15 2009 jeremy@redxiii Power Macintosh) ~/src/macports-trunk/dports/archivers/zlib/work/i386 $ export CC="/usr/bin/gcc-4.0" (01:45:02 Sun Mar 15 2009 jeremy@redxiii Power Macintosh) ~/src/macports-trunk/dports/archivers/zlib/work/i386 $ sudo ./configure --shared Checking for shared library support... /usr/bin/gcc-4.0 -c -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 ztest6125.c /usr/bin/gcc-4.0 -dynamiclib -install_name ${exec_prefix}/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.3 -o ztest6125.dylib ztest6125.o Building shared library libz.1.2.3.dylib with /usr/bin/gcc-4.0. Checking for unistd.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf() Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for errno.h... Yes. Checking for mmap support... Yes. }}} -- Ticket URL: <http://trac.macports.org/ticket/18841> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib muniversal -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Or actually, it's probably because '-isysroot /Developer/SDKs/MacOSX10.4u.sdk' is missing during linking... -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib muniversal -----------------------------------+---------------------------------------- Changes (by jmr@…): * cc: mcalhoun@… (added) Comment: Given that there wasn't a real reason to start using muniversal here, it should be reverted (unless the portgroup is going to be fixed VERY soon). -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib muniversal -----------------------------------+---------------------------------------- Comment(by ryandesign@…): Well, wait, why is '-isysroot /Developer/SDKs/MacOSX10.4u.sdk' missing diring linking? Could we add the right flags to configure.ldflags to fix this? My Power Mac is not on the network at the moment or I'd test this myself. -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib -----------------------------------+---------------------------------------- Changes (by ryandesign@…): * port: zlib muniversal => zlib -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: muniversal universal | Port: zlib -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): I am not sure this problem has anything to do with the muniversal PortGroup.[[BR]] In portconfigure.tcl, the function configure_get_universal_ldflags only adds the following: {{{ if {${os.arch} == "powerpc"} { set flags "-Wl,-syslibroot,${configure.universal_sysroot} ${flags}" } if {${os.major} == "9"} { set flags "${flags} -mmacosx-version- min=${configure.universal_target}" } } }}} -isysroot only gets added in configure_get_universal_cflags and configure_get_universal_cppflags.[[BR]] muniversal simply duplicates this behavior. isysroot is not well documented, but I though it had to do with looking for include directories.[[BR]] Why should it help with linking?[[BR]] -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Changes (by mcalhoun@…): * status: new => closed * resolution: => fixed Comment: This should be fixed in r50198.[[BR]] "-Wl,-syslibroot,${configure.universal_sysroot} ${flags}" will not be used when linking.[[BR]] Hopefully, this will solve the problem. -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ----------------------------------+----------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Component: ports Version: 1.7.0 | Resolution: fixed Keywords: muniversal universal | Port: zlib ----------------------------------+----------------------------------------- Comment(by Chris.Barker@…): This doesn't appear to have done it for me: (but I don't have permission to re-open) OS-X 10.4.11 PPC macports from SVN today: Revision: 50573 {{{ $ sudo port install zlib +universal Password: ---> Fetching zlib ---> Verifying checksum(s) for zlib ---> Extracting zlib ---> Applying patches to zlib ---> Configuring zlib ---> Configuring zlib for architecture ppc ---> Configuring zlib for architecture i386 ---> Building zlib ---> Building zlib for architecture ppc ---> Building zlib for architecture i386 ---> Staging zlib into destroot ---> Staging zlib into destroot for architecture ppc ---> Staging zlib into destroot for architecture i386 ---> Installing zlib @1.2.3_2+universal ---> Activating zlib @1.2.3_2+universal ---> Cleaning zlib }}} which all looks right, but: {{{ $ file /opt/local/lib/libz.1.2.3.dylib /opt/local/lib/libz.1.2.3.dylib: Mach-O dynamically linked shared library ppc }}} I'm not getting a universal lib. However the static lib is universal: {{{ $ file /opt/local/lib/libz.a /opt/local/lib/libz.a: Mach-O universal binary with 2 architectures /opt/local/lib/libz.a (for architecture ppc): current ar archive /opt/local/lib/libz.a (for architecture i386): current ar archive random library }}} The end result for me is that I can't build libtiff universal: {{{ ... ---> Configuring tiff for architecture i386 Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_graphics_tiff/work/tiff-3.8.2-i386" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with- docdir=/opt/local/share/doc/tiff-3.8.2 --with-jpeg-include- dir=/opt/local/include --with-jpeg-lib-dir=/opt/local/lib --with-zlib- include-dir=/opt/local/include --with-zlib-lib-dir=/opt/local/lib --disable-dependency-tracking --host=i386-apple-darwin8.11.0 --with-apple- opengl-framework " returned error 1 ... checking for inflateEnd in -lz... no configure: error: Zlib library not found at /opt/local/lib }}} -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Changes (by ryandesign@…): * status: closed => reopened * resolution: fixed => -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Comment(by mcalhoun@…): Replying to [comment:8 Chris.Barker@…]:
{{{ $ file /opt/local/lib/libz.1.2.3.dylib /opt/local/lib/libz.1.2.3.dylib: Mach-O dynamically linked shared library ppc }}}
I'm not getting a universal lib. However the static lib is universal:
{{{ $ file /opt/local/lib/libz.a /opt/local/lib/libz.a: Mach-O universal binary with 2 architectures /opt/local/lib/libz.a (for architecture ppc): current ar archive /opt/local/lib/libz.a (for architecture i386): current ar archive random library }}}
At least it is a new error.[[BR]] My initial guess is that the configure script encounters an error when trying to cross-compile the shared library and therefore does not build it for i386. Could you please attach the config.log for i386?[[BR]] Perhaps that will offer some insight. -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Comment(by jmr@…): It doesn't appear to produce a config.log. -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Comment(by ryandesign@…): Right, zlib does not use an autoconf configure script. After configure, the file zconf.h is changed and the file Makefile is created from Makefile.in. I was sure zlib used to build universal on Tiger PPC... :( -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Comment(by toby@…): Try now (as of r52192) -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18841: zlib does not build universal / Tiger-ppc ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: muniversal universal Port: zlib | ------------------------------------+--------------------------------------- Changes (by jmr@…): * status: reopened => closed * resolution: => fixed Comment: Tested on PPC Tiger, confirmed that a universal .dylib is now built. -- Ticket URL: <http://trac.macports.org/ticket/18841#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts