Opened 15 years ago

Closed 15 years ago

#21476 closed defect (fixed)

jbigkit 2.0 Doesn't build universal

Reported by: eborisch@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: jbigkit universal leopard Cc:
Port: jbigkit

Description

Here's the build output on a system where it should be building i386 and x86_64: (run on 10.5.8 build host)

MacPro:~$ sudo port -v build jbigkit +universal
--->  Computing dependencies for jbigkit.
--->  Fetching jbigkit
--->  Verifying checksum(s) for jbigkit
--->  Checksumming jbigkit-2.0.tar.gz
--->  Extracting jbigkit
--->  Extracting jbigkit-2.0.tar.gz
--->  Applying patches to jbigkit
--->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/jbigkit/files/patch-Makefile
patching file Makefile
--->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/jbigkit/files/patch-libjbig_Makefile_darwin
patching file libjbig/Makefile
--->  Configuring jbigkit
--->  Building jbigkit
(cd libjbig;  make "CC=/usr/bin/gcc-4.0" "CFLAGS=-W -O2 -I../libjbig")
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o jbig.o jbig.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o jbig_ar.o jbig_ar.c
rm -f libjbig.a
ar rc libjbig.a jbig.o jbig_ar.o
ranlib libjbig.a
rm -f libjbig.2.0.dylib
/usr/bin/gcc-4.0 -dynamiclib -install_name /opt/local/lib/libjbig.2.dylib -o libjbig.2.0.dylib jbig.o jbig_ar.o
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o tstcodec.o tstcodec.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o tstcodec tstcodec.o jbig.o jbig_ar.o
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o tstcodec85.o tstcodec85.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o jbig85.o jbig85.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
(cd pbmtools; make "CC=/usr/bin/gcc-4.0" "CFLAGS=-W -O2 -I../libjbig")
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o pbmtojbg.o pbmtojbg.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o jbgtopbm.o jbgtopbm.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o pbmtojbg85.o pbmtojbg85.c
make -C ../libjbig libjbig85.a
rm -f libjbig85.a
ar rc libjbig85.a jbig85.o jbig_ar.o
ranlib libjbig85.a
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
/usr/bin/gcc-4.0 -W -O2 -I../libjbig   -c -o jbgtopbm85.o jbgtopbm85.c
/usr/bin/gcc-4.0 -W -O2 -I../libjbig -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
Enter 'make test' in order to start some automatic tests.

Note the lack of -arch i386 -arch x86_64 throughout.

And inspecting the output file:

MacPro:~$ file /<snip>/work/jbigkit/libjbig/libjbig.2.0.dylib 
/<snip>/work/jbigkit/libjbig/libjbig.2.0.dylib: Mach-O dynamically linked shared library i386

I would suggest that these lines need updating in the makefile: (there used to be a foreach ${arch} loop in the portfile... which r51908 removed)

configure {
    reinplace "s|__CC__|${configure.cc}|" ${worksrcpath}/Makefile
    reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/Makefile
}

And this line section in patch-libjbig_Makefile_darwin probably also needs a set of -arch ... flags, as well :

libjbig.__MACPORTS_VERSION__.dylib:  jbig.o jbig_ar.o
       rm -f $@
       $(CC) -dynamiclib -install_name __MACPORTS_PREFIX__/lib/libjbig.__MACPORTS_INSTALL_VERSION__.dylib -o $@ $^

Change History (3)

comment:1 Changed 15 years ago by eborisch@…

Update: Just adding these lines back at the beginning of the configure section seems to fix it:

if { [variant_isset universal] } {
   foreach arch ${universal_archs} {
      configure.cc-append -arch ${arch}
   }
}

comment:2 Changed 15 years ago by eborisch@…

Fixed by [64243] -- please close.

comment:3 Changed 15 years ago by mf2k (Frank Schima)

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