[MacPorts] #67491: py-matplotlib fails to build with gcc: cc1obj: error: '-Werror=unguarded-availability': no option '-Wunguarded-availability'
MacPorts
noreply at macports.org
Wed May 24 14:01:20 UTC 2023
#67491: py-matplotlib fails to build with gcc: cc1obj: error: '-Werror=unguarded-
availability': no option '-Wunguarded-availability'
----------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: py-matplotlib |
----------------------------+--------------------
Comment (by barracuda156):
The code is hopelessly broken.
{{{
building 'matplotlib.backends._macosx' extension
creating build/temp.macosx-10.6-ppc-
cpython-311/matplotlib.backends._macosx
creating build/temp.macosx-10.6-ppc-
cpython-311/matplotlib.backends._macosx/src
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_python_py-
matplotlib/py311-matplotlib/work/compwrap/cc/opt/local/bin/gcc-mp-12 -fno-
common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11
-c src/_macosx.m -o build/temp.macosx-10.6-ppc-
cpython-311/matplotlib.backends._macosx/src/_macosx.o -arch ppc -isysroot/
-fvisibility=hidden
src/_macosx.m: In function 'FigureManager_init':
src/_macosx.m:703:5: warning: 'Window' may not respond to
'-backingScaleFactor'
703 | [view updateDevicePixelRatio: [window backingScaleFactor]];
| ^
src/_macosx.m:703:5: warning: (messages without a matching method
signature will be assumed to return 'id' and accept '...' as arguments)
src/_macosx.m:703:5: error: incompatible type for argument 1 of
'updateDevicePixelRatio:'
703 | [view updateDevicePixelRatio: [window backingScaleFactor]];
| ^
| |
| id
src/_macosx.m:703:5: note: expected 'double' but argument is of type 'id'
src/_macosx.m: In function 'FigureManager_resize':
src/_macosx.m:799:9: warning: 'Window' may not respond to
'-backingScaleFactor'
799 | CGFloat device_pixel_ratio = [window backingScaleFactor];
| ^~~~~~~
src/_macosx.m:799:38: error: incompatible types when initializing type
'CGFloat' {aka 'float'} using type 'id'
799 | CGFloat device_pixel_ratio = [window backingScaleFactor];
| ^
src/_macosx.m: In function '-[View windowDidChangeBackingProperties:]':
src/_macosx.m:1614:5: warning: 'Window' may not respond to
'-backingScaleFactor'
1614 | [self updateDevicePixelRatio: [window backingScaleFactor]];
| ^
src/_macosx.m:1614:5: error: incompatible type for argument 1 of
'updateDevicePixelRatio:'
1614 | [self updateDevicePixelRatio: [window backingScaleFactor]];
| ^
| |
| id
src/_macosx.m:1614:5: note: expected 'double' but argument is of type 'id'
error: command '/opt/local/var/macports/build
/_opt_PPCSnowLeopardPorts_python_py-
matplotlib/py311-matplotlib/work/compwrap/cc/opt/local/bin/gcc-mp-12'
failed with exit code 1
Command failed: cd "/opt/local/var/macports/build
/_opt_PPCSnowLeopardPorts_python_py-
matplotlib/py311-matplotlib/work/matplotlib-3.5.3" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
setup.py --no-user-cfg build
Exit code: 1
}}}
That macOS extension, FWIW, should be just disabled when built with GCC.
--
Ticket URL: <https://trac.macports.org/ticket/67491#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list