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 problem with dextract #19

Open
Mr-Inamn opened this issue Sep 13, 2017 · 21 comments
Open

installation problem with dextract #19

Mr-Inamn opened this issue Sep 13, 2017 · 21 comments

Comments

@Mr-Inamn
Copy link

Hi,
I am installing DEXTRACT. The dextract_makefile is as follows.
`CFLAGS = -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing
CC = gcc

all: dextract dexta undexta dexqv undexqv

dextract:
${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c DB.c QV.c -lhdf5

dexta:
${CC} ${CFLAGS} -o dexta gdexta.c DB.c QV.c

undexta:
${CC} ${CFLAGS} -o undexta undexta.c DB.c QV.c

dexqv:
${CC} ${CFLAGS} -o dexqv dexqv.c DB.c QV.c

undexqv:
${CC} ${CFLAGS} -o undexqv undexqv.c DB.c QV.c`

And when I run make -f dextract_makefile, error exists. Could anyone give me a copy of the gdexta.c file? Many thanks.
gcc -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing -o dexta gdexta.c DB.c QV.c gcc: error: gdexta.c: No such file or directory make: *** [dexta] Error 1

@Mr-Inamn
Copy link
Author

Then I rename the gdexta.c to dexta.c. The installation succeeded. Is it correct?

@tiramisutes
Copy link

I have the same question. And how to continue?

@yangziyi1990
Copy link

Yes, I have the same problem~
$make -f dextract_makefile
gcc -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing -o dexta gdexta.c DB.c QV.c
gcc: gdexta.c: No such file or directory
make: *** [dexta] Error 1

How to solve this problem?

@billzt
Copy link

billzt commented Oct 13, 2017

Obviously it is a typo

@george-githinji
Copy link

It would be nice then to add the following to the installation guide in the README.

open the dextract_makefile using a text editor. 
Go to line 10
change  gdexta.c to dexta

@xingjianfeng100
Copy link

when I run "make -f dextract_makefile",why it tell me "gcc -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing -I/home/xingjianfeng/hdf5/include -L/home/xingjianfeng/hdf5/lib -o dextract dextract.c DB.c QV.c -lhdf5
QV.c: In function ‘Build_Table’:
QV.c:127:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
{ uint64 symbol = (uint64) (node->lft);
^
QV.c: In function ‘Huffman’:
QV.c:174:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
node[value].lft = (HTree *) (uint64) i;
^
/tmp/ccLAXel3.o: In function main': dextract.c:(.text.startup+0x13b): undefined reference to parse_filter'
dextract.c:(.text.startup+0x271): undefined reference to initBaxData' dextract.c:(.text.startup+0x368): undefined reference to getBaxData'
dextract.c:(.text.startup+0x383): undefined reference to nextSubread' dextract.c:(.text.startup+0x39d): undefined reference to nextSubread'
dextract.c:(.text.startup+0x3c4): undefined reference to evaluate_bax_filter' dextract.c:(.text.startup+0xa04): undefined reference to sam_close'
dextract.c:(.text.startup+0xb3f): undefined reference to sam_open' dextract.c:(.text.startup+0xb5f): undefined reference to sam_header_process'
dextract.c:(.text.startup+0xbab): undefined reference to sam_record_extract' dextract.c:(.text.startup+0xbbe): undefined reference to SAM_EOF'
dextract.c:(.text.startup+0xbd3): undefined reference to evaluate_bam_filter' dextract.c:(.text.startup+0x1031): undefined reference to getBaxData'
dextract.c:(.text.startup+0x11fb): undefined reference to sam_open' dextract.c:(.text.startup+0x1362): undefined reference to parse_filter'
dextract.c:(.text.startup+0x15df): undefined reference to `printBaxError'
collect2: error: ld returned 1 exit status
dextract_makefile:7: recipe for target 'dextract' failed"

@xiaochuanle
Copy link
Owner

Dear all, Thanks very much for improving mecat. We have updated the dextract_makefile and fixed this error.

@bbalog87
Copy link

Obviously the error is not still fixed? Because I am still getting teh same error while installing dextract:

gcc -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing -I/home/jnguinka/mecat/hdf5/include/ -L/home/jnguinka/mecat/hdf5/lib/ -o dextract dextract.c DB.c QV.c -lhdf5
/tmp/ccWFocxk.o: In function `main':
dextract.c:(.text.startup+0x119): undefined reference to `parse_filter'
dextract.c:(.text.startup+0x230): undefined reference to `initBaxData'
dextract.c:(.text.startup+0x317): undefined reference to `getBaxData'
dextract.c:(.text.startup+0x331): undefined reference to `nextSubread'
dextract.c:(.text.startup+0x353): undefined reference to `nextSubread'
dextract.c:(.text.startup+0x374): undefined reference to `evaluate_bax_filter'
dextract.c:(.text.startup+0xaee): undefined reference to `sam_close'
dextract.c:(.text.startup+0xd00): undefined reference to `sam_open'
dextract.c:(.text.startup+0xd16): undefined reference to `sam_header_process'
dextract.c:(.text.startup+0xd4e): undefined reference to `sam_record_extract'
dextract.c:(.text.startup+0xd61): undefined reference to `SAM_EOF'
dextract.c:(.text.startup+0xd74): undefined reference to `evaluate_bam_filter'
dextract.c:(.text.startup+0x115d): undefined reference to `getBaxData'
dextract.c:(.text.startup+0x125a): undefined reference to `sam_open'
dextract.c:(.text.startup+0x13f3): undefined reference to `parse_filter'
dextract.c:(.text.startup+0x17af): undefined reference to `printBaxError'
collect2: error: ld returned 1 exit status
dextract_makefile:7: recipe for target 'dextract' failed
make: *** [dextract] Error 1

@lorenzoditucci
Copy link

Hi, I am having the same issue as @bbalog87
Is there any news?

@Rooksie
Copy link

Rooksie commented May 3, 2018

Hi! I looked at the original makefile from DEXTRACTOR and was able to fix the above "undefined reference to" error messages. I had to add 3 more .c files and -lz to the end of one command:

If you edit the dextractor_makefile (line 7) to be:
${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c sam.c bax.c expr.c DB.c QV.c -lhdf5 -lz

This allowed dextract to install, and I have now successfully extracted fasta sequences from 14 sets of bax.h5 files. (Although that too did not work the way MECAT said, instead of all files being in reads.fasta, they are in files named the same as the bax.h5 files with .fasta endings)

Good luck to all.

@ctcncgr
Copy link

ctcncgr commented May 9, 2018

I was having the same issue with undefined reference errors. I basically just grepped for these methods as they didn't seem to be hdf5 linker related and found them.

@Rooksie answered correctly above. The methods that are missing are contained in these c files and their headers. Including these in the compile fixes this issue. I am sure the install instructions should be changed, or the makefile could make objects out of these and then link them itself.

@bbalog87
Copy link

bbalog87 commented May 30, 2018

Please could update or edit the dextractor_makefile (line 7) in the github repository to be:
${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c sam.c bax.c expr.c DB.c QV.c -lhdf5 -lz

This would definitively fix this error.
Thanks

@X-WJ
Copy link

X-WJ commented Jun 13, 2018

when i added these c files,another bugs occured

/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5PL.c.o): In function H5PL__open': H5PL.c:(.text+0xf22): undefined reference to dlopen'
H5PL.c:(.text+0xf34): undefined reference to dlerror' H5PL.c:(.text+0xf56): undefined reference to dlsym'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5PL.c.o): In function H5PL__search_table': H5PL.c:(.text+0x135d): undefined reference to dlsym'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5PL.c.o): In function H5PL__close': H5PL.c:(.text+0x1492): undefined reference to dlclose'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o): In function H5T__conv_b_b': H5Tconv.c:(.text+0x4891): undefined reference to ceil'
H5Tconv.c:(.text+0x49ba): undefined reference to ceil' /usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o): In function H5T__conv_i_i':
H5Tconv.c:(.text+0xb657): undefined reference to ceil' H5Tconv.c:(.text+0xb77c): undefined reference to ceil'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o): In function H5T__conv_f_f': H5Tconv.c:(.text+0xd695): undefined reference to ceil'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o):H5Tconv.c:(.text+0xd7bd): more undefined references to ceil' follow /usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o): In function H5T__conv_f_i':
H5Tconv.c:(.text+0xd25fe): undefined reference to pow' /usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Tconv.c.o): In function H5T__conv_i_f':
H5Tconv.c:(.text+0xd4862): undefined reference to ceil' H5Tconv.c:(.text+0xd4987): undefined reference to ceil'
H5Tconv.c:(.text+0xd5475): undefined reference to pow' /usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Zscaleoffset.c.o): In function H5Z_scaleoffset_rnd':
H5Zscaleoffset.c:(.text+0x3952): undefined reference to ceil' H5Zscaleoffset.c:(.text+0x396f): undefined reference to floor'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Zscaleoffset.c.o): In function H5Z_scaleoffset_precompress_fd': H5Zscaleoffset.c:(.text+0xa485): undefined reference to pow'
H5Zscaleoffset.c:(.text+0xa535): undefined reference to pow' H5Zscaleoffset.c:(.text+0xa60f): undefined reference to pow'
H5Zscaleoffset.c:(.text+0xa64d): undefined reference to pow' H5Zscaleoffset.c:(.text+0xa6ae): undefined reference to pow'
/usr/local/HDF_Group/HDF5/1.8.15/lib/libhdf5.a(H5Zscaleoffset.c.o):H5Zscaleoffset.c:(.text+0xa6ec): more undefined references to `pow' follow
collect2: error: ld returned 1 exit status
dextract_makefile:7: recipe for target 'dextract' failed
make: *** [dextract] Error 1

@mattsmithau
Copy link

Thanks Rooksie....your fixed worked for me, however I had to leave off the -lz or it gave me this error:
gcc -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing -I/tools/hdf5-1.8.15/include -L/tools/hdf5-1.8.15/lib -o dextract dextract.c sam.c bax.c expr.c DB.c QV.c -lhdf5 -lz
/tmp/ccQnHm8g.o: In function sam_open': sam.c:(.text+0x3e0): undefined reference to gzbuffer'
collect2: error: ld returned 1 exit status
make: *** [dextract] Error 1

my dextract_makefile on centos:
dextract:
${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c sam.c bax.c expr.c DB.c QV.c -lhdf5

@X-WJ
Copy link

X-WJ commented Jun 15, 2018

emmc,thank you @bbalog87 @mattsmithau I have installed correctly on ubuntu(WSL),but when I go on centos6 ,i met some configure error while i was cmake hdf5 .Anyone knows how it was ? Thanks very much [ 40%] Built target H5make_libsettings
[ 40%] Built target H5detect
[ 40%] Built target hdf5
[ 40%] Built target hdf5_tools
[ 40%] Built target hdf5_test
[ 40%] Linking C executable ../bin/links_env
../bin/libhdf5.a(H5Zdeflate.c.o): In function H5Z_filter_deflate': H5Zdeflate.c:(.text+0x1cb): undefined reference to inflateInit_'
H5Zdeflate.c:(.text+0x24f): undefined reference to inflate' H5Zdeflate.c:(.text+0x27b): undefined reference to inflateEnd'
H5Zdeflate.c:(.text+0x338): undefined reference to inflateEnd' H5Zdeflate.c:(.text+0x44c): undefined reference to inflateEnd'
H5Zdeflate.c:(.text+0x5cc): undefined reference to `compress2'
collect2: ld returned 1 exit status
make[2]: *** [bin/links_env] Error 1
make[1]: *** [test/CMakeFiles/links_env.dir/all] Error 2
make: *** [all] Error 2

@Fu-Yilei
Copy link

I occurred the same issue with @mattsmithau , I am wondering whether there are any solution to this "gzbuffer" problem. Thanks.

@Fu-Yilei
Copy link

I found why this issue happens, it is because I did not install zlib in my server.

@bioteksampath
Copy link

me too

dextract.c:(.text+0x144): undefined reference to parse_filter' dextract.c:(.text+0x25e): undefined reference to initBaxData'
dextract.c:(.text+0x31f): undefined reference to getBaxData' dextract.c:(.text+0x345): undefined reference to nextSubread'
dextract.c:(.text+0x35b): undefined reference to nextSubread' dextract.c:(.text+0x37c): undefined reference to evaluate_bax_filter'
dextract.c:(.text+0x81f): undefined reference to sam_close' dextract.c:(.text+0x8f2): undefined reference to sam_open'
dextract.c:(.text+0x908): undefined reference to sam_header_process' dextract.c:(.text+0x937): undefined reference to sam_record_extract'
dextract.c:(.text+0x94a): undefined reference to SAM_EOF' dextract.c:(.text+0x95d): undefined reference to evaluate_bam_filter'
dextract.c:(.text+0xee7): undefined reference to sam_open' dextract.c:(.text+0x10e3): undefined reference to parse_filter'
dextract.c:(.text+0x1127): undefined reference to `printBaxError'
collect2: ld returned 1 exit status
make: *** [dextract] Error 1

@X-WJ
Copy link

X-WJ commented Jul 29, 2018 via email

@gabyrech
Copy link

gabyrech commented Oct 5, 2018

Thanks @Rooksie ! your fixed worked for me!

@Jianbing-Hu
Copy link

Thanks @Rooksie ! my problem has been solved.

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