Opened 6 years ago

Closed 6 years ago

#56836 closed defect (fixed)

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 (5)

comment:1 Changed 6 years ago by kencu (Ken)

Keywords: snowleopard leopard tiger added

comment:2 Changed 6 years ago by dliessi (Davide Liessi)

Cc: dliessi added

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

it seems to me that the selection of a newer compiler was implemented in these two commits (1 and 2) and it builds now on 10.5 and 10.6 as well.

@kencu: is this ticket resolved and can it be closed, or...? I am looking into updating py-cairo to 1.18.1 and would like to know if there is anything you think would need to be changed at the same time.

comment:4 Changed 6 years ago by kencu (Ken)

looks fixed, indeed

comment:5 Changed 6 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.