This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Installing vg on Mac failed due to "Could not find libomp"

Hi, I' trying to install vg on my MacBook, but got errors after installing all dependencies:

...
The compiler is Apple Clang that needs libomp for OpenMP support.
Makefile:39: *** Could not find libomp. Please install it using Homebrew or MacPorts..  Stop.
make: *** [lib/libgcsa2.a] Error 2

The command brew info libomp returns:

==> libomp: stable 20.1.0 (bottled) [keg-only]
...

Exporting the PATH doesn't change anything.

vg

1 answer

Keg-only so you need to specify additional flags yourself as per this example fix

  export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"

Note: I just googled "Could not find libomp macos" so I can't comment on details but I have had similar issues with other libraries when compiling so it makes sense.

Log in to answer this question.