Opened 13 months ago
Closed 7 months ago
#68473 closed defect (fixed)
libpixman @0.42.2: error: expected identifier before ‘__attribute__’
Reported by: | barracuda156 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | tiger, leopard | Cc: | mascguy (Christopher Nielsen), ballapete (Peter "Pete" Dyballa), rmottola (Riccardo), ilovecrts |
Port: | libpixman |
Description
[1/113] /usr/bin/gcc-4.2 -Ipixman/libpixman-vmx.a.p -Ipixman -I../pixman-0.42.2/pixman -I/opt/local/include -Wall -Winvalid-pch -std=gnu99 -O2 -g -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -Wundef -ftrapping-math -DHAVE_CONFIG_H -pipe -Os -arch ppc -maltivec -mabi=altivec -MD -MQ pixman/libpixman-vmx.a.p/pixman-vmx.c.o -MF pixman/libpixman-vmx.a.p/pixman-vmx.c.o.d -o pixman/libpixman-vmx.a.p/pixman-vmx.c.o -c ../pixman-0.42.2/pixman/pixman-vmx.c FAILED: pixman/libpixman-vmx.a.p/pixman-vmx.c.o /usr/bin/gcc-4.2 -Ipixman/libpixman-vmx.a.p -Ipixman -I../pixman-0.42.2/pixman -I/opt/local/include -Wall -Winvalid-pch -std=gnu99 -O2 -g -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -Wundef -ftrapping-math -DHAVE_CONFIG_H -pipe -Os -arch ppc -maltivec -mabi=altivec -MD -MQ pixman/libpixman-vmx.a.p/pixman-vmx.c.o -MF pixman/libpixman-vmx.a.p/pixman-vmx.c.o.d -o pixman/libpixman-vmx.a.p/pixman-vmx.c.o -c ../pixman-0.42.2/pixman/pixman-vmx.c ../pixman-0.42.2/pixman/pixman-vmx.c: In function ‘fast_composite_scaled_nearest_vmx_8888_8888_cover_OVER’: ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2973: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c: In function ‘fast_composite_scaled_nearest_vmx_8888_8888_none_OVER’: ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2976: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c: In function ‘fast_composite_scaled_nearest_vmx_8888_8888_pad_OVER’: ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2979: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c: In function ‘fast_composite_scaled_nearest_vmx_8888_8888_normal_OVER’: ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’ ../pixman-0.42.2/pixman/pixman-vmx.c:2982: error: expected identifier before ‘__attribute__’
Change History (22)
comment:1 Changed 13 months ago by barracuda156
comment:2 Changed 13 months ago by mascguy (Christopher Nielsen)
There aren't any failures on our 10.6 buildbots. Nor did I see any failures locally, when testing on every macOS release from 10.5 and up.
Can you attach the full main.log?
comment:3 follow-ups: 4 5 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | snowleopard removed |
---|---|
Summary: | libpixman broken after update on < 10.7: error: expected identifier before ‘__attribute__’ → libpixman @0.42.2: error: expected identifier before ‘__attribute__’ |
On the Snow Leopard buildbot workers we built successfully with MacPorts clang 11. I guess this error is specific to older compilers like Apple gcc 4.2.1. What compiler was used when you tested on 10.5, Chris, and were you on Intel or PowerPC? I see this build failure here is on PowerPC.
comment:4 follow-up: 7 Changed 13 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
On the Snow Leopard buildbot workers we built successfully with MacPorts clang 11. I guess this error is specific to older compilers like Apple gcc 4.2.1. What compiler was used when you tested on 10.5, Chris, and were you on Intel or PowerPC? I see this build failure here is on PowerPC.
My 10.5 VM is Intel x64. I'm not certain which compiler was used though.
Still travelling, but will be back home tomorrow. At that point I'll be able to retest, and provide an answer.
comment:5 Changed 13 months ago by barracuda156
Replying to ryandesign:
On the Snow Leopard buildbot workers we built successfully with MacPorts clang 11. I guess this error is specific to older compilers like Apple gcc 4.2.1. What compiler was used when you tested on 10.5, Chris, and were you on Intel or PowerPC? I see this build failure here is on PowerPC.
It certainly does not build with gcc-4.2
. What I am not sure is whether C11 should be set or old compilers blacklisted.
comment:6 follow-up: 8 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Please file a pixman bug report. If they require C11, they should be checking for that in the build system. Historically, I think pixman has wanted to be very portable, since it is such a low-level library, so if they are using newer compiler features it may be unintentional and they may want to fix it.
comment:7 follow-ups: 9 16 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to mascguy:
My 10.5 VM is Intel x64. I'm not certain which compiler was used though.
I guess I can answer that myself:
On my Monterey machine, if I run:
port deps libpixman os.major=10
it includes clang-11 which matches what our 10.6 machines used. If I run:
port info libpixman os.major=9
it includes clang-7.0 so I presume that is the compiler that was used for your build on 10.5 and would explain why it worked, if that version of clang is new enough not to have this problem that gcc 4.2.1 had.
Since clang doesn't work on PowerPC, MacPorts is hopefully picking a gcc on PowerPC instead.
comment:8 Changed 13 months ago by barracuda156
Replying to ryandesign:
Please file a pixman bug report. If they require C11, they should be checking for that in the build system. Historically, I think pixman has wanted to be very portable, since it is such a low-level library, so if they are using newer compiler features it may be unintentional and they may want to fix it.
https://gitlab.freedesktop.org/pixman/pixman/-/issues/83
Could we blacklist old gcc
for now to fix the build?
comment:9 Changed 13 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
On my Monterey machine, if I run:
port deps libpixman os.major=10it includes clang-11 which matches what our 10.6 machines used. If I run:
port info libpixman os.major=9it includes clang-7.0 so I presume that is the compiler that was used for your build on 10.5 and would explain why it worked, if that version of clang is new enough not to have this problem that gcc 4.2.1 had.
I tend not to trust the results, when overriding os.major
. And indeed, on my 10.5 VM, this is what I see:
$ port info --line --name --depends_build libpixman libpixman pkgconfig,meson,ninja
Per the port log:
:debug:configure Using compiler 'Xcode GCC 4.2'
And the build works just fine.
So, this doesn't necessarily appear to be an issue with GCC 4.2. Unless I'm missing something...?
comment:10 follow-up: 14 Changed 13 months ago by kencu (Ken)
The failing file:
pixman-vmx.c
is likely to be a PPC - only flle, so you're not likely building that file on the Intel build.
comment:11 Changed 13 months ago by SerpentChris (Chris Calderon)
Hello, I just tried to install libpixman on my Leopard PPC system and I ran into this issue. I tried editing the Portfile to use macports gcc7 to compile and it got farther but still failed due to lack of posix_memalign.
Edit: Isn't posix_memalign part of legacy-support? I remember mentioning this in an old ticket of mine, #57630.
comment:12 follow-up: 13 Changed 13 months ago by SerpentChris (Chris Calderon)
I modified the Portfile adding these lines:
PortGroup legacysupport 1.1 configure.compiler macports-gcc-7
and the port installed successfully on my Powermac G5 running Mac OS X 10.5.8.
comment:13 Changed 13 months ago by barracuda156
Replying to SerpentChris:
I modified the Portfile adding these lines:
PortGroup legacysupport 1.1 configure.compiler macports-gcc-7and the port installed successfully on my Powermac G5 running Mac OS X 10.5.8.
We do not need to explicitly set the compiler though (of course, nothing stops from doing it locally), just blacklist those which are broken.
comment:14 Changed 13 months ago by barracuda156
Replying to kencu:
The failing file:
pixman-vmx.cis likely to be a PPC - only flle, so you're not likely building that file on the Intel build.
A good point; then, old gcc can be blacklisted just for powerpc (regardless of the OS, it works on none where powerpc is supported).
comment:15 Changed 10 months ago by rmottola (Riccardo)
I think this has a duplicate here ? #69146 I ended replying there, sorry.
Summary: I need to force gcc7 on PPC and end up with a linker failure on _posix_memalign
comment:16 Changed 10 months ago by barracuda156
Replying to ryandesign:
Could we just blacklist old Xcode gcc and add legacysupport
to unbreak the port for everyone?
comment:17 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Cc: | ballapete added |
---|
comment:18 follow-up: 20 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | rmottola added |
---|
Ken proposed a patch to fix this in duplicate #69385.
comment:19 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
I cannot test this on my PowerBook G4
because I cannot build Python 3.11 modules
because presumingly py-bootstrap-modules
is out-of-date (and I have no idea of Python) and therefore I cannot build meson
, see #69106. A binary release of py311-meson
might bring me s step forward…
comment:20 Changed 9 months ago by rmottola (Riccardo)
Replying to ryandesign:
Ken proposed a patch to fix this in duplicate #69385.
the proposed patch works for me on 10.5 PPC. It ends selecting gcc7
Given that I have "Only" apple 4.0,4.2 and MP 4.8,7 it was "no big deal" :) but probably more elegant. I suppose it would have selected gcc6 if present?
comment:21 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ilovecrts added |
---|
Has duplicate #69541.
comment:22 Changed 7 months ago by elihow (Elias Howell)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Builds fine with
gcc13
. C11 standard needed?