Building bioinformatics tools in Ubuntu 17.10
3
0
Entering edit mode
5.0 years ago

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 • 1.9k views
1
Entering edit mode

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

1
Entering edit mode

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.

0
Entering edit mode

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

2
Entering edit mode

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

0
Entering edit mode

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

0
Entering edit mode

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.

0
Entering edit mode

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

0
Entering edit mode

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.

0
Entering edit mode

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.

0
Entering edit mode

What exactly the compilation produced? Did you try:

./bwa

0
Entering edit mode

actually now it works like an executable...

0
Entering edit mode

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.

0
Entering edit mode

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

./hisat2 --help

0
Entering edit mode

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?

0
Entering edit mode

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

Executables vs Shared objects

3
Entering edit mode
5.0 years ago
h.mon 34k

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.

0
Entering edit mode

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.

0
Entering edit mode

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.

2
Entering edit mode
5.0 years ago
Charles Plessy ★ 2.9k

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!

0
Entering edit mode
5.0 years ago
jomo018 ▴ 690

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.

0
Entering edit mode

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.