Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error in make process #28

Closed
BIOJHK opened this issue Apr 25, 2023 · 5 comments
Closed

Installation error in make process #28

BIOJHK opened this issue Apr 25, 2023 · 5 comments

Comments

@BIOJHK
Copy link

BIOJHK commented Apr 25, 2023

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 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) 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 <config.h>
| ^~~~~~~~~~
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
Copy link
Owner

odelaneau commented Apr 25, 2023 via email

@BIOJHK
Copy link
Author

BIOJHK commented Apr 25, 2023

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
Copy link
Author

BIOJHK commented Apr 25, 2023

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
Copy link
Owner

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
Copy link
Author

BIOJHK commented May 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants