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

pip install fails on FreeBSD (clang) #3

Closed
mike-pt opened this issue Nov 26, 2014 · 5 comments
Closed

pip install fails on FreeBSD (clang) #3

mike-pt opened this issue Nov 26, 2014 · 5 comments

Comments

@mike-pt
Copy link

mike-pt commented Nov 26, 2014

Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/usr/local/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;file='/tmp/pip_build_root/libsass/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-sWz80n-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/libsass

@mike-pt
Copy link
Author

mike-pt commented Nov 26, 2014

Forgot to past the ouput:
cc -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -DNDEBUG -fPIC -I./libsass -I/usr/local/include/python2.7 -c libsass/cencode.c -o build/temp.freebsd-11.0-CURRENT-amd64-2.7/libsass/cencode.o -c -O2 -fPIC -std=c++0x -Wall -Wno-parentheses

error: invalid argument '-std=c++0x' not allowed with 'C/ObjC'

error: command 'cc' failed with exit status 1


Cleaning up...
Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;file='/tmp/pip_build_root/libsass/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-dWhyv8-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/libsass
Storing debug log for failure in /home/user/.pip/pip.log

@gasman
Copy link
Member

gasman commented Nov 26, 2014

What version of clang are you using? According to https://github.com/dahlia/libsass-python it needs to be 2.9 or above.

@mike-pt
Copy link
Author

mike-pt commented Nov 26, 2014

it's 3.4.1 clang is the default compiler in freebsd 10+++

I've never seen this -std=c++0x.... wonder where it comes from....

@gasman
Copy link
Member

gasman commented Nov 26, 2014

Apparently "c++0x" was the name for the "c++11" standard when it was in development, so perhaps newer versions of clang have dropped the old name...

In any case, this problem here is within the libsass-python library, or - more likely - libsass itself. (django-libsass is just a wrapper for those projects, and does not deal with the C++ code directly.) You'll need to try building libsass on its own, and see if you get the same error... if so, you should raise this as a bug in that project.

@prydie
Copy link

prydie commented Jan 21, 2015

We've come up against a similar issue previously with node-sass on FreeBSD. The easiest workaround is to install gcc and set CC and CXX when running pip install -r requirements.txt. Though I agree with @gasman that the issue should be fixed upstream.

Example:

CXX=g++ CC=gcc48 /home/vagrant/app/env/bin/pip install -r /home/vagrant/app/requirements.txt

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