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

Workarounds for installing and building loom #3

Open
doctorpangloss opened this issue Aug 2, 2017 · 0 comments
Open

Workarounds for installing and building loom #3

doctorpangloss opened this issue Aug 2, 2017 · 0 comments

Comments

@doctorpangloss
Copy link

doctorpangloss commented Aug 2, 2017

Problem: Packages that depend on numpy and scipy may fail to install.
How do I install gcc-4.8?

Solution:

If you omit system python packages, you won't get system numpy or scipy. This may be desirable, from the loom developers point of view. So we'll install the exact version of gcc and gfortran we'd need to compile scipy and numpy from scratch.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8 gfortran-4.8 libblas-dev liblapack-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.8 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
sudo update-alternatives --config gfortran

Problem: #error This file was generated by an older version of protoc which is...

Solution:

rm include/distributions/io/schema.pb.cc
make proto_buf

Problem: ImportError: No module named dateutil.parser or contextlib2

Solution:

sudo apt-get install libfreetype6-dev libpng-dev
sudo pip install python-dateutil contextlib2 matplotlib pymetis mock pandas

Problem: distributions include dir not found or /usr/bin/ld: cannot find -ldistributions_shared while trying to install or test distributions.

Solution:

Installing just the Python package

Install distributions using setup.py first. Run with sudo if you need to install to system:

Inside the distributions directory:

export LDFLAGS="-L$(pwd)/lib"
python setup.py install

Now, you can run make install and it will correctly install the package and pass cmake_test.

Installing with the library to the system

Mysteriously, the way the build system for this project is configured, installing to system is challenging.

First, build the libraries and includes. Then add outputs to the system directories where they are expected to be found.

DISTRIBUTIONS_USE_PROTOBUF=1 make release_cc
sudo cp lib/* /usr/lib
sudo cp -r include/distributions /usr/local/include
make -j8
sudo make install

Note, on my system, a test fails with make but the python package is successfully built.

@doctorpangloss doctorpangloss changed the title Installation issues for installing loom and workarounds Workarounds for installing and building loom Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant