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

Failed to build Numpy (python package) #203

Closed
MioYvo opened this issue Mar 7, 2017 · 8 comments
Closed

Failed to build Numpy (python package) #203

MioYvo opened this issue Mar 7, 2017 · 8 comments

Comments

@MioYvo
Copy link

MioYvo commented Mar 7, 2017

>> dpkg-buildpackage -us -uc
......

OK
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_strip
strip: debian/dh-test2/usr/share/python/dh-test2/lib/python2.7/site-packages/numpy/.libs/stzkKakD: Not enough room for program headers, try linking with -N
strip:debian/dh-test2/usr/share/python/dh-test2/lib/python2.7/site-packages/numpy/.libs/stzkKakD[.gnu.hash]: Bad value
dh_strip: strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/dh-test2/usr/share/python/dh-test2/lib/python2.7/site-packages/numpy/.libs/libgfortran-ed201abd.so.3.0.0 returned exit code 1
debian/rules:4: recipe for target 'binary' failed
make: *** [binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
  • Same error with cffi, another python package.
  • Both cffi and numpy are written in C.
@jhermann
Copy link
Contributor

jhermann commented Mar 7, 2017

See #85. Also this regarding building projects with lots of extensions:

https://github.com/1and1/debianized-sentry/blob/master/debian/rules

(take note of the overrides)

@mdcroce
Copy link

mdcroce commented Mar 15, 2017

I still can't compile numpy.

Here are my debian rules.

\#!/usr/bin/make -f 

CFLAGS += -shared

export DH_VIRTUALENV_INSTALL_ROOT=/opt/venvs
SNAKE=/usr/bin/python2
EXTRA_REQUIREMENTS=--upgrade-pip --preinstall "setuptools>=17.1" --preinstall "wheel" --preinstall "numpy"


PACKAGE=$(shell dh_listpackages)
VERSION=$(shell parsechangelog | grep ^Version: | sed -re 's/[^0-9]+([^-]+).*/\1/')
DH_VENV_ARGS=  --with python-virtualenv --setuptools --python $(SNAKE) $(EXTRA_REQUIREMENTS)  --extra-pip-arg='--no-binary' --extra-pip-arg=':all:' -v 


%:
	dh $@ $(DH_VENV_ARGS) 

override_dh_strip:
	dh_strip  --exclude=cffi --exclude=symsynd --exclude=selenium

override_dh_shlibdeps:
	dh_shlibdeps -X/x86/ 

The error I get is:

    collect2: error: ld returned 1 exit status
    error: Command "/usr/bin/gfortran -Wall -g -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/usr/lib/atlas-base/atlas -L/usr/lib/atlas-base -Lbuild/temp.linux-x86_64-2.7 -llapack -lf77blas -lcblas -latlas -lf77blas -lcblas -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1
error

Can you help me?

@jhermann
Copy link
Contributor

jhermann commented Mar 16, 2017

The relevant file is control, and your build-deps are wrong. Well, most likely.

@sciyoshi
Copy link

sciyoshi commented Apr 28, 2017

This issue may have been fixed in patchelf by NixOS/patchelf#117, but wheels will need to be re-built

@jhermann
Copy link
Contributor

jhermann commented Jul 22, 2018

Take out the --nobinary option, then it builds at least on amd64 platforms.
See https://github.com/1and1/debianized-jupyterhub which packages all of the data science stack using binary wheels.

Also https://dh-virtualenv.readthedocs.io/en/latest/howtos.html#handling-binary-wheels

Can be closed.

@jhermann
Copy link
Contributor

jhermann commented Sep 4, 2018

Bump. Can still be closed. I have projects that build OK with the scipy stack.

@jhermann
Copy link
Contributor

@nailor Close it already? ;)

@nailor nailor closed this as completed Sep 30, 2018
@nailor
Copy link
Collaborator

nailor commented Sep 30, 2018

Whops, missed it. Feel free to close yourself btw too, I don't think we disagree that often if ever 😊

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

5 participants