Skip to content
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

Problem compiling binaries in macOS #336

Closed
pablomm opened this issue Mar 22, 2021 · 7 comments
Closed

Problem compiling binaries in macOS #336

pablomm opened this issue Mar 22, 2021 · 7 comments
Labels

Comments

@pablomm
Copy link
Member

pablomm commented Mar 22, 2021

Describe the bug
Problem compiling C code from fdasrsf:

error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.14" but "10.15" during configure

In the fdasrsf package it is fixed the variable with os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.14' in the setup.py. After cloning the repository and remove the line I get the same error.
I tried to export the environment variable before running the installation with no success.

Complete trace:

Building wheel for fdasrsf (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/pablomm/scikit_fda_test2/venv/bin/python /Users/pablomm/scikit_fda_test2/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/tk/bl_pbdpj6kb7r3s584k85jxw0000gn/T/tmpo2_rkkrs
cwd: /private/var/folders/tk/bl_pbdpj6kb7r3s584k85jxw0000gn/T/pip-install-ym8nls3t/fdasrsf_a923c378ec5a4ec689f1d7459d35c8c7
Complete output (38 lines):
generating build/_DP.c
(already up-to-date)
running bdist_wheel
running build
running build_py
creating build/lib.macosx-10.15-x86_64-3.8
creating build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/plot_style.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/curve_stats.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/curve_functions.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/geodesic.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/utility_functions.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/regression.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/tolerance.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/pcr_regression.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/init.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/fPCA.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/umap_metric.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/time_warping.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/geometry.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/curve_regression.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/rbfgs.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/fPLS.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
copying fdasrsf/boxplots.py -> build/lib.macosx-10.15-x86_64-3.8/fdasrsf
running build_ext
cythoning src/optimum_reparamN2.pyx to src/optimum_reparamN2.c
cythoning src/fpls_warp.pyx to src/fpls_warp.c
cythoning src/mlogit_warp.pyx to src/mlogit_warp.c
cythoning src/ocmlogit_warp.pyx to src/ocmlogit_warp.c
cythoning src/oclogit_warp.pyx to src/oclogit_warp.c
cythoning src/optimum_reparam_N.pyx to src/optimum_reparam_N.c
cythoning src/cbayesian.pyx to src/cbayesian.cpp
building 'optimum_reparamN2' extension
creating build/temp.macosx-10.15-x86_64-3.8
creating build/temp.macosx-10.15-x86_64-3.8/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/private/var/folders/tk/bl_pbdpj6kb7r3s584k85jxw0000gn/T/pip-build-env-qnbgsf0y/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/tcl-tk/include -I/Users/pablomm/scikit_fda_test2/venv/include -I/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/optimum_reparamN2.c -o build/temp.macosx-10.15-x86_64-3.8/src/optimum_reparamN2.o
not modified: 'build/_DP.c'
error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.14" but "10.15" during configure


ERROR: Failed building wheel for fdasrsf
Building wheel for findiff (setup.py) ... done
Created wheel for findiff: filename=findiff-0.8.9-py3-none-any.whl size=29218 sha256=c2bc96e93c195fb5c2a1acbf932b5311e8e94e571edf74929eca6e019c66532d
Stored in directory: /Users/pablomm/Library/Caches/pip/wheels/df/48/68/71cc95b16d5f7c5115a009f92f9a5a3896fb2ece31228b0aa5
Successfully built findiff
Failed to build fdasrsf
ERROR: Could not build wheels for fdasrsf which use PEP 517 and cannot be installed directly

To Reproduce

virtualenv venv
source venv/bin/activate
python --version # 3.8.8 and also tried 3.9.2
pip install scikit-fda

Also, it is happening when the package is installed from code with python setup.py install

Version information

  • OS: macOS catalina 10.15.7
  • Python version: 3.9.2 and 3.8.8
  • scikit-fda version: stable master (0.5) and develop
  • gcc and g++ version: 12.0.0
@pablomm pablomm added the bug label Mar 22, 2021
@vnmabus
Copy link
Member

vnmabus commented Mar 24, 2021

I think this is probably a bug in the fdasrsf package. @jdtuck can you take a look at it?

@jdtuck
Copy link
Contributor

jdtuck commented Mar 24, 2021

I will take a look. Interesting as this has not shown up on any of the mac integration testing of mine or for cobra forge.

@jdtuck
Copy link
Contributor

jdtuck commented Mar 25, 2021

How are you install python in mac? This has to do with the system python or homebrew python. The fix is to set os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.15' in the setup.py. I am will try to make the setup.py smarter for mac os x. I don't have a lot of testing on mac so will get it in the next release.

@jdtuck
Copy link
Contributor

jdtuck commented Mar 25, 2021

This has to do with what MACOSX_DEPLOYMENT_TARGET your python was compiled for.

@jdtuck
Copy link
Contributor

jdtuck commented Mar 25, 2021

Pushing change to pypi in about 30min

@pablomm
Copy link
Member Author

pablomm commented Mar 25, 2021

@jdtuck You were right, the new version in PyPI solved the issue.
I could install the package with pip install fdasrsf==2.2.6 and after that pip install scikit-fda worked fine.

About my python installation, it's a hombrew python.

Thank you very much for your support, the issue can be closed for my part.

@vnmabus
Copy link
Member

vnmabus commented Mar 25, 2021

Closing then! Thank you, @jdtuck, for your support!

@vnmabus vnmabus closed this as completed Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants