Dnia 2010-10-12, wto o godzinie 01:00 +0200, Jakub Wilk pisze: > * Evgeni Golov <evg...@debian.org>, 2010-10-11, 18:54: > >this one is "funny". setuptools uses python's os.uname() to check which > >arch it is running on, and where the temp-build-path is. This fails > >nicely on machines with 64bit-kernel and 32bit-userland (at least amd64, > >as it has x86_86 in uname, as the kernel is for x86_64). > > > >In this particular bug, it's not 64 vs 32 bit, but i686 vs i486, quoting > >the build-log: > >> g++ -pthread -shared -Wl,-Bsymbolic-functions -g -O2 > >build/temp.linux-i686-2.6/src/wrapper/wrap_cl.o > >build/temp.linux-i686-2.6/src/wrapper/wrap_cl_part_1.o > >build/temp.linux-i686-2.6/src/wrapper/wrap_cl_part_2.o > >build/temp.linux-i686-2.6/src/wrapper/wrap_constants.o > >-lboost_python-py26 -lOpenCL -o build/lib.linux-i686-2.6/pyopencl/_cl.so > >> PYTHONPATH=../build/lib.linux-i486-2.6/ /usr/bin/make -C doc html > > > >the stuff is built in build/lib.linux-i686-2.6/, but PYTHONPATH is set > >to build/lib.linux-i486-2.6/. This is done in debian/rules: > >PYTHONPATH=../build/lib.$(DEB_BUILD_ARCH_OS)-$(DEB_BUILD_GNU_CPU)-$(firstword > >$(PYVERS)) > > There's another problem here: DEB_BUILD_* variables are used, but they > are not defined anywhere. The code in question works only thanks to > dpkg-buildpackage exporting these variables. It will fail (on any > architecture) if debian/rules is run by hand. > > >$(DEB_BUILD_GNU_CPU) is wrong here, as is expands correctly to i486 > >(even on amd64 kernel with a i386 chroot). > >I fear we have to "parse" `uname -m` here, to fix that issue and match > >setuptools' algorithm. > > The idiomatic approach to this problem is to use wildcards. >
I used PYTHONPATH=../build/lib.$(DEB_BUILD_ARCH_OS)-$(DEB_BUILD_GNU_CPU)-$(firstword$(PYVERS)) because I build library for all python versions (here 2.5 and 2.6) Using wildcard would mean that I do not have control over which library will be given to python - risking that python2.6 will get library 2.5. I have changed this to PYTHONPATH=../build/lib.*-*-$(firstword $(PYVERS)) and it works on my machine. Please test whether it work on i386. Version with fixes for all opened bugs: #599785, #599873, #599874, #599875 is on: http://www.bogomips.w.tkb.pl/cuda/pyopencl_0.92-1.dsc I am waiting for decision of release team whether to put new upstream version (with packaging fixes) or fix existing one. After decision is made I will ask for sponsorship. -- Tomasz Rybak <bogom...@post.pl> GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
signature.asc
Description: This is a digitally signed message part