I am trying to compile shapeit4 on my cluster without root permissions. The makefile is as follows:

    #COMPILER MODE C++11
    CXX=g++ -std=c++11
    
    #HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
    HTSLIB_INC=/share/apps/genomics/htslib-1.10/include/
    HTSLIB_LIB=/share/apps/genomics/htslib-1.10/lib/libhts.a
    
    #BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
    BOOST_INC=/share/apps/boost-1.71.0/include/
    BOOST_LIB_IO=/share/apps/boost-1.71.0/lib/libboost_iostreams.a
    BOOST_LIB_PO=/share/apps/boost-1.71.0/lib/libboost_program_options.a
    
    #HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
    #HTSLIB_INC=/software/UHTS/Analysis/samtools/1.4/include
    #HTSLIB_LIB=/software/UHTS/Analysis/samtools/1.4/lib64/libhts.a
    
    #BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
    #BOOST_INC=/software/include
    #BOOST_LIB_IO=/software/lib64/libboost_iostreams.a
    #BOOST_LIB_PO=/software/lib64/libboost_program_options.a
    
    #COMPILER & LINKER FLAGS
    
    #Best performance is achieved with this. Use it if running on the same plateform you're compiling, it's definitely worth it!
    #CXXFLAG=-O3 -march=native
    #Good performance and portable on most intel CPUs
    CXXFLAG=-O3 -mavx2 -mfma 
    #Portable version without avx2 (much slower)
    #CXXFLAG=-O3
    
    
    LDFLAG=-O3
    
    #DYNAMIC LIBRARIES
    DYN_LIBS=-lz -lbz2 -lm -lpthread -llzma -lcurl -lcrypto
    
    #SHAPEIT SOURCES & BINARY
    BFILE=bin/shapeit4
    HFILE=$(shell find src -name *.h)
    CFILE=$(shell find src -name *.cpp)
    OFILE=$(shell for file in `find src -name *.cpp`; do echo obj/$$(basename $$file .cpp).o; done)
    VPATH=$(shell for file in `find src -name *.cpp`; do echo $$(dirname $$file); done)
    
    #COMPILATION RULES
    all: $(BFILE)
    
    $(BFILE): $(OFILE)
    	$(CXX) $(LDFLAG) $^ $(HTSLIB_LIB) $(BOOST_LIB_IO) $(BOOST_LIB_PO) -o $@ $(DYN_LIBS)
    
    obj/%.o: %.cpp $(HFILE)
    	$(CXX) $(CXXFLAG) -c $< -o $@ -Isrc -I$(HTSLIB_INC) -I$(BOOST_INC)
    
    clean: 
    	rm -f obj/*.o $(BFILE)

The compilation then fails on:

    /usr/bin/ld: cannot find -lcurl

I understand that this means the compiler has looked in /usr/bin/ld and hasn't been able to find the lcurl library. Curl is installed on the cluster:

    ├── bin
    │   ├── curl
    │   └── curl-config
    ├── include
    │   └── curl
    ├── lib
    │   ├── libcurl.a
    │   ├── libcurl.la
    │   ├── libcurl.so -> libcurl.so.4.5.0
    │   ├── libcurl.so.4 -> libcurl.so.4.5.0
    │   ├── libcurl.so.4.5.0
    │   └── pkgconfig
    └── share
        ├── aclocal
        └── man

I've tried to add several different lines to the makefile in order for it to find -lcurl, but I haven't succeeded so far. Can anyone advise me on what to add to the makefile? 



Install it with BioConda https://bioconda.github.io/recipes/shapeit4/README.html