This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Linux Error : Undefined reference to BAMTools while compiling makefile

Hi, Iam currently trying to install EUPAN toolkit (EUkaryotic pangenome analysis toolkit) for pangenome analysis using this installation guide: http://cgm.sjtu.edu.cn/eupan/installation.html I have downloaded the toolkit but the make command doesn't run and gives error as shown in the screenshot. Kindly guide me step by step commands as to how the issue can be resolved. (This is my first time working in linux)

Screenshot of linux error

rna-seq software error alignment linux r

Did you run Rscript installRPac first? It seems to me that your error is caused by a missing package.

2 answers

I fixed your post.

You are using a version of gcc that is too advanced. You have to compile it with a version pre gcc v5.0 (I think) - try gcc v4.1 if possible. I am not sure if you can even install that easily on your Ubuntu 18.04 OS. As you say that this is your first time working in linux, please ask your System Administrator, or a friend / colleague who has experience in this area.

Kevin

Hello Kevin, This certainly worked for me. I used another version of gcc and it resolved my issue. However,Working on the SOP given in the link, I was trying to assemble the example data files. the first two steps ran correctly, but when I tried to run assembly on my PC,it creates the stated output files in the SOP but are empty. I have heard assembly could not be done on PCs (I tried on 64GB RAM PC via teamviewer). Could somebody reproduce the step and check if they are getting the same empty files. I need to know so I decide whether to continue using this pipeline for my own data or discard it.

Hey, I use Teamviewer, too. Do you mean that you accessed a remote Windows or Linux PC and used that? How large are your input files?

This issue can be fixed by compiling using gcc and g++ version <5. So gcc-4.8 and g++-4.8 will do the trick.
To downgrade GCC and G++:

  1. [Dangerous] Add deb http://archive.ubuntu.com/ubuntu/ bionic main universe to /etc/apt/sources.list.
    To edit the file using nano :

    1. sudo nano /etc/apt/sources.list
    2. Add deb http://archive.ubuntu.com/ubuntu/ bionic main universe
    3. Ctrl+X, Y, Enter
  2. Run sudo apt update

  3. Run sudo apt install g++-4.8

  4. Run sudo apt install gcc-4.8

  5. [Optional] You can remove the added deb repository in step 1. This will safeguard you from downloading old and outdated softwares and packages.

  6. Run sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 4

  7. Run sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 4

  8. Run sudo update-alternatives --config gcc. Choose the Selection number corresponding to version 4.8

  9. Run sudo update-alternatives --config g++. Choose the Selection number corresponding to version 4.8

Verify the versions using gcc --version and g++ --version.

Now compiling with make should work.

[Optional] To revert the versions back to a higher version, do steps 8 and 9, and choose the selection number corresponding to the higher version.

Log in to answer this question.