[MacPorts] #60018: libjpeg-turbo @ 2.0.3 +universal : Undefined symbols for architecture x86_64

MacPorts noreply at macports.org
Mon Jan 27 03:47:33 UTC 2020


#60018: libjpeg-turbo @ 2.0.3 +universal : Undefined symbols for architecture
x86_64
-------------------------+---------------------------
 Reporter:  Cor0n4V1rus  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:  libjpeg-turbo
-------------------------+---------------------------
 judging from the build log, maybe it's because the cmake execution is not
 correct for a +universal build, despite the
 -DCMAKE_OSX_ARCHITECTURES="x86_64;i386" parameter:

 ...\\
 32-bit build (i386)\\
 ...\\
 CMAKE_ASM_NASM_OBJECT_FORMAT = macho\\
 CMAKE_ASM_NASM_FLAGS =  -DMACHO -DPIC\\
 SIMD extensions: i386 (WITH_SIMD = 1)\\

 files containing the functions the linker cannot find are compiled with
 nasm with the '-f macho' option, therefore i386-only.

 "nasm -hf" states:

 ...\\
 valid output formats for -f are (`*' denotes default):\\
 ...\\
 macho32   NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (i386) object files\\
 macho64   NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (x86_64) object
 files\\
 ...\\
 macho     MACHO (short name for MACHO32)\\
 ...\\

 the used nasm is the one from macports:

 /opt/local/bin/nasm -v\\
 NASM version 2.14.02 compiled on Jan 27 2020

 a quick test, compiling the first file "jsimdcpu.asm" with nasm and

 "-f macho32 -f macho64"\\

 showed, that only the last -f option is used, therefore only one
 architecture per compilation unit possible. maybe, for +universal, the
 whole project has to be compiled twice and then merged with lipo!?

-- 
Ticket URL: <https://trac.macports.org/ticket/60018>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list