Skip to content

-fopenmp error on Mac with M1 Chip #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
savoygrizzly opened this issue Mar 24, 2021 · 3 comments
Open

-fopenmp error on Mac with M1 Chip #7

savoygrizzly opened this issue Mar 24, 2021 · 3 comments

Comments

@savoygrizzly
Copy link

The following issue happens when trying to install assimpcy on Mac with the new m1 chip

assimp, llv, gcc and Xcode tools are installed as well as numpy & various deps

Collecting assimpcy
  Using cached AssimpCy-1.1.1.tar.gz (194 kB)
Requirement already satisfied: numpy in /Users/isee/Documents/P3D/env/lib/python3.9/site-packages (from assimpcy) (1.21.0.dev0+1119.gbadbf7032)
Building wheels for collected packages: assimpcy
  Building wheel for assimpcy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/isee/Documents/P3D/env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"'; __file__='"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-wheel-qpxg1e8i
       cwd: /private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-universal2-3.9
  creating build/lib.macosx-10.9-universal2-3.9/assimpcy
  copying assimpcy/__init__.py -> build/lib.macosx-10.9-universal2-3.9/assimpcy
  running build_ext
  skipping './assimpcy/all.cpp' Cython extension (up-to-date)
  building 'assimpcy.all' extension
  creating build/temp.macosx-10.9-universal2-3.9
  creating build/temp.macosx-10.9-universal2-3.9/assimpcy
  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
  ----------------------------------------
  ERROR: Failed building wheel for assimpcy
  Running setup.py clean for assimpcy
Failed to build assimpcy
Installing collected packages: assimpcy
    Running setup.py install for assimpcy ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/isee/Documents/P3D/env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"'; __file__='"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-record-z049u1xv/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isee/Documents/P3D/env/include/site/python3.9/assimpcy
         cwd: /private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-universal2-3.9
    creating build/lib.macosx-10.9-universal2-3.9/assimpcy
    copying assimpcy/__init__.py -> build/lib.macosx-10.9-universal2-3.9/assimpcy
    running build_ext
    skipping './assimpcy/all.cpp' Cython extension (up-to-date)
    building 'assimpcy.all' extension
    creating build/temp.macosx-10.9-universal2-3.9
    creating build/temp.macosx-10.9-universal2-3.9/assimpcy
    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
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/isee/Documents/P3D/env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"'; __file__='"'"'/private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-install-qgr8oc9t/assimpcy_362a15230e0d46d89f9a1a60cdaa5483/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dh/pf46ptj579b7kqxhrkk3h4m80000gn/T/pip-record-z049u1xv/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isee/Documents/P3D/env/include/site/python3.9/assimpcy Check the logs for full command output
@jsfrancal
Copy link

jsfrancal commented May 19, 2021

Unfortunately the author of this package hasn't been responding to pull requests for more than a year. My fork of the project fixes this issue provided you install a more recent OpenMP enabled C++ compiler via brew (brew install llvm) or macports (e.g. sudo port install clang-11).
https://github.com/jsfrancal/AssimpCy

@jr-garcia
Copy link
Owner

@sosickstudio can you verify if #4 solves this for you?

@RobertBiehl
Copy link

For me the issue persists.

      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/rbiehl/miniconda3/envs/LLaVA/include -arch arm64 -fPIC -O2 -isystem /Users/rbiehl/miniconda3/envs/LLaVA/include -arch arm64 -I/opt/homebrew/opt/openjdk@11/include -I/private/var/folders/0_/3ftp0_bj2ps_v0x5pdfvv8bh0000gp/T/pip-build-env-argm9ucu/overlay/lib/python3.10/site-packages/numpy/core/include -I/private/var/folders/0_/3ftp0_bj2ps_v0x5pdfvv8bh0000gp/T/pip-install-6_p5le4w/assimpcy_4c54295c0fe74b10ab946056c5d2c14a/files/include -I/private/var/folders/0_/3ftp0_bj2ps_v0x5pdfvv8bh0000gp/T/pip-install-6_p5le4w/assimpcy_4c54295c0fe74b10ab946056c5d2c14a/files/include/assimp -I/Users/rbiehl/miniconda3/envs/LLaVA/include/python3.10 -c ./assimpcy/all.cpp -o build/temp.macosx-11.1-arm64-cpython-310/./assimpcy/all.o -stdlib=libc++ -fopenmp
      clang: error: unsupported option '-fopenmp'
      error: command '/usr/bin/clang' failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants