mrakitin / SRW

Synchrotron Radiation Workshop
Other
0 stars 1 forks source link

Compilation of SRW fails on Ubuntu 14.04 x64 #14

Closed mrakitin closed 7 years ago

mrakitin commented 7 years ago
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/home/vagrant/src/mrakitin/SRW/cpp/src/lib -I/usr/include/python2.7 -c /home/vagrant/src/mrakitin/SRW/cpp/src/clients/python/srwlpy.cpp -o build/temp.linux-x86_64-2.7/home/vagrant/src/mrakitin/SRW/cpp/src/clients/python/srwlpy.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
/home/vagrant/src/mrakitin/SRW/cpp/src/clients/python/srwlpy.cpp:36:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make[1]: *** [srwlpy.so] Error 1
make[1]: Leaving directory `/home/vagrant/src/mrakitin/SRW/cpp/py'
make: *** [pylib] Error 2
mrakitin commented 7 years ago

Can be related to https://github.com/samoylv/WPG/issues/89.

mrakitin commented 7 years ago

Installation of the python-dev should fix the issue:

vagrant@vagrant-ubuntu-trusty-64:~/src/mrakitin/SRW$ sudo apt install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libexpat1-dev libpython-dev libpython2.7-dev python2.7-dev
The following NEW packages will be installed:
  libexpat1-dev libpython-dev libpython2.7-dev python-dev python2.7-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.4 MB of archives.
After this operation, 35.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libpython2.7-dev amd64 2.7.6-8ubuntu0.2 [22.0 MB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main libpython-dev amd64 2.7.5-5ubuntu3 [7,078 B]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main python2.7-dev amd64 2.7.6-8ubuntu0.2 [269 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main python-dev amd64 2.7.5-5ubuntu3 [1,166 B]
Fetched 22.4 MB in 3s (6,158 kB/s)
Selecting previously unselected package libexpat1-dev:amd64.
(Reading database ... 64905 files and directories currently installed.)
Preparing to unpack .../libexpat1-dev_2.1.0-4ubuntu1.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../libpython2.7-dev_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.6-8ubuntu0.2) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../libpython-dev_2.7.5-5ubuntu3_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.5-5ubuntu3) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking python2.7-dev (2.7.6-8ubuntu0.2) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.5-5ubuntu3_amd64.deb ...
Unpacking python-dev (2.7.5-5ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
Setting up libpython2.7-dev:amd64 (2.7.6-8ubuntu0.2) ...
Setting up libpython-dev:amd64 (2.7.5-5ubuntu3) ...
Setting up python2.7-dev (2.7.6-8ubuntu0.2) ...
Setting up python-dev (2.7.5-5ubuntu3) ...