Skip to content

Commit

Permalink
Merge pull request #15 from sfiligoi/igor_static_hfd5
Browse files Browse the repository at this point in the history
Fix static hdf5 linking
  • Loading branch information
wasade authored Nov 14, 2022
2 parents e9eaffc + be96c18 commit 1da1681
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ jobs:
popd
pushd test
./capi_test 1
# explicitly check that we do not have hdf5 dependencies
if [[ "$(uname -s)" == "Linux" ]];
then
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
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
conda install --yes -c conda-forge h5py
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1da1681

Please sign in to comment.