This shadows the regular fixDarwinDylibNames function, which is a
nativeBuildInput, and prevents it from converting some relative paths to
absolute. According to the comment this can be removed as of 5.7.2.
This is a better name since we have multiple 64-bit things that could
be referred to.
LP64 : integer=32, long=64, pointer=64
ILP64 : integer=64, long=64, pointer=64
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.
treewide: cleanup from blas/lapack changes
A few issues in the original treewide:
- can’t assume blas64 is a bool
- unused commented code
* Switch to default buildPhase & installPhase
* In preConfigure
* Do not add -DNPARTITION to CHOLMOD_CONFIG. That would disable the use of Metis but we already have that.
* Do not remove -lrt on Darwin, Darwin compiler can handle that and the code no longer exists anyway.
* With CUDA enabled
* Do not replace CUDA_ROOT. It does not exist any more. Instead we are setting CUDA_PATH in makeFlags.
* Do not replace GPU_BLAS_PATH, it defaults to CUDA_PATH so it will end up with the same value.
* Do not add -DCHOLMOD_OMP_NUM_THREADS to GPU_CONFIG. Why would be having the library use the same number of threads as the builder a good idea?
* Do not replace CUDA_PATH, we are setting it in makeFlags now.
* Do not replace CUDART_LIB and CUBLAS_LIB. They were being replaced incorrectly (cuda libs are located in lib directory, not lib64). Instead set the correct paths in makeFlags.
* Do not replace CUDA_INC_PATH. Its default looks like it will end up with the same value.
* Do not replace NV20, NV30, NV35 – not used any more.
* Do not replace NVCC, defaults to the same.
* Do not replace NVCCFLAGS, we just used the default from SourceSparse 4.4.7 with -gencode=arch=compute_60,code=compute_60 tacked on top. Current upstream default looks much better.
* Stop adding -DNTIMER to CFLAGS on Darwin – clock_gettime is supported by macOS 10.12 SDK.
* In buildPhase
* Move the make arguments to makeFlags and library to buildFlags, allowing us to drop the manual make call. I did not verify all of these are still needed.
* Remove the creation of libsuitesparse.so. As far as I could tell it is some kind of remnant of our old expression – perhaps due to past deficiencies of the build scripts, we created the individual libraries as symlinks to libsuitesparse.so: e36b3ec0a5 But since the build script can now build individual .so libraries, there should be no need for this abomination. No other distros do this either.
* In installPhase
* No need to copy things manually, there is an install target. We just need to pass INSTALL=$out flag to make to let it know where to install the files.
* I do not have means of verifying the darwin dylib name fix but it looks like it might be fixed in an upcoming release.
* I dropped the rpath fixup as it does not seem to be needed any more (ldd does not report any unresolved libraries).
* Split to multiple outputs
* Fetch source from GitLab (the only source for future releases)
* Re-order attrset to be more idiomatic
* Format with nixpkgs-fmt
Suitesparse libraries would end up containing references to the build
directory. fixDarwinDylibNames appears to not fix this problem. We
manually use intall_name_tool to set the library paths correctly.
The build created libraries with an install_name that points to the
build directory instead of the installation prefix. Causing errors like
this when other packages try to link against it's libraries.
Library not loaded: /private/tmp/nix-build-suitesparse-5.3.0.drv-0/SuiteSparse/lib/libcholmod.3.0.12.dylib