odelaneau / shapeit5

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

Installation error in make process #28

Closed BIOJHK closed 1 year ago

BIOJHK commented 1 year ago

Hello, I used shapeit4 in last year, but I want to use shapeit5 also. When I do shapeit5 installation process, fatal error popped up and cosuming my time... I'm working with this version,

(base) jhk0709@R750xs:~/Public/230424/shapeit5/phase_rare$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

and Centos also. (I will install shapeit5 in Centos later when this error solved and successfully installed.)

Make error occurred here.. /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:859: undefined reference to curl_global_init' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:866: undefined reference tocurl_share_init' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:874: undefined reference to curl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:875: undefined reference tocurl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:876: undefined reference to curl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:885: undefined reference tocurl_version_info' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:879: undefined reference to curl_share_cleanup' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:880: undefined reference tocurl_global_cleanup' /usr/bin/ld: /usr/local/lib/libhts.a(hfile_s3_write.o): in function s3_write_exit': /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:831: undefined reference tocurl_global_cleanup' collect2: error: ld returned 1 exit status make: *** [makefile:129: bin/phase_rare] Error 1

when I install with htslib, it doesn't process well so I check link all *c file - and same error message popped up! (base) jhk0709@R750xs:~/Public/230424/htslib-1.17$ gcc hfile_s3_write.c -lcurl hfile_s3_write.c:67:10: fatal error: config.h: No such file or directory 67 | #include | ^~~~~~ compilation terminated.

when I found the message for your installation guide, when the htslib successfully done with make process, it has no libhts.a (so I make link with ln -s to /usr/local/lib/) and CPATH to solve htslib and samtools.

What can I do for solve this make solution?

odelaneau commented 1 year ago

Hi,

There are static bins and a docker available. Try to use them, no need to recompile.

Best,

O

Le mar. 25 avr. 2023, 06:16, BIOJHK @.***> a écrit :

Hello, I used shapeit4 in last year, but I want to use shapeit5 also. When I do shapeit5 installation process, fatal error popped up and cosuming my time... I'm working with this version,

(base) @.***:~/Public/230424/shapeit5/phase_rare$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

and Centos also. (I will install Centos later when this error solved and successfully installed.)

Make error occurred here.. /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:859: undefined reference to curl_global_init' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:866: undefined reference to curl_share_init' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:874: undefined reference to curl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:875: undefined reference to curl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:876: undefined reference to curl_share_setopt' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:885: undefined reference to curl_version_info' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:879: undefined reference to curl_share_cleanup' /usr/bin/ld: /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:880: undefined reference to curl_global_cleanup' /usr/bin/ld: /usr/local/lib/libhts.a(hfile_s3_write.o): in function s3_write_exit': /home/jhk0709/Public/230424/htslib/hfile_s3_write.c:831: undefined reference to curl_global_cleanup' collect2: error: ld returned 1 exit status make: *** [makefile:129: bin/phase_rare] Error 1

when I install with htslib, it doesn't process well so I check link all *c file - and same error message popped up! (base) @.***:~/Public/230424/htslib-1.17$ gcc hfile_s3_write.c -lcurl hfile_s3_write.c:67:10: fatal error: config.h: No such file or directory 67 | #include | ^~~~~~ compilation terminated.

when I found the message for your installation guide, when the htslib successfully done with make process, it has no libhts.a (so I make link with ln -s to /usr/local/lib/) and CPATH to solve htslib and samtools.

What can I do for solve this make solution?

— Reply to this email directly, view it on GitHub https://github.com/odelaneau/shapeit5/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4XTIMTKNPMSO6BELFD3QDXC5M3JANCNFSM6AAAAAAXKPEA4Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BIOJHK commented 1 year ago

Oh, thank you for quick reply! I'm not the friend of docker, so I just download static bins to install shapeit5. Well, I expected shapeit5.sh in static bins file... but it doesn't existed anywhere... bin and obj file was empty, src file has cpp / h format files.

(base) jhk0709@R750xs:~/Public/230424/shapeit5-5.1.0/phase_common$ ls bin/

(base) jhk0709@R750xs:~/Public/230424/shapeit5-5.1.0/phase_common$ ls obj/

(base) jhk0709@R750xs:~/Public/230424/shapeit5-5.1.0/phase_common$ ls src/ containers io main.cpp models modules objects phaser utils

Is it right that I just download and using shapeit5 immediately? It may be do some process needed.. like make...

and I remember in shapeit4, installation process is need to write path for confirmmation(is it right? I can't remember exact words) like, hstlib=/directory/to/hstlib boost=/directory/to/boost

but in shapeit5 guide to do just 'make'. Could I get the information of default directory or C can edit the default directory to write specific directory?

Thank you.

BIOJHK commented 1 year ago

Oops. I found the solution. I didn't do edit any makefile... but I'm confused with make process, the makefile just show make process, don't seem to need setting the each directory. (more detailed and specific pathway setting in desktop, olivier, laptop... I confused...)

If i do shapeit5 in linux environments, is it right that i just edit #CONDITIONAL PATH DEFINITON "system part"? or I need to edit all pathway like system, desktop, olivier... laptap in all path deifintion parts?

ex)

CONDITIONAL PATH DEFINITON

1) only I need to edit system part system: DYN_LIBS=-lz -lpthread -lbz2 -llzma system: HTSSRC=/home/jhk0709/Public/230424/htslib system: HTSLIB_INC=$(HTSSRC)/include/htslib system: HTSLIB_LIB=$(HTSSRC)/lib/libhts.a system: BOOST_INC=/usr/include system: BOOST_LIB_IO=/usr/lib/x86_64-linux-gnu/libboost_iostreams.a system: BOOST_LIB_PO=/usr/lib/x86_64-linux-gnu/libboost_program_options.a system: BOOST_LIB_SE=/usr/lib/x86_64-linux-gnu/libboost_serialization.a system: $(BFILE)

2) I need to edits all parts of pathway definition system: DYN_LIBS=-lz -lpthread -lbz2 -llzma system: HTSSRC=/home/jhk0709/Public/230424/htslib .. desktop: HTSSRC=../.. desktop: HTSLIB_INC=$(HTSSRC)/htslib olivier: HTSSRC=$(HOME)/Tools olivier: HTSLIB_INC=$(HTSSRC)/htslib-1.15 . . . etc.

Thank you.

odelaneau commented 1 year ago

Just download the static binaries in the v5.1.1 pre-release. No need to re-compil, etc ... There's a link on the right hand side of the github page.

BIOJHK commented 1 year ago

Oh, thank you for updated information. I just downloaded and check the program works well.