gossamer
gossamer copied to clipboard
Problem installing gossamer
Hi all, I have a problem during the "make" part of gossamer installation.
I tried on two different systems (Ubuntu 17.10 with boost 1.58, and CentOS 7 with boost 1.53) and in both I have the following error:
Linking CXX executable testGossCmdBuildGraph
libgosslib.a(PhysicalFileFactory.cc.o): En la función boost::filesystem::copy_file(boost::filesystem::path const&, boost::filesystem::path const&)': PhysicalFileFactory.cc:(.text._ZN5boost10filesystem9copy_fileERKNS0_4pathES3_[_ZN5boost10filesystem9copy_fileERKNS0_4pathES3_]+0x24): referencia a
boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)' sin definir
collect2: error: ld devolvió el estado de salida 1
make[2]: *** [src/testGossCmdBuildGraph] Error 1
make[1]: *** [src/CMakeFiles/testGossCmdBuildGraph.dir/all] Error 2
make: *** [all] Error 2
All the prerequisites are installed.
Could anyone help me?
Thanks in advance, Francesco
In Centos6, compilation worked with a custom build boost. I suggest you give it a try which is in fact as simple as entering few commands as discussed in http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html. I suggest to go with the default installation location, and install all the libraries.
$ cd path/to/boost_1_61_0
$ ./bootstrap.sh
$ ./b2 install
To be specific, the compilation worked with boost 1.55.0
Dear,
I have a similar error at the same step while I am trying to install it on CentOS7 following your recommendations with a bit of adaptation to not overwrite the other versions on the server (see error lines below).
The boost version on the server is 1.53.0. As you suggested to installed the 1.55.0 version, I installed it locally with the following commands:
tar -xvf boost_1_55_0.tar.gz
mv boost_1_55_0 ../gossamer.git/
sudo mv boost_1_55_0 ../gossamer.git/
cd ../gossamer.git/
cd boost_1_55_0/
sudo ./bootstrap.sh
./b2 install --prefix=/opt/tools/gossamer/boost --with=all
I also had to install cmake3. If I run the cmake, I can see that boost v1.55.0 is used.
/opt/tools/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/tools/gossamer -DCMAKE_INCLUDE_PATH=/opt/tools/gossamer/boost/include -DCMAKE_LIBRARY_PATH=/opt/tools/gossamer/boost/lib ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- This is a Unix-like platform
-- The compiler is GNU
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- system
-- iostreams
-- program_options
-- filesystem
-- regex
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Checking for module 'sqlite3'
-- Found sqlite3, version 3.22.0
-- Found Sqlite: /usr/local/include
-- Looking for pandoc - found
-- Manual pages will be built
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/tools/gossamer.git/build
When I run make, then it crashes at 41% of the process:
[ 41%] Linking CXX executable testGossCmdBuildGraph
libgosslib.a(PhysicalFileFactory.cc.o): In function `boost::filesystem::copy_file(boost::filesystem::path const&, boost::filesystem::path const&)':
PhysicalFileFactory.cc:(.text._ZN5boost10filesystem9copy_fileERKNS0_4pathES3_[_ZN5boost10filesystem9copy_fileERKNS0_4pathES3_]+0x24): undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/testGossCmdBuildGraph] Error 1
make[1]: *** [src/CMakeFiles/testGossCmdBuildGraph.dir/all] Error 2
make: *** [all] Error 2
Can you help me to install xenome ? Many thanks
R
Below, an edited method to install on centos7 (RHEL7)
This should build but will lead to a xenome executable which has flaws and in my hands can:
-
build an index when using few threads and little RAM (8/96) issue18
-
classify and fall asleep forever right after generating the fastq outputs issue9
###################
# you can sudo here
###################
# install dependencies
sudo yum install cmake3
sudo yum install libsqlite3x-devel
# check other dependencies equivalent to the ubuntu following ones:
# g++ libboost-all-dev pandoc zlib1g-dev libbz2-dev
###############################
# you should NOT sudo from here
###############################
#####################################################################################################
# make sure you create the next folder and change ownership to yourself to avoid having to sudo later
#####################################################################################################
# make a home for boost to keep it separate from your system version
mkdir -p /opt/boost && cd /opt/boost
# get the latest package
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
tar -xzf boost_1_66_0.tar.gz && cd boost_1_66_0
./bootstrap.sh --prefix=/opt/boost
./b2 install --prefix=/opt/boost --with=all
# have a cup of tea
# get gossamer and build
basedir=/opt/tools
cd ${basedir}
# make sure you change ownership of gossamer.git to yourself to avoid having to sudo from here
mkdir -p ${basedir}/gossamer.git
sudo chown -R <youruser>:<yourgroup> gossamer.git
git clone https://github.com/data61/gossamer.git gossamer.git && cd gossamer.git
mkdir build && cd build
# check cmake3 is installed
which cmake3 || ( echo "# not found"; exit 1 )
# if installed above and OK
# we prepare to build gossamer and install it in ${basedir}/gossamer_1.0.0
# thus away from the git folder which can be deleted after build
cmake3 -DCMAKE_INSTALL_PREFIX=${basedir}/gossamer_1.0.0 \
-DCMAKE_INCLUDE_PATH=/opt/boost/include \
-DCMAKE_LIBRARY_PATH=/opt/boost/lib ..
# apparently -DCMAKE_INSTALL_PREFIX=${basedir}/gossamer_1.0.0
# decides of the final destination for the bin and docs folders
# no need to add prefix calls below
make
make test; # 100% tests passed, 0 tests failed out of 51
make install
# the gossamer apps are now in ${basedir}/gossamer_1.0.0
# you should have there a lib and bin folders
###################
# you need sudo here
###################
# add boost dynamic libraries to your system
# sudo nano /etc/profile.d/custom-profile.sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/boost/lib
# enjoy
I ran into the same error and fixed it by following the suggestion from here: https://stackoverflow.com/questions/35007134/c-boost-undefined-reference-to-boostfilesystemdetailcopy-file?answertab=votes#tab-top
In details, in src/PhysicalFileFactory.cc
replace
#include <boost/filesystem.hpp>
with
#define BOOST_NO_CXX11_SCOPED_ENUMS #include <boost/filesystem.hpp> #undef BOOST_NO_CXX11_SCOPED_ENUMS
@weihongqi What compiler did this occur with? If there's some cmake magic required to force that compiler to be C++11 compatible, then we should check that in.