cancerit / BRASS

Breakpoints via assembly - Identifies breaks and attempts to assemble rearrangements in whole genome sequencing data.
GNU Affero General Public License v3.0
57 stars 20 forks source link

building 'brass/c++' on Mac OS #36

Closed nvolkova closed 7 years ago

nvolkova commented 8 years ago

Sorry for posting multiple issues, I managed to solved everything, but I also thought it could help others who would try to do the same. I am trying to build BRASS in OS X El Capitain 10.11.4. The problem arose while trying to build 'brass' with sudo ./setup.sh /installation_path. make -C cansam works after adding pstreams/pstreams.h (it still wants it to be in the same folder although it's not present in the archive that setup.h unzips) make -C c++ goes fine till g++ -Wall -Wextra -g -I../cansam -O2 -c -o rearrgroup.o rearrgroup.cpp, where default Mac compiler clang++ throws multiple exceptions of this type:

error: invalid operands to binary expression

After that I could only proceed by switching to non-Mac g++ compiler, and was still getting multiple errors of this type:

Undefined symbols for architecture x86_64

Then I tried copying all the dependencies from brass-group.cpp and rearrgroup.cpp into feature.h and rearrgroup.h, and after that the whole compilation of c++ part went fine. So I think it may make sense to copy these dependencies into .h files from the very beginning, if installing this package on Mac.

keiranmraine commented 8 years ago

Hi,

I've personally never attempted to build Brass on OSX as I wouldn't expect it to be possible to run an analysis on my box due to memory requirements. We've only used it on major linux distributions like Ubuntu, CentOS, AmazonLinux. What is the memory size of your host? If it looks like it's capable of running brass I can attempt to debug the problems (my laptop is El Capitan).

It seems odd that this compiler issue occurs requiring copying of dependancies, I suspect there should be some linker/compiler flags to resolve this but I'll need to discuss with greater minds than mine (inherited support).

Thanks for bringing this to our attention though.