question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

macOS build failing @ f652b95

See original GitHub issue

@jnothman, @agramfort, @NicolasHug (#13252)

Description

Build on macOS succeeds at f652b95adad4a54b16d64884adc0d459d7d736b1~1 but fails at f652b95adad4a54b16d64884adc0d459d7d736b1.

Steps/Code to Reproduce

git clone https://github.com/scikit-learn/scikit-learn.git cd scikit-learn pip3 install --user Cython pip3 install --user numpy pip3 install --user .

Actual Results

creating build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build
compile options: '-I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
extra options: '-fopenmp'
clang: sklearn/__check_build/_check_build.c
clang: error: unsupported option '-fopenmp'
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Users/xxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c sklearn/__check_build/_check_build.c -o build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o -MMD -MF build/temp.macosx-10.14-x86_64-3.7/sklearn/__check_build/_check_build.o.d -fopenmp" failed with exit status 1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
ogriselcommented, Mar 2, 2019

In particular: https://scikit-learn.org/dev/developers/advanced_installation.html#mac-osx

You have to use a compiler that supports openmp which is not the case of the system default “gcc” alias. You can use homebrew to install the libomp runtime and configure you environment to use the system “clang” / “clang++” compilers with that openmp runtime.

brew install libomp

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -L/usr/local/opt/libomp/lib -lomp"
export DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib
0reactions
jeremiedbbcommented, Mar 4, 2019

We could try to compile a test code and if it fails, not set the openmp flag and raise a warning that some parts of sklearn won’t be multithreaded (something similar to what’s done in astropy).

Read more comments on GitHub >

github_iconTop Results From Across the Web

If an error occurred while updating or installing macOS
Make sure that your Mac has a working and stable internet connection. Install in safe mode. Install while your Mac is started up...
Read more >
Release notes for macOS - Zoom Support
Zoom provides up-to-date release notes for our software on devices using macOS. This article contains information about recent changes to the Zoom app...
Read more >
Install GitLab Runner on macOS
Make sure that you manage GitLab Runner service from the GUI Terminal application, not the SSH connection. Failed to authorize rights (0x1) with...
Read more >
Upgrade macOS to continue receiving Microsoft 365 and ...
Learn more about upgrading Mac operating systems to continue receiving Microsoft 365 and Office for Mac updates.
Read more >
Install on Mac | Docker Documentation
Docker supports Docker Desktop on the most recent versions of macOS. ... Troubleshooting describes common problems, workarounds, how to run and submit ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found