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

Compile failure for missing 'CC' in the environment #225

Closed
manodeep opened this issue Jul 11, 2020 · 4 comments
Closed

Compile failure for missing 'CC' in the environment #225

manodeep opened this issue Jul 11, 2020 · 4 comments
Assignees

Comments

@manodeep
Copy link
Owner

General information

Reported by Meredith Clark Powell, with the issue faced Riley Jane Shaper

  • Corrfunc version: 2.3.3+
  • platform: any
  • installation method (pip/source/other?): source

Issue description

Compilation fails when 'CC' is not defined in the environment

Expected behavior

Corrfunc should compile with some default compiler (or fail when the default compiler is unavailable)

Actual behavior

A KeyError is raised. Here's the traceback

 $ python -m pip install . --user

Processing /data/rjshaper/software/Corrfunc

    ERROR: Command errored out with exit status 1:

     command: /home/rjshaper/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-0egvp1cp/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-0egvp1cp/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-0egvp1cp/pip-egg-info

         cwd: /tmp/pip-req-build-0egvp1cp/

    Complete output (11 lines):

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/tmp/pip-req-build-0egvp1cp/setup.py", line 558, in <module>

        setup_packages()

      File "/tmp/pip-req-build-0egvp1cp/setup.py", line 442, in setup_packages

        common_dict = requirements_check()

      File "/tmp/pip-req-build-0egvp1cp/setup.py", line 238, in requirements_check

        if os.environ['CC']:

      File "/home/rjshaper/anaconda3/lib/python3.7/os.py", line 679, in __getitem__

        raise KeyError(key) from None

    KeyError: 'CC'

    ----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

What have you tried so far?

N/A

Minimal failing example

Checking out the master branch from the repo, and undef'ing 'CC' (if defined) reproduces the error

Additional notes

This bug was introduced in #220

@rjshaper
Copy link

Hi,
I am getting an error when I try to do this. My input was:
$ git checkout fix_env_cc
and the output I got was:
error: pathspec 'fix_env_cc' did not match any file(s) known to git.
What else can I try?

@lgarrison
Copy link
Collaborator

@rjshaper Can you try git pull first?

@rjshaper
Copy link

@lgarrison That fixed it. Thank you!

@manodeep
Copy link
Owner Author

manodeep commented Aug 5, 2020

Fixed by #226

@manodeep manodeep closed this as completed Aug 5, 2020
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

3 participants