LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-22-2014, 07:20 PM   #1
datahead8888
LQ Newbie
 
Registered: May 2014
Posts: 20

Rep: Reputation: Disabled
Accidentally installed conflicting versions of C++ Boost library - CMake issues.....


I followed these steps to install boost by source. I was trying to compile it only in a directory so that I could point a single application to it. I accidentally installed it to the system, and now it's breaking other apps that apparently don't work with version 1.55. These apps are compiled using CMake.

Original version of Boost on my system:
1.46.1

I followed these steps to install Boost by source (except that I've currently removed the local.conf file:
https://coderwall.com/p/0atfug
--This installed Boost 1.55 by source.

Here's the error it gives me in an application that bombs when it apparently finds version 1.55. The app uses Cuda, but the thing that changed was Boost.
Code:
/usr/local/include/boost/assert.hpp:102:47: error: ‘noinline’ was not declared in this scope
CMake Error at TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o.cmake:256 (message):
Error generating file
/home/datahead/code/DaxBuild/dax/cuda/cont/CMakeFiles/TestBuild_dax_cuda_cont.dir/__/__/__/__/DaxBuild/dax/cuda/cont/testing/./TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o
I think that the copy in /usr/local/include is the version from source.
If I can just get it to read from /usr/include I think it may very well work, which will let me continue doing some work for now.
Ultimately, I want to purge the entire /usr/local/include installation and only use Boost 1.55 from that one directory for that one app.

It seems likely I need to tell CMake to point to the proper lib and include directory. I'm not sure how to do this properly or if I need to do additional changes.

This is my Linux distro:
Code:
datahead@datahead-G750JW:/usr/include$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
=========================================================================

I just tried this on suggestion from a friend.
I put this in the project's CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.7)

set(CMAKE_INCLUDE_PATH "/usr/include")
set(CMAKE_LIBRARY_PATH "/usr/lib")


I then ran cmake-gui again and make, per http://www.daxtoolkit.org/index.php/...e_Dax_Toolkit:
Code:
cd DaxBuild && cmake-gui ../DaxToolkit
make
But I get the same error:
Code:
/usr/local/include/boost/assert.hpp:102:47: error: ‘noinline’ was not declared in this scope
CMake Error at TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o.cmake:256 (message):
  Error generating file
  /home/datahead/code/DaxBuild/dax/cuda/cont/CMakeFiles/TestBuild_dax_cuda_cont.dir/__/__/__/__/DaxBuild/dax/cuda/cont/testing/./TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o
========================================
Tried this too, now:
Code:
datahead@datahead-G750JW:~/code/DaxToolkit$ cmake -LAH | grep -i boost
-- Boost version: 1.46.1
-- Boost version: 1.46.1
Boost_INCLUDE_DIR:PATH=/usr/include
Changed CMakeLists.txt's start:
Code:
cmake_minimum_required(VERSION 2.8.7)

set(CMAKE_INCLUDE_PATH "/usr/include")
set(CMAKE_LIBRARY_PATH "/usr/lib")
set(Boost_INCLUDE_DIR:PATH "/usr/include")
I did cmake-gui and make as discussed in the edited post above. It then gave the same error:
Code:
/usr/local/include/boost/assert.hpp:102:47: error: ‘noinline’ was not declared in this scope
CMake Error at TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o.cmake:256 (message):
  Error generating file
  /home/datahead/code/DaxBuild/dax/cuda/cont/CMakeFiles/TestBuild_dax_cuda_cont.dir/__/__/__/__/DaxBuild/dax/cuda/cont/testing/./TestBuild_dax_cuda_cont_generated_TestBuild_dax_cuda_cont_DeviceAdapterCuda.cu.o

Last edited by datahead8888; 05-22-2014 at 08:13 PM.
 
Old 05-24-2014, 01:41 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Your backup?? Like that, eh?
I would do the boost compile as a luser, in your home dir, and use
make DESTDIR=~/somewhere install
That will give you a local copy of everything installed. Then you can pick them out and delete.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cmake cannot find boost library slackware 14 teodor_b Linux - Software 1 05-28-2013 05:18 AM
cmake: Using find_package(Boost) when FindBoost.cmake is not in the default location damien_d Programming 3 10-27-2010 03:40 PM
Link Error: Two versions of boost installed on system simulacrum111 Programming 1 07-19-2009 06:24 PM
2 versions of Gutenprint conflicting CartersAdvocate Slackware 4 01-01-2009 09:37 PM
boost library juricheguevara Programming 5 07-04-2006 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration