IEDB / TCRMatch

Other
26 stars 12 forks source link

Is it possible to install TCR match on MacOS Monterey Version 12.2.1? #49

Open gianmore opened 1 year ago

gianmore commented 1 year ago

Hi, I have downloaded the latest release of TCR match and I'm trying to compile it, but I get the following error after running make in the folder

g++ -std=c++11 -fopenmp -O3 -g -o tcrmatch src/main.cpp clang: error: unsupported option '-fopenmp' clang: error: unsupported option '-fopenmp' make: *** [tcrmatch] Error 1

I have updated Xcode, cmake, gcc, libomp but still I get the same. Can you help me?

raphaeltrevizani commented 1 year ago

Hi Gianluca, TCRMatch doesn't officially support MacOS yet because of the missing openmp library, but you can try the following: brew install llvm libomp and change the g++ in the Makefile to clang. Alternatively, you can try to use docker. Let me know how it goes.

gianmore commented 1 year ago

Hi, I tried that but still I get the following error

clang -std=c++11 -fopenmp -O3 -g -o tcrmatch src/main.cpp 
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'

what can I do?

raphaeltrevizani commented 1 year ago

Can you please try export CC=/usr/local/opt/llvm/bin/clang If that doesn't work, then I'd recommend just using linux in a docker image.

gianmore commented 1 year ago

Hi, the previous didn't work. So I'm using the ubuntu:latest docker container, but when I run make in the folder I get the following error. Can you help me with this?

[root@788176f835d9:/TCRMatch-1.1.1# make
g++ -std=c++11 -fopenmp -O3 -g -o tcrmatch src/main.cpp 
make: g++: No such file or directory
make: *** [Makefile:7: tcrmatch] Error 127
raphaeltrevizani commented 1 year ago

make: g++: No such file or directory means the g++ compiler is not found in your Docker container. This is because docker images are very minimal and you have to install everything yourself.To resolve this issue, you need to install the necessary tools in your Docker container.

  1. Update Package Information:

    sudo apt-get update
  2. Install g++ and Development Tools:

    sudo apt-get install build-essentials
    sudo apt-get install g++
  3. Install the parallel library for C++ sudo apt-get install libomp-dev

RoseString commented 11 months ago

What worked for me on MacOS Ventura was:

brew install gcc # which installs the gcc-13, could take a while
brew install libomp

And then change CC = g++ to CC = g++-13 in the Makefile of TCRmatch

raphaeltrevizani commented 11 months ago

I can confirm that the method suggested by @RoseString works with g++13 (not 14 though) on MacOS Ventura. @gianmore can you test this method and see if this works for you (in case you haven't solved it using docker yet)? Thanks @RoseString for this solution!