I'm trying to build libclaw (1.4) on mac os x, using Clang and cmake (gui), but the default gcc set-up is producing identical results.
architecture doesn't seem to matter, results are the same on i386 and x86_64 for both compilers, while libintl is installed (at the same paths as libpng, boost, etc)
g++ --version:
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
clang++ --version:
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
when building, I get:
[ 0%] Building CXX object CMakeFiles/claw_logger.dir/claw/code/logger.cpp.o
[ 1%] Building CXX object CMakeFiles/claw_logger.dir/claw/code/log_stream.cpp.o
[ 2%] Building CXX object CMakeFiles/claw_logger.dir/claw/code/log_stream_concise.cpp.o
[ 3%] Building CXX object CMakeFiles/claw_logger.dir/claw/code/log_stream_uniq.cpp.o
[ 4%] Building CXX object CMakeFiles/claw_logger.dir/claw/code/log_level.cpp.o
Linking CXX shared library libclaw_logger.dylib
ld: warning: option -s is obsolete and being ignored
ld: unknown option: --as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libclaw_logger.1.7.0.dylib] Error 1
make[1]: *** [CMakeFiles/claw_logger.dir/all] Error 2
make: *** [all] Error 2
adding the -v, and taking out the '--as-needed' in the logger linker flags produces:
Linking CXX shared library libclaw_logger.dylib
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
"/usr/bin/ld" -demangle -dynamic -dylib -dylib_compatibility_version 1.0.0 -dylib_current_version 1.7.0 -arch x86_64 -dylib_install_name /Users/leroy_k/Desktop/claw11/libclaw_logger.1.dylib -macosx_version_min 10.8.0 -s -o libclaw_logger.1.7.0.dylib CMakeFiles/claw_logger.dir/claw/code/logger.cpp.o CMakeFiles/claw_logger.dir/claw/code/log_stream.cpp.o CMakeFiles/claw_logger.dir/claw/code/log_stream_concise.cpp.o MakeFiles/claw_logger.dir/claw/code/log_stream_uniq.cpp.o CMakeFiles/claw_logger.dir/claw/code/log_level.cpp.o -lstdc++ -lSystem /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
"_libintl_dgettext", referenced from:
_dgettext in log_stream_uniq.cpp.o
_dgettext in log_level.cpp.o
"_libintl_dngettext", referenced from:
_dngettext in log_stream_uniq.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libclaw_logger.1.7.0.dylib] Error 1
make[1]: *** [CMakeFiles/claw_logger.dir/all] Error 2
make: *** [all] Error 2
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I am getting the same error. Is there any update on this ?
Last edit: Anonymous 2017-08-28