Question: Building bioinformatics tools in Ubuntu 17.10
0
gravatar for marongiu.luigi
6 months ago by
Germany, Mannheim, UMM
marongiu.luigi330 wrote:

Dear all,

I am re-building bioinformatics software in a newly acquired machine; I am using tools that I have compiled on Ubuntu 14 and 16, but the new machine has Ubuntu 17 and I am getting strange warnings and poor failure in compilation, For instance I have been using Bowtie2 in the old machine; in the new I have installed tbb with sudo apt-get install libtbb-dev then downloaded the latest Bowtie2 source and built it with make as suggested in the manual. I got, just for an example, the following errors:

diff_sample.h:180:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
      if(!diffs[d1]) diffCnt++; diffs[d1] = true;
      ^~
diff_sample.h:180:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
      if(!diffs[d1]) diffCnt++; diffs[d1] = true;
                                ^~~~~
diff_sample.h:181:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
      if(!diffs[d2]) diffCnt++; diffs[d2] = true;
      ^~
diff_sample.h:181:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
      if(!diffs[d2]) diffCnt++; diffs[d2] = true;
                                ^~~~~

that I did not obtain previously. In the old computer, for instance, bowtie2-align-l is given as 'executable shared library (application/x-executable)' with the classic purple icon; in the new computer the file compiled is listed as 'shared library (application/x-sharedlib)'. Similarly with other tools such as blast. I installed 'make' with sudo apt-get install make.

The tools are contained in the directory ~/src and then their location is exported to PATH.

Is there something funny with Ubuntu 17 or I forgot to install in the new machine some fundamental library required for the compilation?

assembly software error • 446 views
ADD COMMENTlink modified 6 months ago by h.mon20k • written 6 months ago by marongiu.luigi330
1

Why are you building things from source? Ubuntu comes with plenty of tools available via apt, including blast and bowtie.

ADD REPLYlink written 6 months ago by kloetzl990
1

Compiling from source is often the only way to get the latest version, which is desirable especially if it has bug fixes and/or new features.

ADD REPLYlink written 6 months ago by Jean-Karim Heriche16k

in the case of bowtie itself, i had a previous error with apt-get bowtie2, compiling from source was the solution.

ADD REPLYlink written 6 months ago by marongiu.luigi330
2

This should be apt install bowtie2. Packages normally install without problem with apt so I wonder what kind of error you got.

ADD REPLYlink written 6 months ago by Jean-Karim Heriche16k

probably it was apt install bowtie2 but I forgot the issue...

ADD REPLYlink written 6 months ago by marongiu.luigi330

This is probably due to using a newer compiler. Newer versions of GCC tend to produce errors where previous versions only issued warnings. It also depends on which compiler options are used. These warnings are an indication that not all is well with the code and I would report them to the developers so that the issues could be fixed before the software becomes impossible to compile with new compilers.

ADD REPLYlink written 6 months ago by Jean-Karim Heriche16k

if u17 comes with a newer compiler than u16, would be possible to downgrade the compiler? i had not these issues with u16.

ADD REPLYlink written 6 months ago by marongiu.luigi330

I got gcc 7.2.0 pm both machines. The difference is that I installed with success Bowtie2 on ubuntu16 and I am now getting errors while compiling on ubuntu17.

ADD REPLYlink written 6 months ago by marongiu.luigi330

Same kind of error with BWA, the file produced by the compilation is a shared library rather than an executable. It is not just an issue of Bowtie.

ADD REPLYlink written 6 months ago by marongiu.luigi330

What exactly the compilation produced? Did you try:

./bwa
ADD REPLYlink written 6 months ago by h.mon20k

actually now it works like an executable...

ADD REPLYlink written 6 months ago by marongiu.luigi330

HISAT2 is also built as shared library instead of executable, even if in this case I could not locate the libraries MSYS and zlib, also the pre-compiled binaries for linux are not available.

ADD REPLYlink written 6 months ago by marongiu.luigi330

What do you mean by "is built as a shared library". Did you try:

./hisat2 --help
ADD REPLYlink written 6 months ago by h.mon20k

since I am getting the issue that -- even if the compilation succeed -- the executables are listed as shared libraries, can I compile the tools on the old Ubuntu 16 machine and the copy them in the new Ubuntu 17 machine?

ADD REPLYlink written 6 months ago by marongiu.luigi330

Did you try to run these "shared objects"? See this:

Executables vs Shared objects

ADD REPLYlink modified 6 months ago • written 6 months ago by h.mon20k
3
gravatar for h.mon
6 months ago by
h.mon20k
Brazil
h.mon20k wrote:

Why compile if there is an official Bowtie2 binary download:

https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.4.1/bowtie2-2.3.4.1-linux-x86_64.zip

Also, I don't know how conda hasn't been mentioned so far - and I only mentioning it for the sake of completeness, as I appreciate its usefulness but don't like it for every case, and only use it sparingly.

ADD COMMENTlink modified 6 months ago • written 6 months ago by h.mon20k

I installed the folder you suggested on ~/src but all the executables are not executable, for instance -rwxr-xr-x bowtie2, -rw-r--r-- bowtie2-build and -rw-r--r-- bowtie2-align-l (the latter is executable because I changed it manually). This is something that does not occur while compiling from source. Also, I like to know where the files are installed so I am not quite happy to use conda or apt.

ADD REPLYlink written 6 months ago by marongiu.luigi330

I never had this problem with bowtie or bowtie2. Do you have some special file system configuration?

I like to know where the files are installed so I am not quite happy to use conda or apt.

It is just a matter of reading documentation. I know where all my conda packages are installed, and I can check all files installed with apt-get install from any package.

ADD REPLYlink written 6 months ago by h.mon20k
2
gravatar for Charles Plessy
6 months ago by
Charles Plessy2.5k
Japan
Charles Plessy2.5k wrote:

Ubuntu Bionic already comes with a bowtie 2.3.4.1 package. It was compiled with GCC7 as you can see from the build logs. The package was made after correcting the sources with the following patch (plus others). Maybe you can try applying it if you still want to compile Bowtie from source. But as written in the other comments, apt install bowtie2 is your friend!

ADD COMMENTlink written 6 months ago by Charles Plessy2.5k
0
gravatar for jomo018
6 months ago by
jomo018420
jomo018420 wrote:

It is just a new warning in compiler GCC 6. Intended for programmers, probably those writing in both C++ and Python, where command indentation has different meaning. I would guess program behaviour (or misbehaviour...) would be exactly same as before.

ADD COMMENTlink written 6 months ago by jomo018420

well, actually the executables are not being built, as the case of bowtie shows. the compilation runs but fails. i believe most of the problems are due to floating point handling.

ADD REPLYlink written 6 months ago by marongiu.luigi330
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 747 users visited in the last hour