Opened 8 years ago

Closed 8 years ago

#51012 closed defect (fixed)

libpixman @0.34.0 build issue under Leopard

Reported by: Schamschula (Marius Schamschula) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: powerpc haspatch Cc: udbraumann, ballapete (Peter "Pete" Dyballa), nerdling (Jeremy Lavergne), dgonyier (Dwaine Gonyier)
Port: libpixman

Description

I just ran into a build failure for libpixman 0.34.0 under OS X 10.5.8:

:info:build /bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -faltivec -pipe -Os -arch ppc -Wall -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -pipe -Os -arch ppc -Wall -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -pthread -MT libpixman_vmx_la-pixman-vmx.lo -MD -MP -MF .deps/libpixman_vmx_la-pixman-vmx.Tpo -c -o libpixman_vmx_la-pixman-vmx.lo `test -f 'pixman-vmx.c' || echo './'`pixman-vmx.c
:info:build libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -faltivec -pipe -Os -arch ppc -Wall -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -pipe -Os -arch ppc -Wall -Wdeclaration-after-statement -fno-strict-aliasing -fvisibility=hidden -pthread -MT libpixman_vmx_la-pixman-vmx.lo -MD -MP -MF .deps/libpixman_vmx_la-pixman-vmx.Tpo -c pixman-vmx.c  -fno-common -DPIC -o .libs/libpixman_vmx_la-pixman-vmx.o
:info:build In file included from pixman-vmx.c:34:
:info:build /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/altivec.h:45:2: warning: #warning Ignoring <altivec.h> because "-faltivec" specified
:info:build pixman-vmx.c: In function ‘scaled_nearest_scanline_vmx_8888_8888_OVER’:
:info:build pixman-vmx.c:2936: error: subscripted value is neither array nor pointer
:info:build pixman-vmx.c:2937: error: subscripted value is neither array nor pointer
:info:build pixman-vmx.c:2938: error: subscripted value is neither array nor pointer
:info:build pixman-vmx.c:2939: error: subscripted value is neither array nor pointer
:info:build make[2]: *** [libpixman_vmx_la-pixman-vmx.lo] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libpixman/libpixman/work/pixman-0.34.0/pixman'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libpixman/libpixman/work/pixman-0.34.0'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libpixman/libpixman/work/pixman-0.34.0'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libpixman/libpixman/work/pixman-0.34.0" && /usr/bin/make -w all V=1
:info:build Exit code: 2

Attachments (4)

libpixman-main.log.gz (6.1 KB) - added by Schamschula (Marius Schamschula) 8 years ago.
Portfile-libpixman.diff (430 bytes) - added by Schamschula (Marius Schamschula) 8 years ago.
Patch_pixman-vmx_for_old_GCC.diff (443 bytes) - added by ballapete (Peter "Pete" Dyballa) 8 years ago.
Patch to allow compilation of pixman/pixman-vmx.c with AltiVec support for GCC 4.2
Portfile.diff (506 bytes) - added by ballapete (Peter "Pete" Dyballa) 8 years ago.
Patch for libpixman Portfile, first try for PPC Leopard only

Download all attachments as: .zip

Change History (22)

Changed 8 years ago by Schamschula (Marius Schamschula)

Attachment: libpixman-main.log.gz added

Changed 8 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-libpixman.diff added

comment:1 Changed 8 years ago by Schamschula (Marius Schamschula)

I attached a fix for darwin 9 (Leopard) powerpc. This may also be needed for Tiger.

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Have you already reported the problem to the developers of pixman? If not, we should ask them if this is the correct solution.

comment:3 Changed 8 years ago by Schamschula (Marius Schamschula)

I've submitted the bug to the upstream developers: https://bugs.freedesktop.org/show_bug.cgi?id=94769

comment:4 Changed 8 years ago by udbraumann

Cc: braumann@… added

Cc Me!

comment:5 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)

Cc: Peter_Dyballa@… added

Cc Me!

comment:6 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)

Configuring with --disable-vmx seems to be the solution for now. IMO the source code in pixman/pixman-vmx.c needs changes to suffice the compiler. Just playing with compiler flags produces additional errors.

comment:7 Changed 8 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added; ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…

comment:8 Changed 8 years ago by dgonyier (Dwaine Gonyier)

Cc: dgonyier@… added

Cc Me!

comment:9 Changed 8 years ago by reeskm (Rees Machtemes)

in this case is "vmx" refering to Altivec VMX or virtual machine acceleration?

If the former, it makes sense that disabling this causes the problem to go away.

However, I successfully built this using macports-gcc-4.9

[rees@powermacg5 ~]$sudo port upgrade libpixman configure.compiler=macports-gcc-4.9
--->  Computing dependencies for libpixman
--->  Fetching archive for libpixman
--->  Attempting to fetch libpixman-0.34.0_0.darwin_9.ppc.tbz2 from https://packages.macports.org/libpixman
--->  Attempting to fetch libpixman-0.34.0_0.darwin_9.ppc.tbz2 from http://sea.us.packages.macports.org/macports/packages/libpixman
--->  Attempting to fetch libpixman-0.34.0_0.darwin_9.ppc.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/libpixman
--->  Fetching distfiles for libpixman
--->  Verifying checksums for libpixman
--->  Extracting libpixman
--->  Configuring libpixman
--->  Building libpixman
--->  Staging libpixman into destroot
--->  Installing libpixman @0.34.0_0
--->  Cleaning libpixman
--->  Computing dependencies for libpixman
--->  Deactivating libpixman @0.32.8_0
--->  Cleaning libpixman
--->  Activating libpixman @0.34.0_0
--->  Cleaning libpixman
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                  

comment:10 in reply to:  9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to reeskm@…:

in this case is "vmx" refering to Altivec VMX or virtual machine acceleration?

If the former, it makes sense that disabling this causes the problem to go away.

It undoubtedly refers to AltiVec.

However, I successfully built this using macports-gcc-4.9

I'm not surprised, however that's not a configuration I'm interested in supporting.

comment:11 Changed 8 years ago by dgonyier (Dwaine Gonyier)

Cc: dgonyier@… removed

Cc Me!

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

Patch to allow compilation of pixman/pixman-vmx.c with AltiVec support for GCC 4.2

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

Attachment: Portfile.diff added

Patch for libpixman Portfile, first try for PPC Leopard only

comment:12 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)

The patch described here, https://lists.freedesktop.org/archives/pixman/2016-April/004577.html, works fine on my G4 (PowerPC 7447A) with Leopard, Mac OS X 10.5.8. The modified patch and a supposed patch for Portfile have been attached here.

comment:13 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)

The patch also work on PPC Tiger, Mac OS X 10.4.11. Since Portfile already has a clause for Tiger, to blacklist a compiler, it's easy to insert the patchlist statement here.

comment:14 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks for finding that solution! Looks simple enough.

I don't prefer conditional patches. If we can include the patch unconditionally and still compile successfully, I'd like to do that.

comment:15 Changed 8 years ago by dgonyier (Dwaine Gonyier)

Cc: dgonyier@… added

Cc Me!

comment:16 Changed 8 years ago by dgonyier (Dwaine Gonyier)

To move forward with updating the port, I managed to get this port to install on my PowerBook G4 running Leopard with the following command

sudo port upgrade libpixman configure.args=--disable-vmx
Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:17 in reply to:  16 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to dgonyier@…:

To move forward with updating the port, I managed to get this port to install on my PowerBook G4 running Leopard with the following command

sudo port upgrade libpixman configure.args=--disable-vmx

You should not do that because that overrides the configure.args set by the portfile.

comment:18 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: powerpc added
Resolution: fixed
Status: newclosed

Fixed in r150754.

Note: See TracTickets for help on using tickets.