sararselitsky / FastPG

Fast phenograph, CyTOF
Other
25 stars 6 forks source link

Mac OS cannot find omp.h during installation #25

Open AlexSurnov opened 4 months ago

AlexSurnov commented 4 months ago

Dear developers of FastPG, please consult me how to install your package. My problem is as follows. I have Mac OS Sonoma 14.5 and the intel core i9 CPU. When running BiocManager::install("sararselitsky/FastPG"), I receive the following error message.

In file included from buildNextPhase.cpp:42: ./defs.h:52:10: fatal error: 'omp.h' file not found

include

     ^~~~~~~

1 error generated. make: *** [buildNextPhase.o] Error 1 ERROR: compilation failed for package ‘FastPG’

However, the omp.h file is there, and I can call it from gcc. For example, this code works: gcc -Xpreprocessor -fopenmp ~/example.c -I /usr/local/Cellar/libomp/18.1.8/include -L /usr/local/Cellar/libomp/18.1.8/lib -lomp -o example.bin I suspect that the installation command of FastPG cannot navigate to the directory containing openMP files in my computer. Specifically, it does not know that it should look in the folder /usr/local/Cellar/libomp/18.1.8. Please tell me, whether there is a way to specify explicitly the location of omp.h during the installation?

Thank you Alex

axitamm commented 3 months ago

I was in the same situation as you. I went here and followed the instructions: https://mac.r-project.org/openmp/

Basically, I typed the following two lines in the terminal: curl -O https://mac.r-project.org/openmp/openmp-14.0.6-darwin20-Release.tar.gz sudo tar fvxz openmp-14.0.6-darwin20-Release.tar.gz -C /

AlexSurnov commented 2 months ago

Thank you, @axitamm It's a useful link. Still, some users may be terrified by the warning header in that webpage.