From 67927867abba7026310fe8e17dd9715fbcdcf69a Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 27 Jul 2024 01:23:02 -0400 Subject: [PATCH 1/5] Link with libdl when we compile shared libraries --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 256a9009..e4553f8b 100644 --- a/meson.build +++ b/meson.build @@ -36,6 +36,9 @@ cutest_headers = [] libcutest_include = [] libcutest_include += include_directories('include') +# Dependency +libdl = dependency('dl', required: false) + # Sources subdir('include') # subdir('src/algencan') # needs algencan_ @@ -139,6 +142,7 @@ gen_single = generator(fc_compiler, pp_sources_single = [gen_single.process(libcutest_src)] libcutest_single = library(libcutest_single_name, + dependencies : libdl, sources : pp_sources_single + libcutest_c_src, include_directories : libcutest_include, install : true) @@ -158,6 +162,7 @@ gen_double = generator(fc_compiler, pp_sources_double = [gen_double.process(libcutest_src)] libcutest_double = library(libcutest_double_name, + dependencies : libdl, sources : pp_sources_double + libcutest_c_src, include_directories : libcutest_include, install : true) @@ -178,6 +183,7 @@ if build_quadruple pp_sources_quadruple = [gen_quadruple.process(libcutest_src)] libcutest_quadruple = library(libcutest_quadruple_name, + dependencies : libdl, sources : pp_sources_quadruple + libcutest_c_src, include_directories : libcutest_include, install : true) From 06d3fd652d1c8455f64dc65cc8434e06f94e003f Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 27 Jul 2024 01:33:22 -0400 Subject: [PATCH 2/5] Update meson.build --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e4553f8b..c79a6936 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'CUTEst', 'fortran', 'c', version: '2.2.0', - meson_version: '>= 0.61.0', + meson_version: '>= 0.62.0', default_options: [ 'buildtype=release', 'libdir=lib', @@ -37,7 +37,7 @@ libcutest_include = [] libcutest_include += include_directories('include') # Dependency -libdl = dependency('dl', required: false) +libdl = fc.find_library('dl') # Sources subdir('include') From eb845ba6b1d6abd3c701d394740c815d1445256a Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 27 Jul 2024 01:36:55 -0400 Subject: [PATCH 3/5] [CI] Update meson.yml --- .github/workflows/meson.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 32a21e32..37ef9b76 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -106,7 +106,10 @@ jobs: python-version: '3.11' - name: Install Meson and Ninja - run: pip install meson ninja + shell: bash + run: | + pip install meson==1.4.1 + pip install ninja - name: Set the environment variables CUTEST shell: bash From 843df4dbe1ade8ac97e8988ac6fe9de75b16bc50 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 27 Jul 2024 01:44:03 -0400 Subject: [PATCH 4/5] Update meson.build --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c79a6936..c94b4582 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ libcutest_include = [] libcutest_include += include_directories('include') # Dependency -libdl = fc.find_library('dl') +libdl = fc.find_library('dl', required : false) # Sources subdir('include') From 6f27b75184a821cf56666bdc9e0d3178ed44715a Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 27 Jul 2024 01:52:50 -0400 Subject: [PATCH 5/5] Provide precompiled static and shared libraries --- .github/julia/build_tarballs.jl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/julia/build_tarballs.jl b/.github/julia/build_tarballs.jl index 6d44fdbc..f6852c9f 100644 --- a/.github/julia/build_tarballs.jl +++ b/.github/julia/build_tarballs.jl @@ -20,6 +20,10 @@ cd ${WORKSPACE}/srcdir/CUTEst meson setup builddir --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson --prefix=$prefix -Dquadruple=true meson compile -C builddir meson install -C builddir + +meson setup builddir_shared --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson --prefix=$prefix -Dquadruple=true -Ddefault_library=shared +meson compile -C builddir_shared +meson install -C builddir_shared """ # These are the platforms we will build for by default, unless further @@ -29,9 +33,12 @@ platforms = expand_gfortran_versions(platforms) # The products that we will ensure are always built products = [ - FileProduct("lib/libcutest_single.a", :libcutest_single) - FileProduct("lib/libcutest_double.a", :libcutest_double) - FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple) + FileProduct("lib/libcutest_single.a", :libcutest_single_a), + FileProduct("lib/libcutest_double.a", :libcutest_double_a), + FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple_a), + LibraryProduct("libcutest_single", :libcutest_single), + LibraryProduct("libcutest_double", :libcutest_double), + LibraryProduct("libcutest_quadruple", :libcutest_quadruple), ] # Dependencies that must be installed before this package can be built