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

not compile make file #10

Open
199413 opened this issue Dec 7, 2023 · 2 comments
Open

not compile make file #10

199413 opened this issue Dec 7, 2023 · 2 comments

Comments

@199413
Copy link

199413 commented Dec 7, 2023

gcc -Wall -O3 src/matlock.c src/matrix.o src/bam_filt.o src/count_motif.o src/dna.o src/read_count.o -Ihtslib -Isrc htslib/libhts.a -lbz2 -llzma -lz -lm -lpthread -lgsl -lgslcblas -o bin/matlock
/usr/bin/ld: src/bam_filt.o:(.bss+0x50): multiple definition of `rp'; /tmp/ccu2Wv02.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:16: bin/matlock] Error 1

@aijigekoukou-shen
Copy link

gcc -Wall -O3 src/matlock.c src/matrix.o src/bam_filt.o src/count_motif.o src/dna.o src/read_count.o -Ihtslib -Isrc htslib/libhts.a -lbz2 -llzma -lz -lm -lpthread -lgsl -lgslcblas -o bin/matlock /usr/bin/ld: src/bam_filt.o:(.bss+0x50): multiple definition of `rp'; /tmp/ccu2Wv02.o:(.bss+0x20): first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:16: bin/matlock] Error 1

Hi. Are you solve this problem?

@amvarani
Copy link

amvarani commented Feb 6, 2024

Hi there
It would help if you used the flag: -Wl,--allow-multiple-definition
This is not the correct and good solution but should work

gcc -Wall -O3 src/matlock.c src/matrix.o src/bam_filt.o src/count_motif.o src/dna.o src/read_count.o -Ihtslib -Isrc htslib/libhts.a -lbz2 -llzma -lz -lm -lpthread -lgsl -lgslcblas -Wl,--allow-multiple-definition -o bin/matlock

The best solution is to use conda

conda install bioconda::matlock

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

3 participants