jpeg +universal fails to build (partially solved)

Ryan Schmidt ryandesign at macports.org
Fri Oct 26 14:56:51 PDT 2007


On Oct 26, 2007, at 08:59, Gianluca Toso wrote:

> Gianluca Toso ha scritto:
>
>> I have this problem[*], it seems almost the same reported here:
>> http://trac.macosforge.org/projects/macports/ticket/12320
>> There is a solution?
>> libjpeg.dylib is compiled only for ppc.
>> The libtool and gcc -dynamiclib lines that compile libjpeg.dylib  
>> don't contain -arch options.
>> But I don't find where in Makefile or other file is the problem.
>
> After some try:
> 1) configure without --enable-shared --enable-static: it compile fine.
> 2) Change in Makefile at about line 171:
> $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
> $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libjpeg.la $(LIBOBJECTS) \
> or manually launch libtool line with --arch options:
> it doesn't work, gcc -dynamiclib always without -arch.
>
> It may be a libtool or ltmain.sh or ltconfig problem,
> I don't know...
>
> Finally I simply did:
>
> cd /opt/local/var/macports/build/ 
> _opt_local_var_macports_sources_rsync.macports.org_release_ports_graph 
> ics_jpeg/work/jpeg-6b
> sudo gcc -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 -isysroot / 
> Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
> sudo make
> cd
> sudo port -vd install jpeg +universal
>
> Now I have jpeg universal binary installed and I hope
> this can help someone to don't wasting time.
> But if you need gd2 universal binary, do not expect that macports  
> facilitate your life :-(
> Now I hope to don't find more problems now that I lack
> Only libpng and gd2.
>
>
> super:~ administrator$ port installed
> The following ports are currently installed:
>   dd_rescue @1.10_0 (active)
>   expat @2.0.1_0+universal (active)
>   fontconfig @2.4.2_1+macosx+universal (active)
>   freetype @2.3.5_0+universal (active)
>   jpeg @6b_2+universal (active)
>   libiconv @1.11_6+darwin_8+universal (active)
>   libpcap @0.9.5_1+universal (active)
>   openssl @0.9.8g_0+darwin_8+universal (active)
>   zlib @1.2.3_1+universal (active)
> super:~ administrator$ file /opt/local/lib/libjpeg.*
> /opt/local/lib/libjpeg.62.0.0.dylib: Mach-O fat file with 2  
> architectures
> /opt/local/lib/libjpeg.62.0.0.dylib (for architecture i386):     
> Mach-O dynamically linked shared library i386
> /opt/local/lib/libjpeg.62.0.0.dylib (for architecture ppc):      
> Mach-O dynamically linked shared library ppc
> /opt/local/lib/libjpeg.62.dylib:     symbolic link to `libjpeg. 
> 62.0.0.dylib'
> /opt/local/lib/libjpeg.a:            Mach-O fat file with 2  
> architectures
> /opt/local/lib/libjpeg.a (for architecture i386):       current ar  
> archive random library
> /opt/local/lib/libjpeg.a (for architecture ppc):        current ar  
> archive
> /opt/local/lib/libjpeg.dylib:        symbolic link to `libjpeg. 
> 62.0.0.dylib'
> /opt/local/lib/libjpeg.la:           ASCII English text
> super:~ administrator$

There are two existing bugs on the failure of jpeg's +universal variant.

http://trac.macosforge.org/projects/macports/ticket/12320

http://trac.macosforge.org/projects/macports/ticket/12504

I have cross-referenced those bugs with your suggestions in this  
mailing list thread, and added your email address to the bugs' Cc  
lists so you will be informed of any progress resolving those bugs.

If you can develop your solution into a patch that can be applied to  
the jpeg portfile, that would be wonderful.



More information about the macports-users mailing list