jpeg +universal fails to build
Hi, 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. My system: OSX 10.4.10 PPC XCode 2.4.1 last MacPorts The other errors may be the usually ppc problem (ld and syslibroot). *) super:~ administrator$ sudo port -vd install jpeg +universal [...] DEBUG: Environment: CXXFLAGS='-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc' CPPFLAGS='-I/opt/local/include' CFLAGS='-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc' LDFLAGS='-L/opt/local/lib -arch i386 -arch ppc' DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_jpeg/work/jpeg-6b" && ./configure --prefix=/opt/local --enable-shared --enable-static --disable-dependency-tracking' checking for gcc... gcc checking whether the C compiler (gcc -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -L/opt/local/lib -arch i386 -arch ppc) works... yes checking whether the C compiler (gcc -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -L/opt/local/lib -arch i386 -arch ppc) is a cross-compiler... no [...] ./libtool --mode=link gcc -o libjpeg.la 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 \ -rpath /opt/local/lib -no-undefined -version-info 62 rm -fr .libs/libjpeg.la .libs/libjpeg.* .libs/libjpeg.* 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 [...] ./libtool --mode=link gcc -L/opt/local/lib -arch i386 -arch ppc -o cjpeg cjpeg.lo rdppm.lo rdgif.lo rdtarga.lo rdrle.lo rdbmp.lo rdswitch.lo cdjpeg.lo libjpeg.la gcc -L/opt/local/lib -arch i386 -arch ppc -o .libs/cjpeg cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o -L.libs -ljpeg /usr/bin/ld: for architecture i386 /usr/bin/ld: warning .libs/libjpeg.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: ___keymgr_dwarf2_register_sections __cthread_init_routine _atexit _errno _exit _mach_init_routine ___sF _fclose _fopen _fprintf _fwrite _getc _jpeg_CreateCompress _jpeg_default_colorspace _jpeg_destroy_compress _jpeg_finish_compress _jpeg_quality_scaling _jpeg_set_colorspace _jpeg_set_defaults _jpeg_set_quality _jpeg_simple_progression _jpeg_start_compress _jpeg_std_error _jpeg_stdio_dest _jpeg_write_scanlines _sscanf _ungetc _fread __DefaultRuneLocale ___maskrune _jpeg_add_quant_table _memcpy ___tolower collect2: ld returned 1 exit status /usr/bin/ld: for architecture ppc /usr/bin/ld: warning prebinding not disabled because (__PAGEZERO segment (address = 0x0 size = 0x1000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__TEXT segment (address = 0x1000 size = 0x7000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__DATA segment (address = 0x8000 size = 0x1000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__LINKEDIT segment (address = 0x9000 size = 0x2000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib lipo: can't open input file: /var/tmp//ccdJwpvl.out (No such file or directory) make: *** [cjpeg] 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_graphics_jpeg/work/jpeg-6b" && make all " returned error 2 Command output: _getc _jpeg_CreateCompress _jpeg_default_colorspace _jpeg_destroy_compress _jpeg_finish_compress _jpeg_quality_scaling _jpeg_set_colorspace _jpeg_set_defaults _jpeg_set_quality _jpeg_simple_progression _jpeg_start_compress _jpeg_std_error _jpeg_stdio_dest _jpeg_write_scanlines _sscanf _ungetc _fread __DefaultRuneLocale ___maskrune _jpeg_add_quant_table _memcpy ___tolower collect2: ld returned 1 exit status /usr/bin/ld: for architecture ppc /usr/bin/ld: warning prebinding not disabled because (__PAGEZERO segment (address = 0x0 size = 0x1000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__TEXT segment (address = 0x1000 size = 0x7000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__DATA segment (address = 0x8000 size = 0x1000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib /usr/bin/ld: warning prebinding not disabled because (__LINKEDIT segment (address = 0x9000 size = 0x2000) of /var/tmp//cccBWn51.out overlaps with __TEXT segment (address = 0x0 size = 0x1f000) of /opt/local/lib/libjpeg.62.dylib lipo: can't open input file: /var/tmp//ccdJwpvl.out (No such file or directory) make: *** [cjpeg] Error 1 Warning: the following items did not execute (for jpeg): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. super:~ administrator$
Gianluca Toso ha scritto:
Hi, 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_graphics_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$
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.
participants (2)
-
Gianluca Toso
-
Ryan Schmidt