bluesky / libhkl

Build the hkl library for hklpy
https://people.debian.org/~picca/hkl/hkl.html
GNU General Public License v3.0
1 stars 1 forks source link

BUGFIX: use compatible GSL library #21

Closed prjemian closed 3 months ago

prjemian commented 3 months ago

The libhkl library should use libgsl compatible with both build and conda.

prjemian commented 3 months ago

The compilation of gsl proceeds with GSL_VERSION='2.7'. The first diversion occurs with the use of libtool here:

#11 177.7 /bin/bash ./libtool  --tag=CC   --mode=link gcc  -g -O2  -version-info 26:0:1  -o libgsl.la -rpath /usr/lib version.lo  block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la bst/libgslbst.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la filter/libgslfilter.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multifit_nlinear/libgslmultifit_nlinear.la multilarge/libgslmultilarge.la multilarge_nlinear/libgslmultilarge_nlinear.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la movstat/libgslmovstat.la rstat/libgslrstat.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la spmatrix/libgslspmatrix.la spblas/libgslspblas.la splinalg/libgslsplinalg.la -lm 
#11 178.0 libtool: link: gcc -shared  -fPIC -DPIC  .libs/version.o  -Wl,--whole-archive block/.libs/libgslblock.a blas/.libs/libgslblas.a bspline/.libs/libgslbspline.a bst/.libs/libgslbst.a complex/.libs/libgslcomplex.a cheb/.libs/libgslcheb.a dht/.libs/libgsldht.a diff/.libs/libgsldiff.a deriv/.libs/libgslderiv.a eigen/.libs/libgsleigen.a err/.libs/libgslerr.a fft/.libs/libgslfft.a filter/.libs/libgslfilter.a fit/.libs/libgslfit.a histogram/.libs/libgslhistogram.a ieee-utils/.libs/libgslieeeutils.a integration/.libs/libgslintegration.a interpolation/.libs/libgslinterpolation.a linalg/.libs/libgsllinalg.a matrix/.libs/libgslmatrix.a min/.libs/libgslmin.a monte/.libs/libgslmonte.a multifit/.libs/libgslmultifit.a multifit_nlinear/.libs/libgslmultifit_nlinear.a multilarge/.libs/libgslmultilarge.a multilarge_nlinear/.libs/libgslmultilarge_nlinear.a multimin/.libs/libgslmultimin.a multiroots/.libs/libgslmultiroots.a ntuple/.libs/libgslntuple.a ode-initval/.libs/libgslodeiv.a ode-initval2/.libs/libgslodeiv2.a permutation/.libs/libgslpermutation.a combination/.libs/libgslcombination.a multiset/.libs/libgslmultiset.a poly/.libs/libgslpoly.a qrng/.libs/libgslqrng.a randist/.libs/libgslrandist.a rng/.libs/libgslrng.a roots/.libs/libgslroots.a siman/.libs/libgslsiman.a sort/.libs/libgslsort.a specfunc/.libs/libgslspecfunc.a movstat/.libs/libgslmovstat.a rstat/.libs/libgslrstat.a statistics/.libs/libgslstatistics.a sum/.libs/libgslsum.a sys/.libs/libgslsys.a test/.libs/libgsltest.a utils/.libs/libutils.a vector/.libs/libgslvector.a cdf/.libs/libgslcdf.a wavelet/.libs/libgslwavelet.a spmatrix/.libs/libgslspmatrix.a spblas/.libs/libgslspblas.a splinalg/.libs/libgslsplinalg.a -Wl,--no-whole-archive  -lm  -g -O2   -Wl,-soname -Wl,libgsl.so.25 -o .libs/libgsl.so.25.1.0

This writes new content with version 2.5 in ./.libs/:

root@797edd07a150:/home/gsl# ll .libs
total 40M
-rwxr-xr-x 1 root root  22K Jul 16 14:43 gsl-histogram*
-rwxr-xr-x 1 root root  69K Jul 16 14:43 gsl-randist*
-rw-r--r-- 1 root root  25M Jul 16 15:49 libgsl.a
lrwxrwxrwx 1 root root   12 Jul 16 15:49 libgsl.la -> ../libgsl.la
-rw-r--r-- 1 root root  927 Jul 16 15:49 libgsl.lai
lrwxrwxrwx 1 root root   16 Jul 16 15:49 libgsl.so -> libgsl.so.25.1.0*
lrwxrwxrwx 1 root root   16 Jul 16 15:49 libgsl.so.25 -> libgsl.so.25.1.0*
-rwxr-xr-x 1 root root  15M Jul 16 15:49 libgsl.so.25.1.0*
-rw-r--r-- 1 root root 2.5K Jul 16 15:46 version.o
prjemian commented 3 months ago

@mrakitin @padraic-shafer This BUGFIX (with doc re-org) is ready for review now.

prjemian commented 3 months ago

As noted:

Summary

Root causes:

image

prjemian commented 3 months ago

@padraic-shafer @mrakitin Ready for review again. I'd like to merge by tomorrow.