#2 Build ILP64 package
Closed 2 years ago by nalimilan. Opened 3 years ago by nalimilan.
rpms/ nalimilan/suitesparse nl/64  into  master

file modified
+354 -272
@@ -36,6 +36,12 @@ 

  ### enable_csparse as 1 below.

  %global enable_csparse 0

  

+ # Whether to build a separate version of libraries linked against an ILP64 BLAS

+ # with the 64_ suffix

+ %if 0%{?__isa_bits} == 64

+ %global build64 1

+ %endif

+ 

  Name:           suitesparse

  Version:        4.4.6

  Release:        16%{?dist}
@@ -76,6 +82,13 @@ 

    SuiteSparse_config  configuration file for all the above packages.

    RBio                read/write files in Rutherford/Boeing format

  

+ %package 64_

+ Summary:        A collection of sparse matrix libraries (ILP64 version)

+ Group:          Development/Libraries

+ 

+ %description 64_

+ This package contains the suitesparse libraries compiled against an ILP64 BLAS

+ with the "64_" symbol name suffix (see openblas-*64_ packages).

  

  %package devel

  Summary:        Development headers for SuiteSparse
@@ -100,6 +113,16 @@ 

  The suitesparse-static package contains the statically linkable

  version of the suitesparse libraries.

  

+ %package static64_

+ Summary:        Static version of SuiteSparse libraries

+ Group:          Development/Libraries

+ Requires:       %{name}-devel = %{version}-%{release}

+ 

+ %description static64_

+ The suitesparse-static package contains the statically linkable

+ version of the suitesparse libraries, compiled against an ILP64 BLAS

+ with the "64_" symbol name suffix (see openblas-*64_ packages).

+ 

  %package doc

  Summary:        Documentation files for SuiteSparse

  Group:          Documentation
@@ -124,283 +147,316 @@ 

  # drop non-standard -O3 and duplicate -fexceptions from default CFLAGS

  sed -i -e '/^  CF =/ s/ -O3 -fexceptions//' SuiteSparse_config/SuiteSparse_config.mk

  

- %build

  mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR,RBio} Lib Include

  

- # SuiteSparse_config needs to come first

- pushd SuiteSparse_config

-   make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   ar x libsuitesparseconfig.a

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libsuitesparseconfig.so.%{SuiteSparse_config_major} -o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm

-     ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so.%{SuiteSparse_config_major}

-     ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so

-     cp -p ../SuiteSparse_config/*.a ./

-   popd

-   cp -p *.h ../Include

- popd

- 

- pushd AMD

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libamd.so.%{amd_version_major} -o \

-         libamd.so.%{amd_version} ../AMD/Lib/*.o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}

-     ln -sf libamd.so.%{amd_version} libamd.so

-     cp -p ../AMD/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/License.txt Doc/lesser.txt Doc/ChangeLog Doc/*.pdf ../Doc/AMD

- popd

- 

- pushd BTF

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libbtf.so.%{btf_version_major} -o \

-         libbtf.so.%{btf_version} ../BTF/Lib/*.o

-     ln -sf libbtf.so.%{btf_version} libbtf.so.%{btf_version_major}

-     ln -sf libbtf.so.%{btf_version} libbtf.so

-     cp -p ../BTF/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/* ../Doc/BTF

- popd

- 

- pushd CAMD

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libcamd.so.%{camd_version_major} -o \

-         libcamd.so.%{camd_version} ../CAMD/Lib/*.o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}

-     ln -sf libcamd.so.%{camd_version} libcamd.so

-     cp -p ../CAMD/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD

- popd

- 

- pushd CCOLAMD

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o \

-         libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}

-     ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so

-     cp -p ../CCOLAMD/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/* ../Doc/CCOLAMD

- popd

- 

- pushd COLAMD

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libcolamd.so.%{colamd_version_major} -o \

-         libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}

-     ln -sf libcolamd.so.%{colamd_version} libcolamd.so

-     cp -p ../COLAMD/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/* ../Doc/COLAMD

- popd

- 

- %if "%{?enable_metis}" == "1"

- CHOLMOD_FLAGS="$RPM_OPT_FLAGS -I%{_includedir}/metis"

- %else

- CHOLMOD_FLAGS="$RPM_OPT_FLAGS -DNPARTITION"

- %endif

- pushd CHOLMOD

-   pushd Lib

-     make CFLAGS="$CHOLMOD_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o \

-         libcholmod.so.%{cholmod_version} ../CHOLMOD/Lib/*.o \

-         -lopenblas \

-         libamd.so.%{amd_version_major} \

-         libcamd.so.%{camd_version_major} libcolamd.so.%{colamd_version_major} \

-         libccolamd.so.%{ccolamd_version_major} \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}

-     ln -sf libcholmod.so.%{cholmod_version} libcholmod.so

-     cp -p ../CHOLMOD/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD

-   cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt

-   cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt

-   cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt

-   cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt

-   cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt

- popd

- 

- %if "%{?enable_csparse}" == "1"

- pushd CSparse

-   pushd Source

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-     cp -p cs.h ../../Include

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libcsparse.so.%{csparse_version_major} -o \

-         libcsparse.so.%{csparse_version} ../CSparse/Source/*.o -lm

-     ln -sf libcsparse.so.%{csparse_version} libcsparse.so.%{csparse_version_major}

-     ln -sf libcsparse.so.%{csparse_version} libcsparse.so

-     cp -p ../CSparse/Source/*.a ./

-   popd

-   mkdir ../Doc/CSparse/

-   cp -p Doc/* ../Doc/CSparse

- popd

- 

- %else

- pushd CXSparse

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libcxsparse.so.%{cxsparse_version_major} -o \

-         libcxsparse.so.%{cxsparse_version} ../CXSparse/Lib/*.o -lm

-     ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so.%{cxsparse_version_major}

-     ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so

-     cp -p ../CXSparse/Lib/*.a ./

-   popd

-   cp -p Include/cs.h ../Include

-   mkdir ../Doc/CXSparse/

-   cp -p Doc/* ../Doc/CXSparse

- popd

+ cd ..

+ %if 0%{?build64}

+ cp -ar SuiteSparse SuiteSparse64_

  %endif

  

- pushd KLU

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libklu.so.%{klu_version_major} -o \

-         libklu.so.%{klu_version} ../KLU/Lib/*.o \

-         libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \

-         libbtf.so.%{btf_version_major} \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major}

-     ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}

-     ln -sf libklu.so.%{klu_version} libklu.so

-     cp -p ../KLU/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/lesser.txt ../Doc/KLU

- popd

- 

- pushd LDL

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libldl.so.%{ldl_version_major} -o \

-         libldl.so.%{ldl_version} ../LDL/Lib/*.o

-     ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}

-     ln -sf libldl.so.%{ldl_version} libldl.so

-     cp -p ../LDL/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL

- popd

- 

- pushd UMFPACK

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o \

-         libumfpack.so.%{umfpack_version} ../UMFPACK/Lib/*.o \

-         -lopenblas \

-         libamd.so.%{amd_version_major} \

-         libcholmod.so.%{cholmod_version_major} \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}

-     ln -sf libumfpack.so.%{umfpack_version} libumfpack.so

-     cp -p ../UMFPACK/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK

- popd

- 

- pushd SPQR

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS -DHAVE_TBB -DNPARTITION" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     g++ -shared %{?__global_ldflags} -Wl,-soname,libspqr.so.%{spqr_version_major} -o \

-         libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \

-         -lopenblas \

-         -ltbb \

-         libcholmod.so.%{cholmod_version_major} \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm

-     ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}

-     ln -sf libspqr.so.%{spqr_version} libspqr.so

-     cp -p ../SPQR/Lib/*.a ./

-   popd

-   cp -p Include/*.h* ../Include

-   cp -p README{,_SPQR}.txt

-   cp -p README_SPQR.txt Doc/* ../Doc/SPQR

- popd

- 

- pushd RBio

-   pushd Lib

-     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

-   popd

-   pushd ../Lib

-     gcc -shared %{?__global_ldflags} -Wl,-soname,librbio.so.%{rbio_version_major} -o \

-         librbio.so.%{rbio_version} ../RBio/Lib/*.o \

-         libsuitesparseconfig.so.%{SuiteSparse_config_major}

-     ln -sf librbio.so.%{rbio_version} librbio.so.%{rbio_version_major}

-     ln -sf librbio.so.%{rbio_version} librbio.so

-     cp -p ../RBio/Lib/*.a ./

-   popd

-   cp -p Include/*.h ../Include

-   cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio

- popd

+ %build

+ for BUILD64 in 0 %{?build64} ; do

+     if [ "$BUILD64" = "1" ] ; then

+         SUFFIX64="64_"

+         CFLAGS="$RPM_OPT_FLAGS -DLONGBLAS='long long' -DSUN64"

+     else

+         SUFFIX64=""

+         CFLAGS="$RPM_OPT_FLAGS"

+     fi

+ 

+     pushd ../SuiteSparse$SUFFIX64

+ 

+         # SuiteSparse_config needs to come first

+         pushd SuiteSparse_config

+           make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           ar x libsuitesparseconfig.a

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm

+             ln -sf libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_ver} libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major}

+             ln -sf libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_ver} libsuitesparseconfig$SUFFIX64.so

+             cp -p ../SuiteSparse_config/*.a ./

+           popd

+           cp -p *.h ../Include

+         popd

+ 

+         pushd AMD

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libamd$SUFFIX64.so.%{amd_version_major} -o \

+                 libamd$SUFFIX64.so.%{amd_version} ../AMD/Lib/*.o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libamd$SUFFIX64.so.%{amd_version} libamd$SUFFIX64.so.%{amd_version_major}

+             ln -sf libamd$SUFFIX64.so.%{amd_version} libamd$SUFFIX64.so

+             cp -p ../AMD/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/License.txt Doc/lesser.txt Doc/ChangeLog Doc/*.pdf ../Doc/AMD

+         popd

+ 

+         pushd BTF

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libbtf$SUFFIX64.so.%{btf_version_major} -o \

+                 libbtf$SUFFIX64.so.%{btf_version} ../BTF/Lib/*.o

+             ln -sf libbtf$SUFFIX64.so.%{btf_version} libbtf$SUFFIX64.so.%{btf_version_major}

+             ln -sf libbtf$SUFFIX64.so.%{btf_version} libbtf$SUFFIX64.so

+             cp -p ../BTF/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/* ../Doc/BTF

+         popd

+ 

+         pushd CAMD

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libcamd$SUFFIX64.so.%{camd_version_major} -o \

+                 libcamd$SUFFIX64.so.%{camd_version} ../CAMD/Lib/*.o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libcamd$SUFFIX64.so.%{camd_version} libcamd$SUFFIX64.so.%{camd_version_major}

+             ln -sf libcamd$SUFFIX64.so.%{camd_version} libcamd$SUFFIX64.so

+             cp -p ../CAMD/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD

+         popd

+ 

+         pushd CCOLAMD

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libccolamd$SUFFIX64.so.%{ccolamd_version_major} -o \

+                 libccolamd$SUFFIX64.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libccolamd$SUFFIX64.so.%{ccolamd_version} libccolamd$SUFFIX64.so.%{ccolamd_version_major}

+             ln -sf libccolamd$SUFFIX64.so.%{ccolamd_version} libccolamd$SUFFIX64.so

+             cp -p ../CCOLAMD/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/* ../Doc/CCOLAMD

+         popd

+ 

+         pushd COLAMD

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libcolamd$SUFFIX64.so.%{colamd_version_major} -o \

+                 libcolamd$SUFFIX64.so.%{colamd_version} ../COLAMD/Lib/*.o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libcolamd$SUFFIX64.so.%{colamd_version} libcolamd$SUFFIX64.so.%{colamd_version_major}

+             ln -sf libcolamd$SUFFIX64.so.%{colamd_version} libcolamd$SUFFIX64.so

+             cp -p ../COLAMD/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/* ../Doc/COLAMD

+         popd

+ 

+         %if "%{?enable_metis}" == "1"

+         CHOLMOD_FLAGS="$CFLAGS -I%{_includedir}/metis"

+         %else

+         CHOLMOD_FLAGS="$CFLAGS -DNPARTITION"

+         %endif

+         pushd CHOLMOD

+           pushd Lib

+             make CFLAGS="$CHOLMOD_FLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libcholmod$SUFFIX64.so.%{cholmod_version_major} -o \

+                 libcholmod$SUFFIX64.so.%{cholmod_version} ../CHOLMOD/Lib/*.o \

+                 -lopenblas$SUFFIX64 \

+                 libamd$SUFFIX64.so.%{amd_version_major} \

+                 libcamd$SUFFIX64.so.%{camd_version_major} libcolamd$SUFFIX64.so.%{colamd_version_major} \

+                 libccolamd$SUFFIX64.so.%{ccolamd_version_major} \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libcholmod$SUFFIX64.so.%{cholmod_version} libcholmod$SUFFIX64.so.%{cholmod_version_major}

+             ln -sf libcholmod$SUFFIX64.so.%{cholmod_version} libcholmod$SUFFIX64.so

+             cp -p ../CHOLMOD/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD

+           cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt

+           cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt

+           cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt

+           cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt

+           cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt

+         popd

+ 

+         %if "%{?enable_csparse}" == "1"

+         pushd CSparse

+           pushd Source

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+             cp -p cs.h ../../Include

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libcsparse$SUFFIX64.so.%{csparse_version_major} -o \

+                 libcsparse$SUFFIX64.so.%{csparse_version} ../CSparse/Source/*.o -lm

+             ln -sf libcsparse$SUFFIX64.so.%{csparse_version} libcsparse$SUFFIX64.so.%{csparse_version_major}

+             ln -sf libcsparse$SUFFIX64.so.%{csparse_version} libcsparse$SUFFIX64.so

+             cp -p ../CSparse/Source/*.a ./

+           popd

+           mkdir -p ../Doc/CSparse/

+           cp -p Doc/* ../Doc/CSparse

+         popd

+ 

+         %else

+         pushd CXSparse

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libcxsparse$SUFFIX64.so.%{cxsparse_version_major} -o \

+                 libcxsparse$SUFFIX64.so.%{cxsparse_version} ../CXSparse/Lib/*.o -lm

+             ln -sf libcxsparse$SUFFIX64.so.%{cxsparse_version} libcxsparse$SUFFIX64.so.%{cxsparse_version_major}

+             ln -sf libcxsparse$SUFFIX64.so.%{cxsparse_version} libcxsparse$SUFFIX64.so

+             cp -p ../CXSparse/Lib/*.a ./

+           popd

+           cp -p Include/cs.h ../Include

+           mkdir -p ../Doc/CXSparse/

+           cp -p Doc/* ../Doc/CXSparse

+         popd

+         %endif

+ 

+         pushd KLU

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libklu$SUFFIX64.so.%{klu_version_major} -o \

+                 libklu$SUFFIX64.so.%{klu_version} ../KLU/Lib/*.o \

+                 libamd$SUFFIX64.so.%{amd_version_major} libcolamd$SUFFIX64.so.%{colamd_version_major} \

+                 libbtf$SUFFIX64.so.%{btf_version_major} \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major}

+             ln -sf libklu$SUFFIX64.so.%{klu_version} libklu$SUFFIX64.so.%{klu_version_major}

+             ln -sf libklu$SUFFIX64.so.%{klu_version} libklu$SUFFIX64.so

+             cp -p ../KLU/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/lesser.txt ../Doc/KLU

+         popd

+ 

+         pushd LDL

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libldl$SUFFIX64.so.%{ldl_version_major} -o \

+                 libldl$SUFFIX64.so.%{ldl_version} ../LDL/Lib/*.o

+             ln -sf libldl$SUFFIX64.so.%{ldl_version} libldl$SUFFIX64.so.%{ldl_version_major}

+             ln -sf libldl$SUFFIX64.so.%{ldl_version} libldl$SUFFIX64.so

+             cp -p ../LDL/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL

+         popd

+ 

+         pushd UMFPACK

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,libumfpack$SUFFIX64.so.%{umfpack_version_major} -o \

+                 libumfpack$SUFFIX64.so.%{umfpack_version} ../UMFPACK/Lib/*.o \

+                 -lopenblas$SUFFIX64 \

+                 libamd$SUFFIX64.so.%{amd_version_major} \

+                 libcholmod$SUFFIX64.so.%{cholmod_version_major} \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libumfpack$SUFFIX64.so.%{umfpack_version} libumfpack$SUFFIX64.so.%{umfpack_version_major}

+             ln -sf libumfpack$SUFFIX64.so.%{umfpack_version} libumfpack$SUFFIX64.so

+             cp -p ../UMFPACK/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK

+         popd

+ 

+         pushd SPQR

+           pushd Lib

+             make CFLAGS="$CFLAGS -DHAVE_TBB -DNPARTITION" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             g++ -shared %{?__global_ldflags} -Wl,-soname,libspqr$SUFFIX64.so.%{spqr_version_major} -o \

+                 libspqr$SUFFIX64.so.%{spqr_version} ../SPQR/Lib/*.o \

+                 -lopenblas$SUFFIX64 \

+                 -ltbb \

+                 libcholmod$SUFFIX64.so.%{cholmod_version_major} \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major} -lm

+             ln -sf libspqr$SUFFIX64.so.%{spqr_version} libspqr$SUFFIX64.so.%{spqr_version_major}

+             ln -sf libspqr$SUFFIX64.so.%{spqr_version} libspqr$SUFFIX64.so

+             cp -p ../SPQR/Lib/*.a ./

+           popd

+           cp -p Include/*.h* ../Include

+           cp -p README{,_SPQR}.txt

+           cp -p README_SPQR.txt Doc/* ../Doc/SPQR

+         popd

+ 

+         pushd RBio

+           pushd Lib

+             make CFLAGS="$CFLAGS" %{?_smp_mflags}

+           popd

+           pushd ../Lib

+             gcc -shared %{?__global_ldflags} -Wl,-soname,librbio$SUFFIX64.so.%{rbio_version_major} -o \

+                 librbio$SUFFIX64.so.%{rbio_version} ../RBio/Lib/*.o \

+                 libsuitesparseconfig$SUFFIX64.so.%{SuiteSparse_config_major}

+             ln -sf librbio$SUFFIX64.so.%{rbio_version} librbio$SUFFIX64.so.%{rbio_version_major}

+             ln -sf librbio$SUFFIX64.so.%{rbio_version} librbio$SUFFIX64.so

+             cp -p ../RBio/Lib/*.a ./

+           popd

+           cp -p Include/*.h ../Include

+           cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio

+         popd

+     popd

+ done

  

  %install

- mkdir -p ${RPM_BUILD_ROOT}%{_libdir}

- mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}

- pushd Lib

-   for f in *.a *.so*; do

-     cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f

-   done

- popd

- chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*.so.*

- pushd Include

-   for f in *.h *.hpp;  do

-     cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f

-   done

- popd

- 

- # collect licenses in one place to ship as base package documentation

- rm -rf Licenses

- mkdir Licenses

- find */ -iname lesser.txt -o -iname license.txt -o -iname gpl.txt -o \

-     -iname license | while read f; do

-         b="${f%%/*}"

-         r="${f#$b}"

-         x="$(echo "$r" | sed 's|/doc/|/|gi')"

-         install -m0644 -D "$f" "./Licenses/$b/$x"

-     done

+ for BUILD64 in 0 %{?build64} ; do

+     if [ "$BUILD64" = "1" ] ; then

+         SUFFIX64="64_"

+     else

+         SUFFIX64=""

+     fi

+ 

+     pushd ../SuiteSparse$SUFFIX64

+         mkdir -p ${RPM_BUILD_ROOT}%{_libdir}

+         mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}

+         pushd Lib

+           for f in *.so*; do

+             cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f

+           done

+           for f in *.a ; do

+             cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$(echo $f | sed "s/\.a\$/$SUFFIX64.a/g")

+           done

+         popd

+         chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*.so.*

+         pushd Include

+           for f in *.h *.hpp;  do

+             cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f

+           done

+         popd

+     popd

+ done

  

- # hardlink duplicate documentation files

- hardlink -cv Docs/ Licenses/

+ pushd ../SuiteSparse

+     # collect licenses in one place to ship as base package documentation

+     rm -rf Licenses

+     mkdir Licenses

+     find */ -iname lesser.txt -o -iname license.txt -o -iname gpl.txt -o \

+         -iname license | while read f; do

+             b="${f%%/*}"

+             r="${f#$b}"

+             x="$(echo "$r" | sed 's|/doc/|/|gi')"

+             install -m0644 -D "$f" "./Licenses/$b/$x"

+         done

+ 

+     # hardlink duplicate documentation files

+     hardlink -cv Docs/ Licenses/

+ popd

  

  %check

  TESTDIRS="AMD CAMD CCOLAMD CHOLMOD COLAMD KLU LDL SPQR RBio UMFPACK"
@@ -409,13 +465,33 @@ 

  %else

  TESTDIRS="$TESTDIRS CXSparse"

  %endif

- for d in $TESTDIRS ; do

-     make -C $d/Demo CFLAGS="$RPM_OPT_FLAGS" LAPACK="" SPQR_CONFIG=-DHAVE_TBB TBB=-ltbb

+ 

+ for BUILD64 in 0 %{?build64} ; do

+     if [ "$BUILD64" = "1" ] ; then

+         SUFFIX64="64_"

+         CFLAGS="$RPM_OPT_FLAGS -DLONGBLAS='long long' -DSUN64"

+     else

+         SUFFIX64=""

+         CFLAGS="$RPM_OPT_FLAGS"

+     fi

+ 

+     pushd ../SuiteSparse$SUFFIX64

+         for d in $TESTDIRS ; do

+             make -C $d/Demo CFLAGS="$CFLAGS" BLAS=-lopenblas$SUFFIX64 LAPACK="" SPQR_CONFIG=-DHAVE_TBB TBB=-ltbb

+         done

+     popd

  done

  

  %files

  %license Licenses

  %{_libdir}/lib*.so.*

+ %exclude %{_libdir}/lib*64_.so.*

+ 

+ %if 0%{?build64}

+ %files 64_

+ %license Licenses

+ %{_libdir}/lib*64_.so.*

+ %endif

  

  %files devel

  %{_includedir}/%{name}
@@ -423,6 +499,12 @@ 

  

  %files static

  %{_libdir}/lib*.a

+ %exclude %{_libdir}/lib*64_.a

+ 

+ %if 0%{?build64}

+ %files static64_

+ %{_libdir}/lib*64_.a

+ %endif

  

  %files doc

  %doc Doc/*

Build separate suitesparse64_ and suitesparse-static64_ packages linking to an ILP64 openblas.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1294200. I need this to build Julia using an ILP64 BLAS. Without it Julia users cannot install binary packages provided by upstream, which makes the Fedora package almost useless for many workflows.

Bump. This really makes the Julia package unusable.

I don't think I like the package names. lapack uses the name "lapack64", and openblas uses basically the same, though it's like "openblas-serial64". I think being consistent with that is important.

No, this PR links to libraries from the openblas-*64_ packages, which add the "64_" suffix to symbols to avoid conflicts if a process also loads the LP64 BLAS at the same time. openblas-*64 is the version of the packages which doesn't add suffixes (and we could also provide a suitesparse64 package linking to that in the future if needed).

Bump again! This creates problems with Arpack in Julia...

I don't think I like the package names.

I don't have much of a stake in this, but I guess I agree with @orion here, albeit for different reasons. This...:

Build separate suitesparse64_ and suitesparse-static64_

...is not quite true: the PR, if applied, would add a sub-package suitesparse-64_—not suitesparse64_ (note the missing dash)—and either way, package names ending in an underscore are ugly :wink: and easily confused with similar-looking ones without an underscore. While the ship has probably sailed for the sub-packages of openblas, we should come up with a different naming scheme which is a bit more "in the face".

Unrelated to that, the PR doesn't apply cleanly anymore.

...is not quite true: the PR, if applied, would add a sub-package suitesparse-64_—not suitesparse64_ (note the missing dash)

Indeed, I forgot the dash. For openblas packages are called openblas-serial64_, openblas-threads64_ and so on.

Anyway, what name would you suggest? There's currently an effort to use the same convention for the OpenBLAS .so files across distributions, so I find it logical to use it also for SuiteSparse. And it also sounds logical to use the same suffix for the .so files and for the package name. But I don't really care about the latter...

Bump. It's too bad this has been blocked for almost a year by naming discussions...

Bump. It's too bad this has been blocked for almost a year by naming discussions...

Agreed. I can't think of a reason not to call the new subpackages suitesparse-ilp64 and suitesparse-ilp64-static, respectively, so let's just do that.

@orion, @nalimilan?

I'd be fine with "ilp64", but note that the underscore is needed: there are two variants of ILP64 libraries, one with the same names as the LP64 one, and another one with "64_" added to symbols to avoid conflicts when a library loads LP64 in a process that links to ILP64. Here I only added the latter because I only need that one for Julia, but we shouldn't block the possibility of adding the former in the future if needed.

Pull-Request has been closed by nalimilan

2 years ago