Hi! while I got a reliable clang+libobjc2 setup on OpenBSD with the bfd linker (contrary to other experiences here) I am unable to get it to work on something as simple as a current Linux/i386 with clang 8
I configure current make with: ./configure --prefix=/ --with-layout=gnustep --with-library-combo=ng-gnu-gnu LDFLAGS=-fuse-ld=gold I tried with and without LDFLAGS gold. I build and install "our" libobjc2. When I configure base, I get this failure: /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_guard_acquire' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::terminate()' /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_guard_abort' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::ios_base::Init::Init()' /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_rethrow' /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_begin_catch' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::ios_base::Init::~Init()' /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_guard_release' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /System/Library/Libraries/libobjc.so: error: undefined reference to 'operator new(unsigned int)' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::cerr' /System/Library/Libraries/libobjc.so: error: undefined reference to '__cxa_end_catch' /System/Library/Libraries/libobjc.so: error: undefined reference to 'operator delete(void*)' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::ostream::operator<<(std::ostream& (*)(std::ostream&))' /System/Library/Libraries/libobjc.so: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)' clang-8: error: linker command failed with exit code 1 (use -v to see invocation) If Instead I do NOT use gold option, I get this 1 warning generated. /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `operator delete(void*)' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `__cxa_end_catch' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `__cxa_guard_release' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::ios_base::Init::~Init()' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `operator new(unsigned int)' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::cerr' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `__cxa_begin_catch' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `__cxa_rethrow' /usr/lib/gcc/i686-pc-linux-gnu/7.3.0/../../../../i686-pc-linux-gnu/bin/ld: /System/Library/Libraries/l ibobjc.so: undefined reference to `std::ios_base::Init::Init()' which is even more weird? Riccardo