statisticalbiotechnology / quandenser

QUANtification by Distillation for ENhanced Signals with Error Regulation
Apache License 2.0
9 stars 1 forks source link

GCC version naming prevents compiling #1

Closed TimothyOlsson closed 5 years ago

TimothyOlsson commented 5 years ago

Hi,

I tried to compile quandenser according to "Installation from source" in the readme.md, but it crashes when building maracluster (I'm using Ubuntu for Windows with Linux undersystem). The problem lies within the lib files from proteowizard and how they are named.

After all the dependencies are installed from ./quickbuild.sh and proteowizard has been unpacked, it crashes when looking for the the lib files when compiling maracluster. I went into _"admin/builders/ubuntu64build.sh" and enabled _"-DBoostDEBUG=1" and got this output --> gcc_problem.txt

FindBoost detects that I have gcc7 installed, thus it looks for files named: _libboostfilesystem-gcc7-mt-s.a while the lib files in "../build/ubuntu64/tools/lib" are called _libboostfilesystem-gcc-mt-s.a <-- one of many files named gcc

Adding "7" to all filenames that has the substring "gcc" in them made it work and you can successfully compile the .deb file. It doesn't seem to be a problem with any other installed software, since testing on a fresh install of ubuntu with only java version "1.8.0_191" on it still has the same problem.

I found a way that might fix the gcc issue when compiling, by adding this line after line 78 in admin/builders/ubuntu64_build.sh

find ../lib -name '*gcc*' -exec bash -c ' gcc_name="gcc$(gcc -dumpversion)"; mv $0 ${0/gcc/$gcc_name}' {} \;

One problem with this approach is that if you run the command several times, it appends the gcc-version many times (ex gcc77). However, since command is run only if the proteowizard folder doesn't exist, it should not matter.

Best regards, Timothy Bergström

MatthewThe commented 5 years ago

Thanks for reporting this, I indeed run into the same problem. Your fix would indeed work, though a cleaner solution would be to create soft links for each of the boost libraries as has now been implemented in the crux-toolkit (https://github.com/crux-toolkit/crux-toolkit/pull/422/commits/09c1d0963709b66744890f8130e2f9dae4df3ec3):

ln -s -f libboost_chrono-*.a libboost_chrono.a
ln -s -f libboost_date_time-**.a libboost_date_time.a
...

I will give this a try.

N.B.: This also impacts the MaRaCluster builds