chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] MacOS X build trouble


From: Thomas Christian Chust
Subject: [Chicken-users] MacOS X build trouble
Date: Thu, 22 Feb 2007 22:15:12 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1

Hello,

the current CHICKEN darcs head fails to build on my PowerPC iBook
running MacOS X 10.4.8. csc -version tells me the bootstrapping compiler
is version 2.523 - macosx-unix-gnu-ppc - [ libffi dload ptables
applyhook cmake ] and the error I get during the CMake configured build
process reads as follows:

$ make VERBOSE=1
[...]
Linking C executable chicken-static
cd /Users/murphy/Build/chicken/static && /usr/bin/cmake -P
CMakeFiles/chicken-static.dir/cmake_clean_target.cmake
cd /Users/murphy/Build/chicken/static && /usr/bin/gcc    -O3 -DNDEBUG
-headerpad_max_install_names -fPIC
"CMakeFiles/chicken-static.dir/__/batch-driver.o"
"CMakeFiles/chicken-static.dir/__/c-backend.o"
"CMakeFiles/chicken-static.dir/__/c-platform.o"
"CMakeFiles/chicken-static.dir/__/chicken.o"
"CMakeFiles/chicken-static.dir/__/compiler.o"
"CMakeFiles/chicken-static.dir/__/optimizer.o"
"CMakeFiles/chicken-static.dir/__/support.o"   -o chicken-static
-L/Users/murphy/Build/chicken/static -lchicken -ldl -lffi -lm
/usr/bin/ld: Undefined symbols:
_C_emit_trace_info2
collect2: ld returned 1 exit status
make[2]: *** [static/chicken-static] Error 1
make[1]: *** [static/CMakeFiles/chicken-static.dir/all] Error 2
make: *** [all] Error 2

By the way, as I already mentioned some months ago, the chicken-static
and csi-static executables produced by CMake builds on MacOS X are
always completely useless, because the are not statically linked against
libchicken.a as they should be but dynamically linked against
libchicken.dylib. This is due to the fact that CMake screws up the
linker flags -- if you want to link against a static library on MacOS X
and there exists a shared library of the same name, you have to specify
the full path to the static library file instead of using an -l flag;
otherwise the dynamic library is always preferred, even if it is
somewhere after the static one in the library search paths. I don't like
that behaviour of MacOS X, but that's the way it works. Unfortunately I
haven't found a way, yet, to convince CMake to actually behave correctly
here. Even when you specify the full library path in a
TARGET_LINK_LIBRARIES command, CMake thinks it has to be clever and turn
that into a combination of -L and -l flags. So maybe it would be good to
disable building of chicken-static and csi-static on MacOS X entirely?

cu,
Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]