odelaneau / shapeit5

Segmented HAPlotype Estimation and Imputation Tool
https://odelaneau.github.io/shapeit5/
MIT License
61 stars 9 forks source link

issue with makefile for phase_common #24

Closed theandyb closed 1 year ago

theandyb commented 1 year ago

make is able to run all commands up to building the final executable, but for some reason excludes the -lcurl and -lcrypto flags, even though both are listed in the DYN_LIBS variable. I'm not sure why this is happening, but I am able to successfully compile the final executable simply by adding these two flags to the command that make attempts to use.

What make tries to run:

g++ -std=c++17 -O3 obj/bitmatrix.o obj/bitvector.o obj/conditioning_set_managment.o obj/conditioning_set_selection.o obj/conditioning_set_solve.o obj/genotype_set.o obj/haplotype_set.o obj/ibd2_tracks.o obj/variant_map.o obj/window_set.o obj/genotype_reader_managment.o obj/genotype_reader_reading.o obj/genotype_reader_scaning.o obj/gmap_reader.o obj/graph_writer.o obj/haploid_reader.o obj/haplotype_writer.o obj/pedigree_reader.o obj/main.o obj/haplotype_segment_double.o obj/haplotype_segment_single.o obj/genotype_builder.o obj/compute_job.o obj/genotype_build.o obj/genotype_managment.o obj/genotype_mendel.o obj/genotype_prune.o obj/genotype_sweep.o obj/hmm_parameters.o obj/variant.o obj/phaser_algorithm.o obj/phaser_finalise.o obj/phaser_initialise.o obj/phaser_management.o obj/phaser_parameters.o /net/snowwhite/home/beckandy/Tools/htslib/lib/libhts.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a -o bin/phase_common -lz -lpthread -lbz2 -llzma

What works:

g++ -std=c++17 -O3 obj/bitmatrix.o obj/bitvector.o obj/conditioning_set_managment.o obj/conditioning_set_selection.o obj/conditioning_set_solve.o obj/genotype_set.o obj/haplotype_set.o obj/ibd2_tracks.o obj/variant_map.o obj/window_set.o obj/genotype_reader_managment.o obj/genotype_reader_reading.o obj/genotype_reader_scaning.o obj/gmap_reader.o obj/graph_writer.o obj/haploid_reader.o obj/haplotype_writer.o obj/pedigree_reader.o obj/main.o obj/haplotype_segment_double.o obj/haplotype_segment_single.o obj/genotype_builder.o obj/compute_job.o obj/genotype_build.o obj/genotype_managment.o obj/genotype_mendel.o obj/genotype_prune.o obj/genotype_sweep.o obj/hmm_parameters.o obj/variant.o obj/phaser_algorithm.o obj/phaser_finalise.o obj/phaser_initialise.o obj/phaser_management.o obj/phaser_parameters.o /net/snowwhite/home/beckandy/Tools/htslib/lib/libhts.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a -o bin/phase_common -lz -lpthread -lbz2 -llzma -lcurl -lcrypto
odelaneau commented 1 year ago

Yes; for some reason; it depends on the platform.

theandyb commented 1 year ago

Ok, if this is something platform dependent it probably makes sense to close this as an issue. I do find it a bit confusing that on line 20 of the makefile, there's the following DYN_LIBS definition:

DYN_LIBS=-lz -lpthread -lbz2 -llzma -lcurl -lcrypto

and on line 32 there is

system: DYN_LIBS=-lz -lpthread -lbz2 -llzma

I'm not sure why it would make sense to omit-lcrypto and -lcurl on line 32