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

Building Cython-based G-Code parser requires python-dev package. #763

Closed
ghpenguin opened this issue Aug 20, 2016 · 1 comment
Closed

Building Cython-based G-Code parser requires python-dev package. #763

ghpenguin opened this issue Aug 20, 2016 · 1 comment

Comments

@ghpenguin
Copy link

Hi,

When I ran the following command, it complained pyconfig.h is missing in raspbian jessie Linux.
Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux

$ python setup.py build_ext --inplace
WARNING:root:Memory-efficient GCoder implementation unavailable: No module named gcoder_line
running build_ext
building 'printrun.gcoder_line' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c printrun/gcoder_line.c -o build/temp.linux-armv7l-2.7/printrun/gcoder_line.o
printrun/gcoder_line.c:8:22: fatal error: pyconfig.h: No such file or directory
 #include "pyconfig.h"

pyconfig.h exist according to the search result.

$ find / -name pyconfig.h 2>/dev/null
/usr/include/python3.4m/pyconfig.h
/usr/include/x86_64-linux-gnu/python3.4m/pyconfig.h
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h
/usr/include/python2.7/pyconfig.h

After installation python-dev package

aptitude install python-dev
The following NEW packages will be installed:
  libexpat1-dev{a} libpython-dev{a} libpython2.7-dev{a} python-dev
  python2.7-dev{a}
The following packages will be upgraded:
  libexpat1

It successfully built the gcoder_line module.

python setup.py build_ext --inplace
WARNING:root:Memory-efficient GCoder implementation unavailable: No module named gcoder_line
running build_ext
building 'printrun.gcoder_line' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c printrun/gcoder_line.c -o build/temp.linux-armv7l-2.7/printrun/gcoder_line.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/printrun/gcoder_line.o -o /home/pi/3D-Printer/Printrun/printrun/gcoder_line.so

In my Devuan Linux system, it built the module successfully as I expected.
Linux dv1-station1 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

python setup.py build_ext --inplace
Compiling printrun/gcoder_line.pyx because it changed.
Cythonizing printrun/gcoder_line.pyx
WARNING:root:Memory-efficient GCoder implementation unavailable: No module named gcoder_line
running build_ext
building 'printrun.gcoder_line' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/printrun
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c printrun/gcoder_line.c -o build/temp.linux-x86_64-2.7/printrun/gcoder_line.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/printrun/gcoder_line.o -o /home/penguin/old_penguin/Workshop/3D_Printer/Kossel_Mini/Pronterface/printrun/gcoder_line.so

@rockstorm101
Copy link
Collaborator

I can confirm this issue, libpython-dev is needed to build the optimized gcode parser in Debian/Ubuntu systems.

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

2 participants