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

Fix MacOS installation and testing #5

Open
aarondettmann opened this issue Sep 11, 2019 · 6 comments
Open

Fix MacOS installation and testing #5

aarondettmann opened this issue Sep 11, 2019 · 6 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Comments

@aarondettmann
Copy link
Member

Compilation on MacOS fails. Running pip install -e . yields

     ERROR: Command errored out with exit status 1:
     command: .../bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'...pytornado/setup.py'"'"'; __file__='"'"'...pytornado/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: ...pytornado/
    Complete output (25 lines):
    running develop
    running egg_info
    writing src/lib/pytornado.egg-info/PKG-INFO
    writing dependency_links to src/lib/pytornado.egg-info/dependency_links.txt
    writing requirements to src/lib/pytornado.egg-info/requires.txt
    writing top-level names to src/lib/pytornado.egg-info/top_level.txt
    reading manifest file 'src/lib/pytornado.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'src/lib/pytornado.egg-info/SOURCES.txt'
    running build_ext
    building 'pytornado.aero.c_vlm' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/src
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado/aero

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I.../include -arch x86_64 -I.../include -arch x86_64 -Isrc/lib/pytornado/aero/ -I/usr/include/python3.6 -I.../lib/python3.6/site-packages/numpy/core/include/numpy -I.../lib/python3.6/site-packages/numpy/core/include -I.../include/python3.6m -c src/lib/pytornado/aero/c_vlm.cpp -o build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado/aero/c_vlm.o
    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from src/lib/pytornado/aero/c_vlm.cpp:39:
    src/lib/pytornado/aero/c_vlm.h:53:10: fatal error: 'iostream' file not found
    #include <iostream>
             ^~~~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: .../bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'...pytornado/setup.py'"'"'; __file__='"'"'...pytornado/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
@aarondettmann aarondettmann added the bug Something isn't working label Sep 11, 2019
@aarondettmann aarondettmann changed the title Compilation on MacOS fails Fix MacOS installation and testing Jan 3, 2020
@aarondettmann
Copy link
Member Author

TODO

  • Update documentation with instructions for installations on MacOS.
  • Add MacOS tests on TravisCI.

@aarondettmann aarondettmann added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 3, 2020
@aarondettmann aarondettmann self-assigned this Jan 3, 2020
aarondettmann added a commit that referenced this issue Jan 4, 2020
@aarondettmann
Copy link
Member Author

  • TravisCI test has been added for MacOS, i.e. PyTornado can be installed and run on MacOS.
  • Further MacOS issues will be addressed based on user reports.

@aidanjungo
Copy link
Collaborator

I still get the error "error: command 'gcc' failed with exit status 1" when I try to install PyTornado on macOS Catalina. I tried "pip install pytornado" or locally after cloning the repository "pip install . " Should I do something special to make it works?

@aarondettmann
Copy link
Member Author

aarondettmann commented Mar 20, 2020

Hi Aidan, thanks for reporting this. Unfortunately, I cannot help too much with this since I don't have any MacOS system to test this on myself. As you may have seen in my comment above, I have extended the TravisCI tests, so I know that PyTornado should be able to run on MacOS.

  • Could you please post the entire log (or the error part of the log), so we can narrow down what goes wrong?
  • Also, please check that you have the Python development packages installed (don't know how MacOS handles these packages). Also the standard C/C++ header files are required.
  • You could also get in contact with Fei (https://github.com/fei-von-sivers). She has managed to install PyTornado on MacOS.

Btw: pip install pytornado still does not work (since we do not provide any binaries at the moment). We should perhaps find a solution for this or change the PyPI package with some dummy package, and update/clarify the documentation...

@aarondettmann aarondettmann reopened this Mar 20, 2020
@aidanjungo
Copy link
Collaborator

Hi Aaron,
I redid some tests, but the error I get is exactly the same that I got in September (first message of this issue). Apparently it is a common problem with the "#include ", but I cannot find a way to solve it with Catalina OS.
@fei-von-sivers did you also have this error during your installation?

@aidanjungo
Copy link
Collaborator

I think I solve the problem, before I was trying to install pyTornado from a Conda environment, because of that it could not access to the gcc library of my Mac. So, I deactivate the Conda environment before I install pyTornado.
I also install (but not sure if made a difference) "Command line Tools for Xcode" which is a lighter version of Xcode and it contains the GCC compiler.
@aarondettmann I think now you can close this issue :)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants