From a2193d474fdbbb3b4b0eb1d82c26d79f0f685957 Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Tue, 8 Nov 2022 13:51:44 -0800 Subject: [PATCH 1/4] Explicitly force static hdf5 library linking for libssu --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index e923607..3d12c71 100644 --- a/src/Makefile +++ b/src/Makefile @@ -110,7 +110,7 @@ faithpd: faithpd.cpp tree.o biom.o unifrac.o cmd.o skbio_alt.o api.o $(UNIFRAC_F $(CXX) $(CPPFLAGS) $(EXEFLAGS) faithpd.cpp -o faithpd tree.o biom.o $(UNIFRAC_FILES) unifrac.o cmd.o skbio_alt.o api.o -lhdf5_cpp -llz4 $(BLASLIB) -lpthread libssu.so: tree.o biom.o unifrac.o cmd.o skbio_alt.o api.o $(UNIFRAC_FILES) - $(CXX) $(LDDFLAGS) -o libssu.so tree.o biom.o $(UNIFRAC_FILES) unifrac.o cmd.o skbio_alt.o api.o -lc -lhdf5_cpp -llz4 $(BLASLIB) -L$(PREFIX)/lib + $(CXX) $(LDDFLAGS) -o libssu.so tree.o biom.o $(UNIFRAC_FILES) unifrac.o cmd.o skbio_alt.o api.o -lc -llz4 $(BLASLIB) -L$(PREFIX)/lib -noshlib -lhdf5_cpp -lhdf5_hl_cpp -lhdf5_hl -lhdf5 api.o: api.cpp api.hpp unifrac.hpp skbio_alt.hpp biom.hpp tree.hpp $(CXX) $(CPPFLAGS) api.cpp -c -o api.o -fPIC From 02ea1d9a05041e1a563212236099446a5a41a12a Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Thu, 10 Nov 2022 09:28:57 -0800 Subject: [PATCH 2/4] Add test that we do not have s shlib hdf5 dependency --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 367c8cd..2f0df76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,6 +88,10 @@ jobs: popd pushd test ./capi_test 1 + if [[ "$(uname -s)" == "Linux" ]]; + then + (ldd ./capi_test |grep hdf ; test $? == 1) + fi popd pushd src/testdata conda install --yes -c conda-forge h5py From 4cc80b3acab4214b8f828df064b85cca5defd298 Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Thu, 10 Nov 2022 10:02:49 -0800 Subject: [PATCH 3/4] Add test that we do not have s shlib hdf5 dependency --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f0df76..a6aebb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -91,6 +91,8 @@ jobs: if [[ "$(uname -s)" == "Linux" ]]; then (ldd ./capi_test |grep hdf ; test $? == 1) + else + (./capi_test 1 |grep hdf ; test $? == 1) fi popd pushd src/testdata From be96c18aadcf0ca4bacc0237fb0980c3cebc92eb Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Thu, 10 Nov 2022 10:20:34 -0800 Subject: [PATCH 4/4] Fix test --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6aebb8..5828163 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,11 +88,12 @@ jobs: popd pushd test ./capi_test 1 + # explicitly check that we do not have hdf5 dependencies if [[ "$(uname -s)" == "Linux" ]]; then - (ldd ./capi_test |grep hdf ; test $? == 1) + ldd ./capi_test |awk 'BEGIN{a=0}/hdf/{a=a+1;print $0}END{if (a==0) {print "No dynamic hdf5 found"} else {exit 2}}' else - (./capi_test 1 |grep hdf ; test $? == 1) + otool -L ./capi_test|awk 'BEGIN{a=0}/hdf/{a=a+1;print $0}END{if (a==0) {print "No dynamic hdf5 found"} else {exit 2}}' fi popd pushd src/testdata