Opened 5 months ago

Last modified 5 months ago

#56836 new defect

py-cairo: build fails on < 10.7 due to error: #pragma GCC diagnostic not allowed inside functions

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard leopard tiger Cc: dliessi (Davide Liessi)
Port: py-cairo

Description

The compiler selection for py-cairo leads to gcc-4.2 being used on these older systems, and gcc-4.2 doesn't understand the above GCC diagnostic inside functions.

<https://build.macports.org/builders/ports-10.5_ppc_legacy-builder/builds/68721/steps/install-port/logs/stdio>

<https://build.macports.org/builders/ports-10.6_x86_64_legacy-builder/builds/69944/steps/install-dependencies/logs/stdio>

Fix is to move the #pragma outside of the function, or to use a newer compiler (I tried gcc6 and that works, and any clang version works)

Change History (2)

comment:1 Changed 5 months ago by kencu (Ken)

Keywords: snowleopard leopard tiger added

comment:2 Changed 5 months ago by dliessi (Davide Liessi)

Cc: dliessi added
Note: See TracTickets for help on using tickets.