$ poudriere jail -cj clang7 -a amd64 -v projects/clang700-import -m svn+https $ poudriere testport -j clang7 archivers/unarchiver [...] ld: error: undefined symbol: ._OBJC_REF_CLASS_NSAutoreleasePool >>> referenced by DetectorTest.m >>> Build/DetectorTest.o:(main) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSData >>> referenced by DetectorTest.m >>> Build/DetectorTest.o:(main) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSString >>> referenced by DetectorTest.m >>> Build/DetectorTest.o:(main) ld: error: undefined symbol: __objc_load >>> referenced by DetectorTest.m >>> Build/DetectorTest.o:(.objcv2_load_function) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSArray >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(_c_UniversalDetector__possibleMIMECharsets) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_REF_CLASS_NSObject >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(_i_UniversalDetector__init) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_REF_CLASS_NSObject >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(_i_UniversalDetector__dealloc) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_REF_CLASS_NSString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(_i_UniversalDetector__MIMECharset) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.1) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.2) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.3) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.4) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.5) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.6) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.7) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.8) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.9) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.10) in archive libUniversalDetector.a ld: error: undefined symbol: ._OBJC_CLASS_NSConstantString >>> referenced by UniversalDetector.m >>> UniversalDetector.o:(.L.objc_string.11) in archive libUniversalDetector.a ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) c++: error: linker command failed with exit code 1 (use -v to see invocation) http://package18.nyi.freebsd.org/data/headamd64PR230355-default/2018-08-11_19h01m06s/logs/errors/unar-1.10.1_9.log
Adding LLD_UNSAFE doesn't help, see https://ptpb.pw/VkdA Build/DetectorTest.o: In function `main': DetectorTest.m:(.text+0x17): undefined reference to `._OBJC_REF_CLASS_NSAutoreleasePool' DetectorTest.m:(.text+0x63): undefined reference to `._OBJC_REF_CLASS_NSData' DetectorTest.m:(.text+0x6a): undefined reference to `._OBJC_REF_CLASS_NSString' Build/DetectorTest.o: In function `.objcv2_load_function': DetectorTest.m:(.text..objcv2_load_function[.objcv2_load_function]+0x6): undefined reference to `__objc_load' libUniversalDetector.a(UniversalDetector.o): In function `_c_UniversalDetector__possibleMIMECharsets': UniversalDetector.m:(.text+0x3e): undefined reference to `._OBJC_REF_CLASS_NSArray' libUniversalDetector.a(UniversalDetector.o): In function `_i_UniversalDetector__init': UniversalDetector.m:(.text+0x18f): undefined reference to `._OBJC_REF_CLASS_NSObject' libUniversalDetector.a(UniversalDetector.o): In function `_i_UniversalDetector__dealloc': UniversalDetector.m:(.text+0x232): undefined reference to `._OBJC_REF_CLASS_NSObject' libUniversalDetector.a(UniversalDetector.o): In function `_i_UniversalDetector__MIMECharset': UniversalDetector.m:(.text+0x37b): undefined reference to `._OBJC_REF_CLASS_NSString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0x0): undefined reference to `._OBJC_CLASS_NSConstantString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0x20): undefined reference to `._OBJC_CLASS_NSConstantString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0x40): undefined reference to `._OBJC_CLASS_NSConstantString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0x60): undefined reference to `._OBJC_CLASS_NSConstantString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0x80): undefined reference to `._OBJC_CLASS_NSConstantString' libUniversalDetector.a(UniversalDetector.o):(__objc_constant_string+0xa0): more undefined references to `._OBJC_CLASS_NSConstantString' follow libUniversalDetector.a(UniversalDetector.o):(.data+0x250): undefined reference to `._OBJC_CLASS_NSObject' c++: error: linker command failed with exit code 1 (use -v to see invocation)
Built fine with CC=clang60 + devel/llvm60. Not a LLD issue.
Tested: kern.version=OpenBSD 6.4-current (GENERIC.MP) #658: Fri Feb 1 02:25:34 MST 2019 deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP FIX: https://github.com/D5Nch3ck/MyPorts/commit/de7dfaa1f314f97ad3c4e2b7f275079d009dbe1b Error: c++ -Wl,--whole-archive -fexceptions -fgnu-runtime -o DetectorTest Build/DetectorTest.o libUniversalDetector.a -L/usr/local/lib -Wl,--no-whole-archive -lgnustep-base -lobjc2 -lm ld: error: undefined symbol: ._OBJC_REF_CLASS_NSAutoreleasePool >>> referenced by DetectorTest.m:6 >>> Build/DetectorTest.o:(gnustep_base_user_main) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSData >>> referenced by DetectorTest.m:12 >>> Build/DetectorTest.o:(gnustep_base_user_main) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSString >>> referenced by DetectorTest.m:12 >>> Build/DetectorTest.o:(gnustep_base_user_main) ld: error: undefined symbol: __objc_load >>> referenced by DetectorTest.m >>> Build/DetectorTest.o:(.objcv2_load_function) ld: error: undefined symbol: ._OBJC_REF_CLASS_NSArray
Flag remove: -fgnu-runtime
A commit references this bug: Author: danfe Date: Wed Mar 27 11:16:31 UTC 2019 New revision: 496942 URL: https://svnweb.freebsd.org/changeset/ports/496942 Log: Unbreak the build against Clang 7 and above by removing offending flag and macro definition (-fgnu-runtime and -DGNU_RUNTIME=1, respectively). PR: 230627 Changes: head/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd head/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
Fixes committed as ports r496942, thanks!