Messed up my boost installation...

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.

/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:
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 [url]http://www.daxtoolkit.org/index.php/Building_the_Dax_Toolkit:[/url]
1
2
cd DaxBuild && cmake-gui ../DaxToolkit
make


But I get the same error:
1
2
3
4
/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:
1
2
3
4
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:
1
2
3
4
5
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:
1
2
3
4
5
/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 on
At one time I had parts of two versions of the boost lib (1.49 & 1.55) installed on my system and had the same problem. It was a simple app that I compiled from the command line by setting the "-l:filename" switch. Check out the man page - http://linux.die.net/man/1/ld

The command that I used was:
g++ -l:libboost_regex.so.1.49.0 main.cpp


Don't know how to set linker flags in CMake, but hopefully this will help.
Last edited on
Topic archived. No new replies allowed.