It worked like a charm for this. Thank you David! One other issue that’s been a source of concern with clang/llvm and the objc lib:
It seems it cannot correctly load the meta-data for classes. This has happened with clang-3.8 and clang-4.0 But on this most recent build I tried to downgrade everything back to clang-3.6 and it still acting up. Here is the backtrace: ~~~bash Program received signal SIGSEGV, Segmentation fault. 0x00007ffff72d845e in isEmptyProtocol () from /usr/local/lib/libobjc.so.4.6 (gdb) where #0 0x00007ffff72d845e in isEmptyProtocol () from /usr/local/lib/libobjc.so.4.6 #1 0x00007ffff72d82cd in unique_protocol () from /usr/local/lib/libobjc.so.4.6 #2 0x00007ffff72d65c6 in init_protocols () from /usr/local/lib/libobjc.so.4.6 #3 0x00007ffff72d65ba in init_protocols () from /usr/local/lib/libobjc.so.4.6 #4 0x00007ffff72d63b5 in objc_init_protocols () from /usr/local/lib/libobjc.so.4.6 #5 0x00007ffff72cd7b4 in load_category () from /usr/local/lib/libobjc.so.4.6 #6 0x00007ffff72cd4f8 in try_load_category () from /usr/local/lib/libobjc.so.4.6 #7 0x00007ffff72cd485 in objc_try_load_category () from /usr/local/lib/libobjc.so.4.6 #8 0x00007ffff72d5f5d in __objc_exec_class () from /usr/local/lib/libobjc.so.4.6 #9 0x00007ffff7de76ba in call_init (l=<optimized out>, argc=argc@entry=3, argv=argv@entry=0x7fffffffe608, env=env@entry=0x7fffffffe628) at dl-init.c:72 #10 0x00007ffff7de77cb in call_init (env=0x7fffffffe628, argv=0x7fffffffe608, argc=3, l=<optimized out>) at dl-init.c:30 #11 _dl_init (main_map=0x7ffff7ffe168, argc=3, argv=0x7fffffffe608, env=0x7fffffffe628) at dl-init.c:120 #12 0x00007ffff7dd7c6a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #13 0x0000000000000003 in ?? () #14 0x00007fffffffe820 in ?? () #15 0x00007fffffffe843 in ?? () #16 0x00007fffffffe846 in ?? () #17 0x0000000000000000 in ?? () ~~~ As you can see, this occurs even *before* my code gets a chance to run. Any suggestion to debug this further? — Laurent On 6 Oct 2017, at 12:15, David Chisnall wrote: > Hi, > > I need to do a new release soon, as this was fixed in trunk ages ago… > > If you run cmake with the -DLLVM_OPTS=off flag, then you should avoid this > error. > > David > >> On 6 Oct 2017, at 16:36, Laurent Michel <l...@thorgal.homelinux.org> wrote: >> >> Dear All, >> >> I just attempted to build the whole GNUstep suite with libobjc2 in a docker >> container >> based on Ubuntu 16.04 and clang/llvm 3.8 n(also tried with 4.0 with the same >> result) >> >> I encounter the following issue when trying to build libobjc2. Namely, cmake >> really >> does not like the AddLLVM directive it finds. This is with the git version >> of libobjc2 and >> checking out the 1.8.1 tag. I googled and saw that this “kind” of issues >> has been ongoing for a while, but I couldn’t locate a clear-cut solution. >> >> Note that this is not the first time I build GNUstep and didn’t have this >> problem in the past. >> Does that mean that the Ubuntu version of clang is broken and the compiler >> itself (+llvm) must >> be build from source to get anywhere? >> >> Many thanks for relevant pointers! >> >> Best, >> — >> Laurent >> >> PS/ Here is the complaint from cmake >> >> export CC=clang-3.8;export CXX= >> clang++-3.8;cmake .. >> -- The C compiler identification is Clang 3.8.0 >> -- The CXX compiler identification is Clang 3.8.0 >> -- Check >> for >> working C compiler: /usr/bin/clang-3.8 >> -- Check >> for >> working C compiler: /usr/bin/clang-3.8 -- works >> -- Detecting C compiler ABI info >> -- Detecting C compiler ABI info - >> done >> >> -- Detecting C compile features >> -- Detecting C compile features - >> done >> >> -- Check >> for >> working CXX compiler: /usr/bin/clang++-3.8 >> -- Check >> for >> working CXX compiler: /usr/bin/clang++-3.8 -- works >> -- Detecting CXX compiler ABI info >> -- Detecting CXX compiler ABI info - >> done >> >> -- Detecting CXX compile features >> -- Detecting CXX compile features - >> done >> >> -- The ASM compiler identification is Clang >> -- Found assembler: /usr/bin/clang-3.8 >> CMake Error at opts/CMakeLists.txt:4 >> (include) >> : >> include could not find load file: >> >> AddLLVM >> >> >> CMake Error at opts/CMakeLists.txt:11 >> (add_llvm_loadable_module) >> : >> Unknown CMake >> command "add_llvm_loadable_module" >> . >> >> >> _______________________________________________ >> Gnustep-dev mailing list >> Gnustep-dev@gnu.org >> https://lists.gnu.org/mailman/listinfo/gnustep-dev
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev