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 issue #124

Open
tnnandi opened this issue Jul 12, 2023 · 10 comments
Open

Installation issue #124

tnnandi opened this issue Jul 12, 2023 · 10 comments

Comments

@tnnandi
Copy link

tnnandi commented Jul 12, 2023

Hi,

When I'm trying to install SvABA, ./configure works fine but make gives the following error:

gcc -g -Wall -O2 -Wno-unused-function  libfml.a example.o -o fml-asm -L. -lfml -lm -lz -lpthread
/usr/bin/ld: ./libfml.a(rope.o):/grand/tarak_files/SV_consensus_calls/svaba/SeqLib/fermi-lite/rle.h:33: multiple definition of `rle_auxtab'; ./libfml.a(misc.o):/grand/tarak_files/SV_consensus_calls/svaba/SeqLib/fermi-lite/rle.h:33: first defined here
/usr/bin/ld: ./libfml.a(rle.o):/grand/tarak_files/SV_consensus_calls/svaba/SeqLib/fermi-lite/rle.h:33: multiple definition of `rle_auxtab'; ./libfml.a(misc.o):/grand/tarak_files/SV_consensus_calls/svaba/SeqLib/fermi-lite/rle.h:33: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:20: fml-asm] Error 1

I'm using gcc 11.2.

Please suggest what needs to be done.

Thanks,
Tarak

@walaj
Copy link
Owner

walaj commented Jul 12, 2023

Yes this is a problem with GCC 10+ and the fml subdirectory. I'm working now on refactoring SeqLib to point to more modern versions of these repositories (where this problem was recently fixed in fml). Thanks @julianhess for pointing this out.

In the meantime, you can just update to the latest fermi-lite. cd into the fermi-lite subdirectory of SeqLib:

git checkout master
git pull origin master

cd back out to the SeqLib main directory and rebuild (make clean && make)

@tnnandi
Copy link
Author

tnnandi commented Jul 12, 2023

@walaj Thanks for the quick response! Which Makefile should I be using within the SeqLib main directory? git pull shows branch is already up to date. The error message for make is below (executing from the SeqLib directory):

make clean
make: *** No rule to make target 'clean'.  Stop.

Thanks,
Tarak

@julianhess
Copy link

Hi @walaj,

If it's any help, I've made these fixes in my forked branch: https://github.com/julianhess/SeqLib/commits/jhess

Apologies for not PR'ing this years(!) ago.

—Julian

@walaj
Copy link
Owner

walaj commented Jul 12, 2023

oops @tnnandi, I forgot this was the svaba github, so SeqLib is a subdirectory itself of svaba. So you would make from the svaba main directory, not the SeqLib subdirectory (although still need to go into SeqLib and then fermi-lite to update this sub-sub repository)

@walaj
Copy link
Owner

walaj commented Jul 12, 2023

Hi @walaj,

If it's any help, I've made these fixes in my forked branch: https://github.com/julianhess/SeqLib/commits/jhess

Apologies for not PR'ing this years(!) ago.

—Julian

Thanks Julian! I just want to add in the htslib submodule for this project, just to make it more stand-alone for people not as familiar with how to pull in a private library version. If it were just SeqLib I would say the C++ dev should be able to figure that out, but since it's bundled with svaba and variantbam, I do like the ease for average user of having it included.

I'm finally getting around to testing your PR from before, just need to get GCC 11 on my machine and then expect to accept.

@tnnandi
Copy link
Author

tnnandi commented Jul 12, 2023

HI @walaj . Thanks again! But this leads to the same error as the git pull essentially did nothing:

git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
(2022-09-08/bioconda_env) tnnandi@polaris-login-01:/grand/tarak_files/SV_consensus_calls/SvABA/SeqLib/fermi-lite> git pull origin master
From https://github.com/jwalabroad/fermi-lite
 * branch            master     -> FETCH_HEAD
Already up to date.

make from the svaba directory still gives the same error:

/usr/bin/ld: ./libfml.a(rope.o):/grand/tarak_files/SV_consensus_calls/SvABA/SeqLib/fermi-lite/rle.h:33: multiple definition of `rle_auxtab'; ./libfml.a(misc.o):/grand/tarak_files/SV_consensus_calls/SvABA/SeqLib/fermi-lite/rle.h:33: first defined here
/usr/bin/ld: ./libfml.a(rle.o):/grand/tarak_files/SV_consensus_calls/SvABA/SeqLib/fermi-lite/rle.h:33: multiple definition of `rle_auxtab'; ./libfml.a(misc.o):/grand/tarak_files/SV_consensus_calls/SvABA/SeqLib/fermi-lite/rle.h:33: first defined here
collect2: error: ld returned 1 exit status

@walaj
Copy link
Owner

walaj commented Jul 12, 2023

Ahh so you'll need to also change the remote of the fermi-lite directory. In fermi-lite:

git remote set-url origin https://github.com/lh3/fermi-lite
git fetch origin
git reset --hard origin/master

You can confirm the above was correctly done using git remote -v which should point to the lh3 version of fermi-lite, and git branch -v that should show master 85f159e Merge pull request #16 from julianhess/master

Then go back to svaba and make and make clean

@tnnandi
Copy link
Author

tnnandi commented Jul 12, 2023

Thanks! I went past that error but now encountering an issue with bzlib. I'm within a conda environment and can do only conda install and pip install (no apt-get ..), and I have installed bzip2.

cram/cram_io.c:57:10: fatal error: bzlib.h: No such file or directory
   57 | #include <bzlib.h>
      |          ^~~~~~~~~

@walaj
Copy link
Owner

walaj commented Jul 12, 2023

This is an issue with the conda environment not having the header files for the version of bzip2 that you installed. This worked for me:

conda install -c conda-forge bzip2

gives me the file bzlib.h in:

mambaforge/envs/svabatest/include

If the file is there but its still not building, its an issue with your conda environment not setting the write environment variables to where it's storing header files. Better asked to conda community

@tnnandi
Copy link
Author

tnnandi commented Jul 20, 2023

Thanks! The above error is now resolved by adding the path of the bzlib.h file to the CPATH env variable.

The Makefile doesn't have any target for install, so the last line in the following fails:

git clone --recursive https://github.com/walaj/svaba
cd svaba
./configure
make
make install

Can you please suggest what needs to be done? Maybe "make install" is not required anymore?

Thanks,

Tarak

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