pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/math/lapack cblas: Restore: Fix link to Fortran librar...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3f56f5c69cb4
branches:  trunk
changeset: 452549:3f56f5c69cb4
user:      thor <thor%pkgsrc.org@localhost>
date:      Thu May 13 07:52:05 2021 +0000

description:
cblas: Restore: Fix link to Fortran libraries by using Fortran compiler as linker

This was lost on the recent rework of the patches:

On NetBSD.
In PKGSRC_FORTRAM=gfortran case, libcblas has no RPATH=/usr/pkg/gccXX/lib
and libgfortran and libquadmath are not found.
In PKGSRC_FORTRAN=g95 case, libcblas has no
RPATH=/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 and libf95 is not found.

Use Fortran compiler as linker instread of C compiler to fix link.

diffstat:

 math/lapack/distinfo                               |   7 ++++---
 math/lapack/patches/patch-CBLAS_src_CMakeLists.txt |  16 ++++++++++++----
 math/lapack/patches/patch-CMakeLists.txt           |  11 ++++++++++-
 3 files changed, 26 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r 0998666c9d17 -r 3f56f5c69cb4 math/lapack/distinfo
--- a/math/lapack/distinfo      Wed May 12 20:24:21 2021 +0000
+++ b/math/lapack/distinfo      Thu May 13 07:52:05 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.25 2021/05/12 14:32:51 thor Exp $
+$NetBSD: distinfo,v 1.26 2021/05/13 07:52:05 thor Exp $
 
 SHA1 (lapack-3.9.1.tar.gz) = ccb1e9cb6e7fa7db8a680292457d7d990f25d286
 RMD160 (lapack-3.9.1.tar.gz) = 380a2072eb7d8358ec8bf100e3d114600fc71444
@@ -6,9 +6,10 @@
 Size (lapack-3.9.1.tar.gz) = 7543209 bytes
 SHA1 (patch-BLAS_SRC_CMakeLists.txt) = 8773f93b1f907ed02d41677a3819f5bb655a331a
 SHA1 (patch-CBLAS_cblas.pc.in) = cc97fbab08024220739929b5ad95c266965da06d
-SHA1 (patch-CBLAS_src_CMakeLists.txt) = c174bb5d790e5f7e50226d0b7a758d0417d90100
-SHA1 (patch-CMakeLists.txt) = 3c8e9125f164625198fb7197982746f43bf4aab5
+SHA1 (patch-CBLAS_src_CMakeLists.txt) = 64abbfb4458943483fba8897df0c8bf62c3f949e
+SHA1 (patch-CMakeLists.txt) = 37ec278c2349d79e8cbd7cff110fce7984b42e6e
 SHA1 (patch-LAPACKE_CMakeLists.txt) = 13e4662585088aa53f61f7079d103fdfcf985c4e
 SHA1 (patch-LAPACKE_lapacke.pc.in) = 6bbd72205120501cd60daf0b22b00ef7979fb329
+SHA1 (patch-LAPACKE_src_CMakeLists.txt) = da39a3ee5e6b4b0d3255bfef95601890afd80709
 SHA1 (patch-SRC_CMakeLists.txt) = 4031bb41100f1fde71c70aa53fc55bee7a852fb7
 SHA1 (patch-TESTING_MATGEN_CMakeLists.txt) = 07946678945dba3a7752849791f12e0666345983
diff -r 0998666c9d17 -r 3f56f5c69cb4 math/lapack/patches/patch-CBLAS_src_CMakeLists.txt
--- a/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt        Wed May 12 20:24:21 2021 +0000
+++ b/math/lapack/patches/patch-CBLAS_src_CMakeLists.txt        Thu May 13 07:52:05 2021 +0000
@@ -1,10 +1,19 @@
-$NetBSD: patch-CBLAS_src_CMakeLists.txt,v 1.3 2021/05/12 14:32:51 thor Exp $
+$NetBSD: patch-CBLAS_src_CMakeLists.txt,v 1.4 2021/05/13 07:52:05 thor Exp $
 
-Support combined build of shared and static libraries.
+- Support combined build of shared and static libraries.
+- Link CBLAS with Fortran compiler to fix build on NetBSD.
 
 --- CBLAS/src/CMakeLists.txt.orig      2021-03-25 18:25:15.000000000 +0000
 +++ CBLAS/src/CMakeLists.txt
-@@ -129,3 +129,19 @@ target_include_directories(${CBLASLIB} P
+@@ -116,7 +116,6 @@ list(REMOVE_DUPLICATES SOURCES)
+ add_library(${CBLASLIB} ${SOURCES})
+ set_target_properties(
+   ${CBLASLIB} PROPERTIES
+-  LINKER_LANGUAGE C
+   VERSION ${LAPACK_VERSION}
+   SOVERSION ${LAPACK_MAJOR_VERSION}
+   )
+@@ -129,3 +128,18 @@ target_include_directories(${CBLASLIB} P
  )
  target_link_libraries(${CBLASLIB} PRIVATE ${BLAS_LIBRARIES})
  lapack_install_library(${CBLASLIB})
@@ -13,7 +22,6 @@
 +  add_library(${CBLASLIB}_static STATIC ${SOURCES})
 +  set_target_properties(
 +    ${CBLASLIB}_static PROPERTIES
-+    LINKER_LANGUAGE C
 +    OUTPUT_NAME ${CBLASLIB}
 +    )
 +  target_include_directories(${CBLASLIB}_static PUBLIC
diff -r 0998666c9d17 -r 3f56f5c69cb4 math/lapack/patches/patch-CMakeLists.txt
--- a/math/lapack/patches/patch-CMakeLists.txt  Wed May 12 20:24:21 2021 +0000
+++ b/math/lapack/patches/patch-CMakeLists.txt  Thu May 13 07:52:05 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-CMakeLists.txt,v 1.2 2021/05/12 14:32:51 thor Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.3 2021/05/13 07:52:05 thor Exp $
 
 Avoid installation of LAPACK CMake and pkg-config files when not installing
 LAPACK, also allowing explicitly to switch off LAPACK build for BLAS-only
@@ -6,6 +6,15 @@
 
 --- CMakeLists.txt.orig        2021-03-25 18:25:15.000000000 +0000
 +++ CMakeLists.txt
+@@ -11,7 +11,7 @@ set(
+   )
+ 
+ # Add the CMake directory for custom CMake modules
+-set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
++set (CMAKE_MODULE_PATH "/data/pkgwork/math/lapack/work/.buildlink/cmake-Modules" "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
+ 
+ # Export all symbols on Windows when building shared libraries
+ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
 @@ -160,6 +160,9 @@ endif()
  
  



Home | Main Index | Thread Index | Old Index