nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Header files not included in apt package

Open clinssen opened this issue 1 year ago • 2 comments

When NEST is installed via apt install, the C++ header files are not installed on the system, which means that user extension (NESTML) modules cannot be built.

We should check that adding the .h files allows NESTML modules to build correctly.

clinssen avatar Sep 22 '23 09:09 clinssen

Hi @clinssen Could you check if they are not installed in /usr/include/nest/?

steffengraber avatar Sep 22 '23 11:09 steffengraber

I tried the NEST apt package with nestml and did the following:

  1. log into a clean Ubuntu 22.04.3

  2. install NEST 3.6 with apt

sudo add-apt-repository ppa:nest-simulator/nest
sudo apt-get update 
sudo apt install nest
source /usr/bin/nest_vars
  1. edit /usr/bin/nest-config according https://nestml.readthedocs.io/en/latest/installation.html#anaconda-installation

  2. install latest development nestml as described in the documentation

git clone https://github.com/nest/nestml
cd nestml/
python3 setup.py install
  1. download https://raw.githubusercontent.com/nest/nestml/master/doc/tutorials/izhikevich/izhikevich_task.nestml

  2. create python file to build

import matplotlib.pyplot as plt
import nest
import numpy as np
import os

from pynestml.codegeneration.nest_code_generator_utils import NESTCodeGeneratorUtils

module_name, neuron_model_name = \
    NESTCodeGeneratorUtils.generate_code_for("izhikevich_solution.nestml")
  1. needed some dependencies sudo apt install cmake libopenmpi-dev libreadline-dev

  2. build python3 buildnestml.py

This ends into this:

...
[100%] Built target nestml_a52ec4cd50eb4517842a4f606050a8d4_module_module
Install the project...
-- Install configuration: ""
-- Installing: /usr/lib/nest/nestml_a52ec4cd50eb4517842a4f606050a8d4_module.so
CMake Error at cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/workspaces/nest-apt_nestml/target/nestml_a52ec4cd50eb4517842a4f606050a8d4_module.so"
  to "/usr/lib/nest/nestml_a52ec4cd50eb4517842a4f606050a8d4_module.so":
  Permission denied.

Doing everything as root works fine!

@clinssen @pnbabu Do you have another example that might better illustrate the problem?

steffengraber avatar Oct 20 '23 11:10 steffengraber