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

NEST compiles without Python bindings on Travis CI #1365

Closed
Helveg opened this issue Dec 12, 2019 · 8 comments
Closed

NEST compiles without Python bindings on Travis CI #1365

Helveg opened this issue Dec 12, 2019 · 8 comments
Assignees
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Discussion Still searching for the right way to proceed / suggestions welcome ZC: Infrastructure DO NOT USE THIS LABEL ZP: In progess DO NOT USE THIS LABEL

Comments

@Helveg
Copy link
Contributor

Helveg commented Dec 12, 2019

Hi, because of #1332 I've switched from Semaphore CI to Travis CI, where NEST does compile, but for some reason it doesn't add the Python bindings. The only relevant error in the build log I could find seems to be this:

-- Could NOT find GSL (missing: GSL_INCLUDE_DIR GSL_LIBRARY GSL_CBLAS_LIBRARY) (found version "")
-- Found PythonInterp: /home/travis/virtualenv/python3.7.1/bin/python3 (found suitable version "3.7.1", minimum required is "3") 
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.7.1")

Could this cause CMake to decide to compile without Python support?

Built-in modules    : models;precise;topology
User modules        : None
Python bindings     : No
Use threading       : Yes (OpenMP: -fopenmp)
Use GSL             : No
Use Readline        : Yes (GNU Readline 6.3)
    Includes        : /usr/include
    Libraries       : /usr/lib/x86_64-linux-gnu/libreadline.so;/usr/lib/x86_64-linux-gnu/libncurses.so

How could this be resolved?

The compile commands are:

sudo apt-get install -y build-essential cmake cython libgsl-dev libltdl-dev libncurses-dev libreadline-dev python3-all-dev python3-numpy python3-scipy python3-matplotlib python3-nose openmpi-bin libopenmpi-dev
wget https://github.com/nest/nest-simulator/archive/v$NEST_VERSION.tar.gz -O nest-simulator-$NEST_VERSION.tar.gz
tar -xzf nest-simulator-$NEST_VERSION.tar.gz
mkdir nest-simulator-$NEST_VERSION-build
mkdir nest-install-$NEST_VERSION
cd nest-simulator-$NEST_VERSION-build

cmake -Dwith-python=3 -DCMAKE_INSTALL_PREFIX:PATH=/home/travis/nest-$NEST_VERSION /home/travis/nest-simulator-$NEST_VERSION
make
make install
make installcheck
source /home/travis/nest-$NEST_VERSION/bin/nest_vars.sh

And I've pasted the full log here

@Helveg
Copy link
Contributor Author

Helveg commented Dec 12, 2019

I was excited to see the updated installation instructions, but the nest installation from the PPA also installs without Python bindings.

@Helveg
Copy link
Contributor Author

Helveg commented Dec 12, 2019

Now that I managed to find the right Python executables/includes and libraries (using the 3.5 library because Travis doesn't really seem to have the right 3.7 library, it uses pyenv shims (?) ) it just throws a duplicate of #1332.

Perhaps this thread shines some light on the issue: mcfletch/pyopengl#11

@lekshmideepu
Copy link
Contributor

We also had the same problem in finding the python libraries and includes in Travis workers and I set the path explicitly like here. As you said, you were able to find the libraries and headers, hope that your problem has been solved.

@lekshmideepu lekshmideepu self-assigned this Dec 12, 2019
@lekshmideepu lekshmideepu added the ZC: Infrastructure DO NOT USE THIS LABEL label Dec 12, 2019
@Helveg
Copy link
Contributor Author

Helveg commented Dec 12, 2019

Ok thanks @lekshmideepu, I was using a different include dir and library file. But so NEST is untested on Python 3.7? Because reverting to 3.6 on Travis fixed the PyThreadState errors on Travis, but not on Semaphore ... If the cmake version is recent enough the errors become exactly the same as in the external issue I linked.

@Helveg
Copy link
Contributor Author

Helveg commented Dec 12, 2019

I'm not familiar with the issue or frameworks used to build NEST but the last post in pytries/DAWG#40 might also help solve the problem in the pynestkernel? There's many occurences of the mentioned except + statement there.

@Silmathoron
Copy link
Member

Just to mention that I'm using NEST fine on Python 3.7/3.8. The except + statement means that Cython will intercept thrown errors, convert them to Python errors, then throw them to have a proper termination and not a segfault crash and burn, not sure it's related to anything here...

@Helveg
Copy link
Contributor Author

Helveg commented Dec 12, 2019 via email

@terhorstd terhorstd added I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) ZP: In progess DO NOT USE THIS LABEL S: Normal Handle this with default priority T: Discussion Still searching for the right way to proceed / suggestions welcome labels Jan 6, 2020
@terhorstd
Copy link
Contributor

reported as fixed by user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Discussion Still searching for the right way to proceed / suggestions welcome ZC: Infrastructure DO NOT USE THIS LABEL ZP: In progess DO NOT USE THIS LABEL
Projects
None yet
Development

No branches or pull requests

4 participants