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

Pillow fails to build on Linux #182

Closed
JD-ETH opened this issue Apr 17, 2021 · 6 comments · Fixed by #183
Closed

Pillow fails to build on Linux #182

JD-ETH opened this issue Apr 17, 2021 · 6 comments · Fixed by #183
Assignees
Labels
Bug Something isn't working Testing & Tooling Tests, tooling, and build systems

Comments

@JD-ETH
Copy link
Contributor

JD-ETH commented Apr 17, 2021

🐛 Bug

Same error appears when building the compiler_gym wheel or compiling from source. Clang misses a compiler flag: -fno-semantic-interposition

To Reproduce

Steps to reproduce the behavior:

  1. On Linux, pip install compiler_gym
  2. Or build from source gives the same error
  clang: error: unknown argument: '-fno-semantic-interposition'
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for Pillow

The error with -fno-semantic-interposition shows up a lot, omitted here.

Environment

  • CompilerGym: current development
  • How you installed CompilerGym (conda, pip, source): pip and source in a conda env.
  • OS: Linux 18.04.5 LTS
  • Python version: 3.9
  • Build command you used (if compiling from source): as in documentation
  • GCC/clang version (if compiling from source): as in documentation
  • Bazel version (if compiling from source): as in documentation
  • Versions of any other relevant libraries:

You may use the PyTorch
environment collection script
to generate most of this information. You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

Additional context

Installing pip install Pillow works ok.

@JD-ETH JD-ETH added the Bug Something isn't working label Apr 19, 2021
@ChrisCummins
Copy link
Contributor

Hey @JD-ETH, that's odd! Could you please past the output of the following two commands:

  1. git rev-parse HEAD
  2. /usr/bin/clang --version

I did encounter errors with building Pillow when I switched from Python 3.8 to 3.9, but I was able to fix them by updating dependent library versions in #160. The problem you're experience looks new to me.

Cheers,
Chris

@ChrisCummins ChrisCummins added the Testing & Tooling Tests, tooling, and build systems label Apr 19, 2021
@JD-ETH
Copy link
Contributor Author

JD-ETH commented Apr 19, 2021

The commit hash:
e6a53d3bc38a5f1a55ccf33bdff3ff1af3d76db8
clang version:

clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@ChrisCummins yeah seems like a versioning issue?

@ChrisCummins
Copy link
Contributor

Hmm. Your environment looks pretty close to the Linux CI runner. The only differences I see are an older ubuntu release (CI runner uses 20.04) and an older compiler (CI runner uses clang-9). Would it be possible to try building with a newer system compiler? I'm still not convinced that it is definitely the cause, but could help. I can't repro on any machine I have access to.

Cheers,
Chris

@JD-ETH
Copy link
Contributor Author

JD-ETH commented Apr 19, 2021

Was able to install once clang++-9 was installed. Will update the Readme to include this. Thanks!

@JD-ETH JD-ETH closed this as completed Apr 19, 2021
@JD-ETH
Copy link
Contributor Author

JD-ETH commented Apr 19, 2021

#183

@ChrisCummins
Copy link
Contributor

Great!

@ChrisCummins ChrisCummins self-assigned this Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Testing & Tooling Tests, tooling, and build systems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants