Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus-0.5.2-beta does not compile, Centos 6.9 #43

Closed
jbsysadmin opened this issue Dec 12, 2018 · 10 comments
Closed

octopus-0.5.2-beta does not compile, Centos 6.9 #43

jbsysadmin opened this issue Dec 12, 2018 · 10 comments
Assignees

Comments

@jbsysadmin
Copy link

Greetings. We can't get this build process to work. Version octopus-0.5.2-beta. At milestone "[ 26%]", the output includes many of these errors:

/usr/local/boost_1_68_0/include/boost/container/detail/flat_tree.hpp:924:25: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));

The environment includes source builds gcc-6.4.0, binutils 2.29.1, htslib 1.8, python 3.6.1.
The build call resembled: ./scripts/install.py --cxx_compiler /usr/local/gcc-6.4.0/bin/gcc --prefix /usr/local/octopus-0.5.2-beta/bin

Do you have any leads?

@dancooke dancooke self-assigned this Dec 13, 2018
@dancooke
Copy link
Member

Hi, thanks for your interest in Octopus. Please could you confirm how Boost was installed? It would also be helpful if you could post the entire output from your installation attempt.

@jbsysadmin
Copy link
Author

jbsysadmin commented Dec 13, 2018 via email

@jbsysadmin
Copy link
Author

jbsysadmin commented Dec 13, 2018 via email

@dancooke
Copy link
Member

Hi,

I've successfully build Octopus v0.5.2-beta with GCC 8.2 and Boost 1.68, so the problem is certainly with your GCC or Boost installation.

It's strange that your GNU C++ 6.4 compiler installation is /usr/local/gcc-6.4.0/bin/gcc, as gcc usually refers to the C compiler rather than the C++ compiler (g++ is normally used for the C++ compiler).

Assuming that you installed the GCC 8.2 C++ compiler in /usr/local/gcc-8.2.0/bin/g++, could you please post the output from

/usr/local/gcc-8.2.0/bin/g++ -v

Please also try to install Boost with the following (after completely removing your previous installs):

cd /tmp
wget -O boost_1_68_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.68.0/boost_1_68_0.tar.gz/download
tar xzvf boost_1_68_0.tar.gz
cd boost_1_68_0
echo "using gcc : 8.2 : /usr/local/gcc-8.2.0/bin/g++ ; " >> tools/build/src/user-config.jam
./bootstrap.sh --prefix=/usr/local --without-libraries=python,mpi
./b2 -j2 toolset=gcc-8.2 cxxflags="-std=c++14"
./b2 install

Note that you will need to change the g++ path if I guessed incorrectly.

@jbsysadmin
Copy link
Author

jbsysadmin commented Dec 14, 2018 via email

@dancooke
Copy link
Member

I've been trying to replicate your error in a CentOS 6.9 Docker container but have not been able to. I did however run into other problems with compilation due to the compiler emitting unrecognised instructions, suggesting that GCC was not installed correctly. I did not encounter any of these problems with CentOS 7.

I finally managed to install Octopus in a fresh CentOS 6.9 Docker container using Linuxbrew to install dependencies. For example, the following works:

docker run -it --rm centos:6.9

## Initial installs
yum -y update
yum install -y which yum-utils gcc gcc-c++ make wget git autoconf openssl bzip2.x86_64 bzip2 ca-certificates curl file fonts-dejavu-core locales openssh-client patch sudo uuid-runtime

## Add and switch to non-root sudo user (for Linuxbrew install)
localedef -i en_US -f UTF-8 en_US.UTF-8 && useradd -m -s /bin/bash linuxbrew && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
sudo su - linuxbrew

## Install Linuxbrew
git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
PATH="$HOME/.linuxbrew/bin:$PATH"

## Install Octopus dependencies with Linuxbrew
brew install git python gcc@8 cmake boost htslib

## Install Octopus
git clone -b master https://github.com/luntergroup/octopus.git
cd octopus
export HTSLIB_ROOT=~/.linuxbrew
./scripts/install.py --threads 3 -c ~/.linuxbrew/Cellar/gcc@8/8.2.0/bin/gcc-8 -cxx ~/.linuxbrew/Cellar/gcc@8/8.2.0/bin/g++-8 --boost ~/.linuxbrew

I would recommend that you do the same.

@dancooke
Copy link
Member

Hi, I've improved the installation script so that it can optionally install all of Octopus' dependencies into the build directory using Homebrew (as shown above). This is available on the develop branch (I'll add to next release). You should just be able to use

$ git clone https://github.com/luntergroup/octopus.git
$ octopus/scripts/install.py --install-dependencies

to cleanly install Octopus. Let me know if you have any issues.

@dancooke
Copy link
Member

I'm closing this as I believe the new installation procedure resolves the issue. Please re-open if not.

@jbsysadmin
Copy link
Author

jbsysadmin commented Jan 2, 2019 via email

@jbsysadmin
Copy link
Author

jbsysadmin commented Jan 2, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants