Opened 5 months ago

Closed 5 months ago

#69712 closed defect (fixed)

py312-contourpy @1.2.1 build fails due to -Werror

Reported by: Gandoon (Erik Hedlund) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc:
Port: py-contourpy

Description

I am attempting to upgrade to the most recent py312-contourpy @1.2.1 and I run into several errors exemplified below. Errors are thrown in step 5-13, 14 is never reported (I guess because of a make -j 8 or similar). I noticed a reference to pybind11 so I forced a rebuild of py312-pybind11 to see if it helped, but it didn't.

As py312-matplotlib depends on py312-contourpy I had to upgrade that port with port -v -p upgrade py312-matplotlib which builds with the old py312-contourpy @1.2.0_0.

The first of several kwarg errors:

[5/14] /usr/bin/clang++ -Isrc/_contourpy.cpython-312-darwin.so.p -Isrc -I../src -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pybind11/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -Werror -std=c++17 -O3 -arch x86_64 -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DCONTOURPY_VERSION=1.2.1 -MD -MQ src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o -MF src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o.d -o src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o -c ../src/mpl2005.cpp
FAILED: src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o
/usr/bin/clang++ -Isrc/_contourpy.cpython-312-darwin.so.p -Isrc -I../src -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pybind11/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -Werror -std=c++17 -O3 -arch x86_64 -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DCONTOURPY_VERSION=1.2.1 -MD -MQ src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o -MF src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o.d -o src/_contourpy.cpython-312-darwin.so.p/mpl2005.cpp.o -c ../src/mpl2005.cpp
In file included from ../src/mpl2005.cpp:1:
In file included from ../src/mpl2005.h:4:
In file included from ../src/contour_generator.h:4:
In file included from ../src/common.h:4:
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1145:38: error: loop variable 'kwarg' is always a copy because the range of type 'pybind11::dict' does not return a reference [-Werror,-Wrange-loop-analysis]
                    for (const auto &kwarg : kwargs) {
                                     ^
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1145:26: note: use non-reference type 'std::__1::pair<pybind11::handle, pybind11::handle>'
                    for (const auto &kwarg : kwargs) {
                         ^~~~~~~~~~~~~~~~~~~
1 error generated.

Attachments (1)

contourpy-main-20240410.log (36.8 KB) - added by Gandoon (Erik Hedlund) 5 months ago.
Failed build of py312-contourpy @1.2.1

Download all attachments as: .zip

Change History (3)

Changed 5 months ago by Gandoon (Erik Hedlund)

Attachment: contourpy-main-20240410.log added

Failed build of py312-contourpy @1.2.1

comment:1 Changed 5 months ago by jmroot (Joshua Root)

Owner: set to reneeotten
Port: py-contourpy added; py312-contourpy removed
Status: newassigned
Summary: Broken upgrade to py312-contourpy @1.2.1 from @1.2.0py312-contourpy @1.2.1 build fails due to -Werror

comment:2 Changed 5 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In c4a0e3bf0eeabf4c84cc0b576f85c4774c440d6f/macports-ports (master):

py-contourpy: disable -Werror during compilation

Closes: #69712

Note: See TracTickets for help on using tickets.