From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 01:18:38 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B01954 for ; Fri, 20 Jun 2014 01:18:38 +0000 (UTC) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89F692E84 for ; Fri, 20 Jun 2014 01:18:38 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id fb1so2482878pad.14 for ; Thu, 19 Jun 2014 18:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=E+OMRz9dPfsFcs6ugmrFktsyFjjzVfL3b5epr2G2OCo=; b=zlnAU4mqZeSxFYGPwV5Az0CQMUWZy/em79jyuFc4fmuBDAOLN2fhSqxyHeCjMoH8+c K8uUUj3iWG5V6RkgjRqJvWVjqrfdBxXz4LYTjmE3ekYh0sINiDYMWjtDCOlaOG7KTsS2 UgGxJQpZbBz9Lc+yqKQB1Oj4p527gnpgZS8CTk8PPZqKxfOyQSJy3kZoZWiKLlqwE0Lk UxY1NVhoihWw+griq0uEEIIgSydhj57D8+DDODlP0LGs8IEV+k8xdgqiMx/xhwR2REY9 O0kwT7MUEJ6X3ZFLH/mAppIECo5PyH5oCoXyyVUMijoJuDH099KgfsYyZxNWhWkNH6Ja Z2Xw== X-Received: by 10.66.150.228 with SMTP id ul4mr256161pab.16.1403227118108; Thu, 19 Jun 2014 18:18:38 -0700 (PDT) Received: from [10.0.1.12] (cpe-76-167-75-172.san.res.rr.com. [76.167.75.172]) by mx.google.com with ESMTPSA id x5sm10600929pbw.26.2014.06.19.18.18.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 18:18:37 -0700 (PDT) From: Ricky Huang Subject: Boost Filesystem fails with FreeBSD 10, clang, and cmake Message-Id: <1B3D81DF-381A-4417-9D62-8DE01C7D1CCB@gmail.com> Date: Thu, 19 Jun 2014 18:18:36 -0700 To: "freebsd-questions@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 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: Fri, 20 Jun 2014 01:18:38 -0000 Hello all, 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:=20 > 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 >=20 > 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=85 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) include_directories(${Boost_INCLUDE_DIR}) set(LIBS ${LIBS} ${Boost_LIBRARIES}) set(BOOST_CLANG_TEST_SOURCES ${SOURCES} main.cpp) add_executable(boost_clang_test ${BOOST_CLANG_TEST_SOURCES}) target_link_libraries(boost_clang_test ${LIBS}) main.cpp: #include #include #include #include #include using namespace std; using namespace boost::filesystem; const char *progname; int main(int argc, char **argv){ return 0; } Thanks in advance.