pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: missing library: libgfortran.so.3 on NetBSD



On 10/26/20 8:51 AM, Jason Bacon wrote:
On 10/25/20 8:14 PM, Chavdar Ivanov wrote:
With

PKGSRC_FORTRAN=gfortran
GFORTRAN_VERSION=8

in my mk.conf under -current from today it builds fine for me.
However, I do not understand why I get:

  ldd /usr/pkg/lib/libcblas.so.3.9.0
/usr/pkg/lib/libcblas.so.3.9.0:
         -lblas.3 => /usr/pkg/lib/libblas.so.3
         -lgfortran.5 => /usr/pkg/gcc8/lib/./libgfortran.so.5
         -lquadmath.0 => /usr/pkg/gcc8/lib/./libquadmath.so.0
         -lm.0 => /usr/lib/libm.so.0
         -lc.12 => /usr/lib/libc.so.12
         -lz.1 => /usr/lib/libz.so.1
         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
         -lgfortran.5 => not found
         -lquadmath.0 => not found

Why are there double entries of libgfortran and libquadmath?


Do you have PKGSRC_DEVELOPER set?  Pkgsrc won't perform the check otherwise.



If I set GFORTRAN_VERSION=8 and PKGSRC_DEVELOPER=yes, I get the following, which I think matches your results:

=> Automatic manual page handling
=> Generating post-install file lists
=> Checking file-check results for cblas-3.9.0
=> Checking for non-existent script interpreters in cblas-3.9.0
=> Checking file permissions in cblas-3.9.0
=> Checking for missing run-time search paths in cblas-3.9.0
ERROR: lib/libcblas.so.3.9.0: missing library: libgfortran.so.5
ERROR: lib/libcblas.so.3.9.0: missing library: libquadmath.so.0
*** Error code 1

I noticed that my CentOS setup also has GCC_REQD explicitly set to the same value as GFORTRAN_VERSION.  Based on that, I found that the following also alleviates the problem:

NetBSD netbsddev.acadix  bacon ~/Pkgsrc/pkgsrc/wip/cblas 1016: (pkgsrc): git diff
diff --git a/cblas/Makefile b/cblas/Makefile
index 99439698e5..dd05966003 100644
--- a/cblas/Makefile
+++ b/cblas/Makefile
@@ -9,6 +9,8 @@ LAPACK_COMPONENT_CMAKE_ARGS=    \
        -DLAPACK_LIBRARIES=${LAPACK_LIBS:Q} \
        -DCBLAS=ON -DLAPACKE=OFF \
        -DCMAKE_VERBOSE=ON
+#LDFLAGS+=     ${COMPILER_RPATH_FLAG}${PREFIX}/gcc5/lib
+GCC_REQD       += 8

 .include "../../mk/blas.buildlink3.mk"
 .include "../../math/lapack/Makefile.common"

I think the problem may be that gcc.mk sets _GCC_REQD before looking at Fortran requirements.




Home | Main Index | Thread Index | Old Index