Opened 4 years ago
Last modified 4 years ago
#61299 closed defect
python3x: -Wno-unused-result in _sysconfigdata__darwin_darwin.py unrecognized by gcc 4.2 — at Version 4
Reported by: | chrstphrchvz (Christopher Chavez) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | tobypeterson | |
Port: | python37 python38 python39 py-cchardet py-pycryptodome py-fann2 |
Description (last modified by chrstphrchvz (Christopher Chavez))
python37
, python38
, and python39
ports build using -Wno-unused-result
; this argument gets saved in CFLAGS
and other variables in _sysconfigdata__darwin_darwin.py, and is used again when building ports for Python modules. On macOS 10.6, Python itself is built using an alternative compiler (e.g. MacPorts' clang 3.7 or clang 9.0) which recognizes -Wno-unused-result
, but modules (e.g. py3x-cchardet
) might try to build using a system compiler (e.g. gcc 4.2) which doesn't recognize the option:
/usr/bin/gcc-4.2 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/ -Isrc/ext/uchardet/src -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.6-x86_64-3.9/src/cchardet/_cchardet.o cc1plus: error: unrecognized command line option "-Wno-unused-result"
Possibly related to #56458. (I personally am not using macOS 10.6.)
Change History (4)
comment:1 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Port: | py-cchardet added; py-chardet removed |
---|
comment:2 follow-up: 3 Changed 4 years ago by kencu (Ken)
comment:3 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Port: | py-fann2 added |
---|
py38-fann2
is another example:
/usr/bin/gcc-4.2 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/ -DSWIG_COMPILE -I./include -I../include -Iinclude -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c fann2/fann2_wrap.cxx -o build/temp.macosx-10.6-x86_64-3.8/fann2/fann2_wrap.o cc1plus: error: unrecognized command line option "-Wno-unused-result"
Replying to kencu:
other than bootstrapping, or a few ports needed to bootstrap clang-9.0, like clang-3.7, every build on 10.6.8 should be using clang-9.0 to build.
Why is this not the case on the 10.6 builders?
comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Description: | modified (diff) |
---|---|
Port: | python39 py-pycryptodome added; python36 removed |
python39
is affected; python35
and python36
are not affected.
py37-pycryptodome
and py38-pycryptodome
are additional examples of ports failing to build on 10.6 because of this issue.
other than bootstrapping, or a few ports needed to bootstrap clang-9.0, like clang-3.7, every build on 10.6.8 should be using clang-9.0 to build.
I think the question might be how could
py3x-cchardet
be using the ancientgcc-4.2
and let's fix that if possible.(I am using 10.6, all day, every day, and have never seen any such error with thousands of ports installed, by the way.)