Le lundi, 30 janvier 2023, 18.59:04 h CET Andreas Beckmann a écrit : > On 28/01/2023 18.09, Didier 'OdyX' Raboud wrote: > > So. I have a much shorter (and better) patch, that I'll upload to > > DELAYED/5 in few minutes. > > Thanks alot.
No problem. Should I push it to unstable? > There is now a new lintian error (not caused by your patch, > but by some changed B-D). Since you were looking into > the python building bits, perhaps you have an idea where this > is originating from? Notice the difference lib vs. lib64 The code in setup.py does non-Debian stuff around guessing library paths. A possible patch is attached, I've also pushed it on a branch: https://salsa.debian.org/science-team/pyhst2/-/merge_requests/2 I have no idea if the resulting package works though. Best, OdyX
Drop all CUDA-specific library path search Fixes the superfluous /usr/lib or /usr/lib64 paths in RUNPATH Author: Didier Raboud <o...@debian.org> Origin: vendor --- a/setup.py +++ b/setup.py @@ -261,15 +261,6 @@ def do_pyhst(): cudaconfig = {'home':home, 'nvcc':nvcc, 'include': pjoin(home, 'include')} - lib = pjoin(home, 'lib') - if os.path.exists(lib+"64") and math.log(sys.maxsize)/math.log(2) > 60: ## sys.maxint == 2**63-1: - cudaconfig["lib"] = lib+"64" - elif os.path.exists(lib+"32") and math.log(sys.maxsize)/math.log(2) < 60: - cudaconfig["lib"] = lib+"32" - elif os.path.exists(lib): - cudaconfig["lib"] = lib - else: - print(("No cuda library found !!!!")) for key, val in cudaconfig.items(): if not os.path.exists(val): raise EnvironmentError('The CUDA %s path could not be located in %s' % (key, val)) @@ -469,9 +460,7 @@ def do_pyhst(): module = Extension('PyHST2_'+version+'/libgputomo', sources=sources, - library_dirs=[CUDA['lib']], libraries=['cudart', "cublas", "cuda", "cufft", hdf5_lib], - runtime_library_dirs=[CUDA['lib']], # this syntax is specific to this build system # we're only going to use certain compiler args with nvcc and not with gcc # the implementation of this trick is in customize_compiler() below @@ -495,11 +484,8 @@ def do_pyhst(): module = Extension(name='PyHST2_'+version+'.unsharp3D', sources=sources , depends=[], - library_dirs=[CUDA['lib']], libraries=['cudart','QtGui','QtCore','cudart','tiff'], - runtime_library_dirs=[CUDA['lib']], - extra_compile_args={'gcc': ["-std=c99","-g","-fPIC", "-O3","-Wall"], 'nvcc': CUDA["arch"] + [ "--compiler-options", "-fPIC", "-O3", "-g","-D_FORCE_INLINES" ]}, include_dirs=[numpy.get_include(), CUDA['include'], 'PyHST/Cspace',"/usr/include/qt4"] ) @@ -518,9 +504,7 @@ def do_pyhst(): global version module = Extension('PyHST2_'+version+'/libprojection', sources=["PyHST/Cspace/c_hst_project_1over.cu"], - library_dirs=[CUDA['lib']], libraries=['cudart', "cuda", "cufft"], - runtime_library_dirs=[CUDA['lib']], extra_compile_args={'gcc': ["-fPIC", "-O3"], 'nvcc': CUDA["arch"] + ["--compiler-options", "-fPIC,-O3" ,"-D_FORCE_INLINES"]}, include_dirs=[numpy.get_include(), CUDA['include'], 'PyHST/Cspace']+ hdf5_dirs) @@ -542,9 +526,7 @@ def do_pyhst(): module = Extension('PyHST2_'+version+'/libwavelets', sources=sources, - library_dirs=[CUDA['lib']], libraries=["cudart", "cuda", "cublas"], - runtime_library_dirs=[CUDA['lib']], extra_compile_args={'gcc': ["-fPIC", "-O3"], 'nvcc': CUDA["arch"] + ["--compiler-options", "-fPIC,-O3" ,"-D_FORCE_INLINES"]}, include_dirs=[numpy.get_include(), CUDA['include'], 'PyHST/Cspace'])
signature.asc
Description: This is a digitally signed message part.