On 10/25/20 12:22 PM, Jason Bacon wrote:
wip/cblas builds fine on CentOS, but produces the following on NetBSD: => Checking for missing run-time search paths in cblas-3.9.0 ERROR: lib/libcblas.so.3.9.0: missing library: libgfortran.so.3 *** Error code 1 Stop. bmake.bin[1]: stopped in /home/bacon/Pkgsrc/pkgsrc/wip/cblas *** Error code 1 Stop. bmake.bin: stopped in /home/bacon/Pkgsrc/pkgsrc/wip/cblas The following hack alleviates the problem: --- a/cblas/Makefile +++ b/cblas/Makefile @@ -9,6 +9,7 @@ LAPACK_COMPONENT_CMAKE_ARGS= \ -DLAPACK_LIBRARIES=${LAPACK_LIBS:Q} \ -DCBLAS=ON -DLAPACKE=OFF \ -DCMAKE_VERBOSE=ON +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/gcc5/lib .include "../../mk/blas.buildlink3.mk" .include "../../math/lapack/Makefile.common"I'm thinking mk/compilers/gcc.mk should be adding this to LDFLAGS. Am I wrong?Thanks, JB
I verified that rpath is added for the gcc prefix to the link command on CentOS:
/home/bacon/Pkgsrc/pkgsrc/wip/cblas/work/.cwrapper/bin/cc -fPIC -O2 -I/home/bacon/Pkgsrc/pkg/include -I/usr/include -DNDEBUG -L/home/bacon/Pkgsrc/pkg/gcc8/lib/gcc/x86_64-redhat-linux/8.4.0 -Wl,-R/home/bacon/Pkgsrc/pkg/gcc8/lib/gcc/x86_64-redhat-linux/8.4.0 -L/home/bacon/Pkgsrc/pkg/gcc8/lib64 -Wl,-R/home/bacon/Pkgsrc/pkg/gcc8/lib64 -L/home/bacon/Pkgsrc/pkg/lib -Wl,-R/home/bacon/Pkgsrc/pkg/lib -L/usr/lib64 -Wl,-R/usr/lib64 -shared -Wl,-soname,libcblas.so.3 -o ../../lib/libcblas.so.3.9.0 CMakeFiles/cblas.dir/cblas_srotg.c.o ...
But not on NetBSD:/home/bacon/Pkgsrc/pkgsrc/wip/cblas/work/.cwrapper/bin/cc -fPIC -O2 -D_FORTIFY_SOURCE=2 -I/home/bacon/Pkgsrc/pkg/include -I/usr/include -DNDEBUG -L/home/bacon/Pkgsrc/pkg/lib -Wl,-R/home/bacon/Pkgsrc/pkg/lib -L/usr/lib -Wl,-R/usr/lib -shared -Wl,-soname,libcblas.so.3 -o ../../lib/libcblas.so.3.9.0 CMakeFiles/cblas.dir/cblas_srotg.c.o ...