3

I have tried to install assimpcy on Mac Big Sur 11.2.3 (Silicon), despite installing gcc with the brew and Xcode tools, I have the following error when trying to install assimpcy via pip or building from git

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/isee/Documents/P3D/env/lib/python3.9/site-packages/numpy/core/include -I/Users/isee/Documents/P3D/env/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ./assimpcy/all.cpp -o build/temp.macosx-10.9-universal2-3.9/./assimpcy/all.o -fopenmp
    clang: error: unsupported option '-fopenmp'
    clang: error: unsupported option '-fopenmp'
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------

UPDATE

Tried to install and use gcc compiler from home-brew, which now gives:

gcc-10: warning: this compiler does not support X86 (arch flags ignored)
gcc-10: error: unrecognized command-line option '-stdlib=libc++'
error: command '/opt/homebrew/bin/gcc-10' failed with exit code 1

So is there anyway to get this to run at all in the end ?

Trffier
  • 31
  • 3
  • did you try it w/o the unsupported option ? (i.e. without `-fopenmp`) – blurfus Mar 24 '21 at 23:03
  • Can you specify the option from `pip install assimpcy`? Don't think so :/ – Trffier Mar 24 '21 at 23:08
  • 1
    I think this is an adaptation problem with new silicon architechture, I would suggest to open an Issure on github. If -fopenmp really is openMPI as i suspect, you could try installing and compiling binaries from openMPI website itself. I am just assuming though, i remember having similar problems on ubuntu when I used arm64 OS. – Bijay Regmi Mar 24 '21 at 23:18
  • According to doesitarm.com open-mpi is fully silicon compatible, it seems like a complete issue Xcode is providing clang as a link to gcc – Trffier Mar 24 '21 at 23:24
  • can you try `brew install libomp libllvm` – Bijay Regmi Mar 24 '21 at 23:47
  • `libomp` is installed already and `libllvm` does not exist – Trffier Mar 25 '21 at 10:55

1 Answers1

0

I guess the assimpcy tries to use OpenMP for its build. The option

gcc ... -fopenmp

will enable the OpenMP-support only for the GCC-compiler. Unfortunately, you are working with clang on your Mac M1. From my point of view you have 2 options to work around this issue:

  1. Switch to GCC for your use case, if this is possible
  2. Fix the compiler option for clang my using -fopenmp=libiomp5 for your clang-compiler. I guess you will have to fix the assimpcy build in their repo.

Hope that helps a little bit.

KimKulling
  • 2,654
  • 1
  • 15
  • 26