Opened 11 years ago

Closed 9 years ago

#42361 closed defect (fixed)

libjpeg-turbo +universal: build failure

Reported by: nneonneo (Robert Xiao) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: raimue (Rainer Müller)
Port: libjpeg-turbo mozjpeg

Description (last modified by ryandesign (Ryan Carsten Schmidt))

libjpeg-turbo won't build in the +universal variant. The relevant config.log is attached.

configure:13494: checking for nasm
configure:13521: result: /opt/local/bin/nasm
configure:13534: checking for object file format of host system
configure:13608: result: Mach-O64
configure:13616: checking for object file format specifier (NAFLAGS) 
configure:13631: result: -fmacho64 -DMACHO -D__x86_64__
configure:13635: checking whether the assembler (/opt/local/bin/nasm -fmacho64 -DMACHO -D__x86_64__) works
configure:13646: /opt/local/bin/nasm -fmacho64 -DMACHO -D__x86_64__ -o conftest.o conftest.asm
configure:13649: $? = 0
configure:13651: result: yes
configure:13662: checking whether the linker accepts assembler output
configure:13665: /usr/bin/clang -o conftest -L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386 conftest.o  1>&5
ld: warning: ignoring file conftest.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): conftest.o
Undefined symbols for architecture i386:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:13668: $? = 1
configure:13675: result: no
configure:13677: error: configuration problem: maybe object file format mismatch.

Attachments (1)

config.log (45.3 KB) - added by nneonneo (Robert Xiao) 11 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjpeg-turbo/libjpeg-turbo/work/libjpeg-turbo-1.3.0-i386/config.log

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by nneonneo (Robert Xiao)

Attachment: config.log added

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjpeg-turbo/libjpeg-turbo/work/libjpeg-turbo-1.3.0-i386/config.log

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

Description: modified (diff)
Owner: changed from macports-tickets@… to rmstonecipher@…
Summary: Build failure for libjpeg-turbo +universallibjpeg-turbo +universal: build failure

I'm unable to reproduce this problem on Mavericks.

comment:2 Changed 11 years ago by raimue (Rainer Müller)

Cc: raimue@… added
Port: mozjpeg added

I see the problem on Mavericks, also affects mozjpeg (a libjpeg-turbo fork).

comment:3 Changed 11 years ago by raimue (Rainer Müller)

I think the problem is the --host argument to configure, we can't use ${build_arch} there to pass different build flags as the Portfile is only parsed once but needs to be different per architecture. I don't know muniversal very well, but I think this would be the fix:

--- Portfile	(revision 117637)
+++ Portfile	(working copy)
@@ -35,6 +35,8 @@
         configure.args-append --host x86_64-apple-darwin
     }
 }
+lappend merger_configure_args(i386) --host i686-apple-darwin
+lappend merger_configure_args(x86_64) --host x86_64-apple-darwin
 
 post-destroot {
     xinstall -d ${destroot}${prefix}/share/doc/${name}

comment:4 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from rmstonecipher@… to macports-tickets@…

comment:5 Changed 9 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

libjpeg-turbo fixed in r136594. mozjpeg was fixed in r119203.

Note: See TracTickets for help on using tickets.