[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Link error building a .m tool with clang on Linux
From: |
Lobron, David |
Subject: |
Link error building a .m tool with clang on Linux |
Date: |
Thu, 4 Jan 2018 17:01:04 +0000 |
Hello gnustep,
I recently picked up the latest libobjc2 and gnustep-base libraries, while
working on a clang build of some ObjC and ObjC++ programs on Ubuntu Linux. The
latest codebases solved a number of other problems I was having, but a symbol
is now missing in a shared library that some sub-programs use, causing those
programs not to link. Here is a representative example:
/home/dlobron/build/clangport/akamai/llvm/llvm-5.0.0.install/bin/clang
-rdynamic -m64 -rdynamic -pthread -fexceptions
-fobjc-runtime=gnustep-1.8 -fblocks -o obj/list2tree \
./obj/list2tree.obj/list2tree.m.o \
-L/home/dlobron/build/clangport/akamai/AkamaiKit/Tools/../../common/lib
-L../AkamaiKit.framework/Versions/Current/.
-L/home/dlobron/GNUstep/Library/Libraries
-L/home/dlobron/build/clangport/akamai/common/GNUstep/Local/Library/Libraries
-L/home/dlobron/build/clangport/akamai/common/GNUstep/System/Library/Libraries
-lAkamaiKit -lXMLKit -lopenssl -lgnustep-base -lpthread -lobjc
-fobjc-nonfragile-abi -lm
../AkamaiKit.framework/Versions/Current/./libAkamaiKit.so: undefined reference
to `vtable for gnustep::libobjc::__objc_class_type_info'
clang-6.0: error: linker command failed with exit code 1 (use -v to see
invocation)
Here, libAkamaiKit.so is a shared library. Upon examination, the symbol in
question is indeed present and not defined:
U vtable for gnustep::libobjc::__objc_class_type_info
I examined some builds that used my previous versions of gnustep-base and
libobjc2. In those builds, the above symbol does not appear at all in the
shared library, libAkamaiKit.so.
Does anyone know of recent changes in gnustep-base or libobjc2 that might cause
this? Should I add a library in my link command? I'm already linking
libobjc.so, and I confirmed that no __objc_class_type_info symbol is present
there. I'm also working on a minimal reproducer.
Thank you,
David
- Link error building a .m tool with clang on Linux,
Lobron, David <=