Re: [Log4cplus-devel] Fixes for CMake build files.
Logging Framework for C++
Brought to you by:
wilx
From: Václav Z. <vha...@gm...> - 2012-09-13 10:52:01
|
On 13 September 2012 12:44, Chernyshev Vyacheslav wrote: > 13.09.12, 9:55, Václav Zeman wrote: >> I wonder what difficulties you have had with the Autotools build system >> on MacOS X. I am keen on fixing those as well. > > There are some link problems when C++11 mode and Clang's libc++ is > requested. Configure is done with something like that: > ../configure > --prefix=/opt/log4cplus_clang > --with-iconv > CC=/usr/bin/clang > CXX=/usr/bin/clang++ > CXXFLAGS="-std=gnu++11 -stdlib=libc++ -O3 -march=native -DNDEBUG" > CFLAGS="-std=gnu99 -O3 -march=native -DNDEBUG" > LDFLAGS="-stdlib=libc++" > > Link failures appear after this line in output: > libtool: link: /usr/bin/clang++ > -dynamiclib -o .libs/liblog4cplus-1.1.4.dylib > <skipped object files list> > -liconv -O3 -march=native -O2 > -install_name /opt/log4cplus_cmake/lib/liblog4cplus-1.1.4.dylib > -compatibility_version 5 > -current_version 5.0 > -Wl,-single_module > > I think that the problem is that CXXFLAGS and/or LDFLAGS are not > properly passed to final link command. Without "-std=gnu++11 > -stdlib=libc++" a default c++ runtime library is linked to log4cplus and > it results in undefined references. This sounds like this might a be a Libtool or Automake problem. I am afraid that I can hardly help with this. But I am willing to apply any reasonable patches that fix this, if this is actually log4cplus problem. > As a side note, probably > user-provided CXXFLAGS should be appended to the end of the list, > otherwise default -O2 overrides user's decision. I guess I should omit adding -O2 in case any other -O option is present there. -- VZ |