Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14394 closed defect (duplicate)

zlib +universal requires -mmacosx-version-min=10.4

Reported by: gui-dos (Guido Soranzio) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: landonf (Landon Fuller), ryandesign (Ryan Carsten Schmidt), afb@…
Port:

Description

When not adding to the zlib's portfile the line

configure.universal_cflags-append -mmacosx-version-min=10.4

the compilation fails reporting the error:

/usr/bin/gcc-4.0 -dynamiclib -install_name /opt/local/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.3 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -arch ppc -arch i386 -o libz.1.2.3.dylib adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccrJTQkz.out (No such file or directory)
make: *** [libz.1.2.3.dylib] Error 1

Change History (6)

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

What version of Mac OS X, MacPorts and Xcode do you have and what kind of processor is in your Mac?

MacPorts trunk already includes -mmacosx-version-min=whatever when running on Leopard. See r33480.

I'm running Mac OS X 10.4.11 with Xcode 3.0 and MacPorts trunk on Intel, but I have never seen this error with previous MacPorts versions either.

comment:2 Changed 16 years ago by gui-dos (Guido Soranzio)

As I reported, I am referring to MacPorts 1.7.0 from trunk.

I am trying to rebuild from scratch all the universal variants on a G4 with Leopard 10.5.2. The other ports are seeing the extended LDFLAGS but the "gcc-4.0 -dynamiclib" of zlib isn't using them and you have to modify the CFLAGS in order to enforce passing "-mmacosx-version-min=10.4" to it.

comment:3 Changed 16 years ago by gui-dos (Guido Soranzio)

Cc: afb@… added

comment:4 Changed 16 years ago by gui-dos (Guido Soranzio)

The same issue happens with jpeg:

/usr/bin/gcc-4.0 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -I/opt/local/include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I. -dynamiclib  -o .libs/libjpeg.62.0.0.dylib  jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo  -lc  -install_name /opt/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccjUnvIf.out (No such file or directory)
make: *** [libjpeg.la] Error 1

Instead of modifying the configure/makefile scripts, we could simply add

configure.universal_cflags-append -mmacosx-version-min=10.4

in the configure_get_universal_cflags proc of portconfigure.tcl, too

comment:5 Changed 16 years ago by afb@…

Resolution: duplicate
Status: newclosed

Dupe, #14399.

comment:6 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.