From owner-freebsd-questions@FreeBSD.ORG Sat Jun 21 10:08:08 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C8C72F1 for ; Sat, 21 Jun 2014 10:08:08 +0000 (UTC) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by mx1.freebsd.org (Postfix) with ESMTP id BF45B248D for ; Sat, 21 Jun 2014 10:08:07 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmoGAA1ZpVNbsXPk/2dsb2JhbABYgw3Bb4MUAYEIF3WEAwEBBTIBIyMQCw4KCSUPKh4GiFkBySsXjnYHhEMBA5pDk1uDRDs Received: from 228.115-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.115.228]) by relay.skynet.be with ESMTP; 21 Jun 2014 12:07:59 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s5LA7w2v001009; Sat, 21 Jun 2014 12:07:58 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sat, 21 Jun 2014 12:07:58 +0200 From: Tijl Coosemans To: Ricky Huang Subject: Re: Boost Filesystem fails with FreeBSD 10, clang, and cmake Message-ID: <20140621120758.1966d034@kalimero.tijl.coosemans.org> In-Reply-To: <1B3D81DF-381A-4417-9D62-8DE01C7D1CCB@gmail.com> References: <1B3D81DF-381A-4417-9D62-8DE01C7D1CCB@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 10:08:08 -0000 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".