Opened 3 years ago

Closed 3 years ago

#61757 closed defect (fixed)

py38-matplotlib @3.3.3 does not build on PPC Leopard, Mac OS X 10.5.8, because of "cc1obj: error: -Werror=unguarded-availability: No option -Wunguarded-availability"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: leopard Cc:
Port: py-matplotlib

Description

/usr/bin/g++-4.2 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -arch ppc -isysroot/ build/temp.macosx-10.5-ppc-3.8/src/_ttconv.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/pprdrv_tt.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/pprdrv_tt2.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/ttutil.o -o build/lib.macosx-10.5-ppc-3.8/matplotlib/_ttconv.cpython-38-darwin.so
building 'matplotlib.backends._macosx' extension
/usr/bin/gcc-4.2 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_macosx.m -o build/temp.macosx-10.5-ppc-3.8/src/_macosx.o -Werror=unguarded-availability -fvisibility=hidden
cc1obj: error: -Werror=unguarded-availability: No option -Wunguarded-availability
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-matplotlib/py38-matplotlib/work/matplotlib-3.3.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 setup.py --no-user-cfg build 
Exit code: 1
Error: Failed to build py38-matplotlib: command execution failed

Attachments (2)

main.log (913.3 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Main.log from PPC Leopard
main.2.log (915.3 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Main.log from PPC Leopard from after patching setupext.py

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

trac.macports.org does not accept uploading files, at least not from me and TenFourFox Feature Parity Release 29. The cause for the failure seems to be here:

./setupext.py:677:        ext.extra_compile_args.extend(['-Werror=unguarded-availability'])
Last edited 3 years ago by ballapete (Peter "Pete" Dyballa) (previous) (diff)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

Main.log from PPC Leopard from after patching setupext.py

comment:2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

A new failure comes up that might not be resolvable on elder systems:

/usr/bin/g++-4.2 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -arch ppc -isysroot/ build/temp.macosx-10.5-ppc-3.8/src/_ttconv.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/pprdrv_tt.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/pprdrv_tt2.o build/temp.macosx-10.5-ppc-3.8/extern/ttconv/ttutil.o -o build/lib.macosx-10.5-ppc-3.8/matplotlib/_ttconv.cpython-38-darwin.so
building 'matplotlib.backends._macosx' extension
/usr/bin/gcc-4.2 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/_macosx.m -o build/temp.macosx-10.5-ppc-3.8/src/_macosx.o -fvisibility=hidden
src/_macosx.m:202: error: cannot find protocol declaration for ‘NSWindowDelegate’
src/_macosx.m: In function ‘lazy_init’:
src/_macosx.m:272: error: ‘NSApplicationActivationPolicyRegular’ undeclared (first use in this function)
src/_macosx.m:272: error: (Each undeclared identifier is reported only once
src/_macosx.m:272: error: for each function it appears in.)
src/_macosx.m:272: warning: no ‘-setActivationPolicy:’ method found
src/_macosx.m:272: warning: (Messages without a matching method signature
src/_macosx.m:272: warning: will be assumed to return ‘id’ and accept
src/_macosx.m:272: warning: ‘...’ as arguments.)
src/_macosx.m: In function ‘choose_save_file’:
src/_macosx.m:1345: warning: ‘NSSavePanel’ may not respond to ‘-setNameFieldStringValue:’
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-matplotlib/py38-matplotlib/work/matplotlib-3.3.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 setup.py --no-user-cfg build 
Exit code: 1
Error: Failed to build py38-matplotlib: command execution failed

It might be useful to offer py3?-nltk with and without dependencies… (at least for elder systems)

comment:3 Changed 3 years ago by kencu (Ken)

looks like you're getting into some more advanced Apple SDK needs, beyond what Leopard can offer.

Simplest solution is usually to toggle that backend off on failing systems, if possible.

comment:4 Changed 3 years ago by mf2k (Frank Schima)

Cc: reneeotten@… removed
Owner: set to reneeotten
Port: py-matplotlib added; py38-matplotlib removed
Status: newassigned

comment:5 in reply to:  3 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

Simplest solution is usually to toggle that backend off on failing systems, if possible.

Yes, I have to decimate the many dependencies…

comment:6 Changed 3 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In da3d6ce9e8c8003441aed314f8cf1a87d2a2e99b/macports-ports (master):

py-matplotlib: attempt to fix build on 10.5

Closes: #61757

Note: See TracTickets for help on using tickets.