Comments (12)
Gentoo is elevating the warning to an error, that's on them
from libsass-python.
We're definitely not. It's Clang that's bailing out.
Note that in this case, it's not just saying "unknown argument, treating as an error" (which Clang can do and there's a way to suppress it), it's actually saying "-std is valid for C but I have no idea what value you just told me to use" (because C++ happens to have a -std too). In this case, it's not an unknown option causing the failure, but garbage ("c++0x", wrt a C compiler) passed into an argument which happens to be valid in C (-std).
But it's always invalid to pass CXXFLAGS to a C compiler anyway. For example, -Werror=odr is completely valid for C++, and means nothing for C. So, even if we were, it'd be something to fix (if minor).
Could you elaborate on what you mean please?
from libsass-python.
it's building fine for us on clang so it's (as last time and as usual with Gentoo) something they're doing
from libsass-python.
The flags setup.py
passes to CC
are always C++ only. There's no variable used to just pass to CC.
On a fresh clone of libsass-python:
$ python setup.py build
/usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running build
running build_py
running build_ext
building '_sass' extension
x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -fPIC -DPy_LIMITED_API -I./libsass/include -I/usr/include/python3.11 -c _sass.c -o build/temp.linux-x86_64-cpython-311/_sass.o -fPIC -std=gnu++0x -Wall -Wno-parentheses -Werror=switch -DLIBSASS_VERSION=\"3.6.5\"
cc1: warning: command-line option ‘-std=gnu++11’ is valid for C++/ObjC++ but not for C
x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -fPIC -DPy_LIMITED_API -I./libsass/include -I/usr/include/python3.11 -c libsass/src/ast.cpp -o build/temp.linux-x86_64-cpython-311/libsass/src/ast.o -fPIC -std=gnu++0x -Wall -Wno-parentheses -Werror=switch -DLIBSASS_VERSION=\"3.6.5\"
/tmp/libsass-python $ CC=clang python setup.py build
/usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running build
running build_py
running build_ext
building '_sass' extension
clang -Wsign-compare -DNDEBUG -fPIC -DPy_LIMITED_API -I./libsass/include -I/usr/include/python3.11 -c _sass.c -o build/temp.linux-x86_64-cpython-311/_sass.o -fPIC -std=gnu++0x -Wall -Wno-parentheses -Werror=switch -DLIBSASS_VERSION=\"3.6.5\"
error: invalid argument '-std=gnu++0x' not allowed with 'C'
error: command '/usr/lib/llvm/15/bin/clang' failed with exit code 1
It's just that GCC doesn't bail out on this, but Clang does. setup.py doesn't treat CC
and CXX
differently and hence always passes C++ specific flags.
Could you show me where e.g. your CI builds with Clang so I can try spot what the difference is? I looked at Azure but I couldn't spot the right part. Thanks!
from libsass-python.
the macos builds run on clang for example
from libsass-python.
The MacOS builds use platform.system() == 'Darwin'
code path that applies different flags than Linux builds. Also, clang's behavior varies across platforms.
from libsass-python.
Would be cool if developers actually listened to maintainers instead of blaming them for reporting errors :)
from libsass-python.
would be cool if package maintainers actually maintained instead of throwing things over the fence -- our builds are green
from libsass-python.
Passing checks is only sufficient if checks encompass the whole scope. If you don't care about clang on Linux, just say that instead.
from libsass-python.
would be cool if package maintainers actually maintained instead of throwing things over the fence -- our builds are green
What is this supposed to mean? The package maintainers are maintaining it, in fact the problem has already been fixed in the Gentoo repository. This Issue is an attempt to bring the fix to the rest of Linux, hardly "throwing things over the fence", I would appreciate a more constructive attitude from your side.
from libsass-python.
I don't see a patch?
from libsass-python.
I don't see a patch?
You can find the sed command we use to fix this issue in the bug report I linked in my first post. But since you asked so nicely I went ahead and put it in a patch form for you:
diff --git a/setup.py b/setup.py
index a3719a9..95ccf1f 100644
--- a/setup.py
+++ b/setup.py
@@ -15,10 +15,10 @@ from setuptools import setup
MACOS_FLAG = ['-mmacosx-version-min=10.7']
FLAGS_POSIX = [
- '-fPIC', '-std=gnu++0x', '-Wall', '-Wno-parentheses', '-Werror=switch',
+ '-fPIC', '-Wall', '-Wno-parentheses', '-Werror=switch',
]
FLAGS_CLANG = ['-c', '-O3'] + FLAGS_POSIX + ['-stdlib=libc++']
-LFLAGS_POSIX = ['-fPIC', '-lstdc++']
+LFLAGS_POSIX = ['-fPIC', ]
LFLAGS_CLANG = ['-fPIC', '-stdlib=libc++']
sources = ['_sass.c']
from libsass-python.
Related Issues (20)
- Add wheels for musl linux HOT 6
- Different behaviour when reading from filename vs string HOT 1
- Compiler does not remove `@use` rules HOT 1
- Typo in Changelog version HOT 3
- compile bulma sass? HOT 2
- Bizarre incompatibility between googlecloudprofiler and libsass HOT 2
- Compilation Failures with Py_DEBUG enabled HOT 9
- Importers return errors with full tracebacks HOT 1
- How to use libsass with boussole through a single python process? HOT 1
- 0.22.0: documentation seems is not ready for sphinx 6.1.3
- ERROR: Could not build wheels for sass, which is required to install pyproject.toml-based projects` HOT 2
- How to use in toml based projects HOT 1
- Compile error when compiling Foundation SCSS witin Sanic Framework using sanic-sass HOT 1
- Unit tets faileurs: test_build_one, test_stack_trace_formatting HOT 2
- Support Python 3.12 HOT 1
- Release version with wheels for python > 3.7 HOT 2
- math loading errors with libsass 0.22.0 HOT 1
- Missing wheels for M1 macs, does not compile on macOS 13.4 HOT 4
- Is '@use' supported? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsass-python.