Boost Filesystem fails with FreeBSD 10, clang, and cmake
Tijl Coosemans
tijl at FreeBSD.org
Sat Jun 21 10:08:08 UTC 2014
On Thu, 19 Jun 2014 18:18:36 -0700 Ricky Huang wrote:
> I am currently migrating to a FreeBSD 10 system which comes default with
> clang language. I was able to compile Boost just fine. But when I
> include filesysstem.hpp to it, I get the following error message:
>
>> Linking CXX executable boost_clang_test
>> /usr/bin/ld: : invalid DSO for symbol `_ZN5boost6system15system_categoryEv' definition
>> /usr/local/lib/libboost_system.so.1.55.0: could not read symbols: Bad value
>> CC: error: linker command failed with exit code 1 (use -v to see invocation)
>> *** Error code 1
>>
>> Stop.
>
> I am using cmake as my build system, could it be possible that I need to
> adjust my cmake variables? I am not sure if I've came to correct forum
> or should this be on Boost, clang, CMake forum(s)? Please let me know
> if I am at the wrong place…
>
>
> The minimum amount of code to induce the problem are the following 2 files:
>
> CMakeLists.txt:
>
> cmake_minimum_required(VERSION 2.8)
>
> # Find and include Boost libraries
> find_package(Boost 1.55 COMPONENTS filesystem REQUIRED)
The error above means the "filesystem" component depends on the "system"
component, so try adding "system" here after "filesystem".
More information about the freebsd-questions
mailing list