gnustep-base configuration fails. See link error at the bottom and the command line from config.log. In trying to rebuild objc2 1.7-RC1, I get similar link errors now. I don't know why I didn't get these before but maybe because now gnustep-make has been installed.
Anyway, these errors seem to indicate that the libcxxrt.a is needed but missing. In my FreeBSD 9.1 jail, there isn't even source for this library let alone the library, and no port. On the FreeBSD host, there are the source directories for it but as pointed out earlier, this library is not yet built automatically.
On a fresh FreeBSD 9.1 jail, where llvm and clang (trunk head 3.4) have been manually built and installed to /usr/local, the configure step for -base fails to link objc code.
If I do need the libcxxrt.a, how do I build on the host? If I can do that, manually copying library and headers to jail is then necessary I guess.
I tried to follow instructions from
which says to add MK_LIBCPLUSPLUS = yes
to /etc/make.conf but then make in /usr/src/lib/libcxxrt gives this error
"/usr/share/mk/
bsd.own.mk", line 478: MK_LIBCPLUSPLUS can't be set by a user.
FreeBSD 9.1 seems to ship with clang 3.1 but the ports would bring it to 3.2. If I'm building the library manually, which clang version is sufficient?
In case libcxxrt isn't needed, here are the configure calls for -make and -base. gnustep-make is built and installed with gmake and gmake install (run as root).
export CC=/usr/local/bin/clang
export CXX=${CC}
(
cd core/make
./configure \
--with-layout=gnustep \
--with-objc-lib-flag=-l:libobjc.so.4.6 \
CC=${CC} CXX=${CXX}
gmake
gmake install # as root
)
export GNUSTEP_CONFIG_FILE=/etc/GNUstep.conf
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
(
cd core/base
./configure \
--with-layout=gnustep \
CC=${CC} CXX=${CXX}
)
configure:13164: checking whether objc really works
configure:13194: /usr/local/bin/clang -o conftest -g -O2 \
-I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers \
-I/usr/local/include \
-fgnu-runtime -x objective-c \
-L/usr/GNUstep/System/Library/Libraries -L/usr/GNUstep/Local/Library/Libraries -L/usr/local/lib \
conftest.c \
-lrt -lpthread -rdynamic -pthread \
-fobjc-nonfragile-abi -fgnu-runtime \
-L/home/frank/GNUstep/Library/Libraries -L/usr/GNUstep/Local/Library/Libraries \
-L/usr/GNUstep/System/Library/Libraries -L/usr/local/lib \
-l:libobjc.so.4.6 -lm
In file included from conftest.c:99:
In file included from ././config/config.objc.m:2:
././config/objc-common.g:53:3: warning: assignment to Objective-C's isa is deprecated in favor of object_setClass() [-Wdeprecated-objc-isa-usage]
obj->isa = self;
^ ~~~~~~~
object_setClass( , )
././config/objc-common.g:46:5: note: instance variable is declared here
id isa;
^
1 warning generated.
/usr/local/lib/libobjc.so.4.6: undefined reference to `vtable for std::type_info'
/usr/local/lib/libobjc.so.4.6: undefined reference to `std::type_info::__is_function_p() const'
/usr/local/lib/libobjc.so.4.6: undefined reference to `typeinfo for std::type_info'
/usr/local/lib/libobjc.so.4.6: undefined reference to `std::type_info::~type_info()'
/usr/local/lib/libobjc.so.4.6: undefined reference to `std::type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const'
/usr/local/lib/libobjc.so.4.6: undefined reference to `std::type_info::__is_pointer_p() const'
clang-3.4: error: linker command failed with exit code 1 (use -v to see invocation)