Opened 3 months ago

Closed 3 months ago

Last modified 5 weeks ago

#69385 closed defect (duplicate)

libpixman @0.42.2 fails to compile on ppc

Reported by: rmottola (Riccardo) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard gcc Cc: mascguy (Christopher Nielsen), ballapete (Peter "Pete" Dyballa)
Port: libpixman

Description

on Leopard PPC, pixman fails to compile:

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__’

I was unable to test gcc 4.8:

meson.build:21:0: ERROR: Unable to detect linker for compiler `/opt/local/bin/gcc-mp-4.8 -Wl,--version -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -pipe -Os -arch ppc -I/opt/local/include`
stdout: 
stderr: gcc-mp-4.8: error: unrecognized command line option '-arch'
gcc-mp-4.8: error: unrecognized command line option '-arch'

GCC 7.. fails with nm issues, so futher work needed to confirm it works

Change History (9)

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

$ port -v installed libpixman
The following ports are currently installed:
  libpixman @0.42.2_0 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2024-02-22T17:35:39-0800'

I did this:

$ diff -u ./ /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/libpixman/Portfile
--- ./Portfile	2023-11-14 08:31:25.000000000 -0800
+++ /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/libpixman/Portfile	2024-02-22 17:33:40.000000000 -0800
@@ -2,11 +2,15 @@
 
 PortSystem              1.0
 PortGroup               compiler_blacklist_versions 1.0
+PortGroup               legacysupport 1.1
 PortGroup               meson 1.0
 PortGroup               muniversal 1.0
 
 # Please keep the libpixman and libpixman-devel ports as similar as possible.
 
+# posix_memalign
+legacysupport.newest_darwin_requires_legacy 9
+
 name                    libpixman
 conflicts               libpixman-devel
 set my_name             pixman
@@ -51,7 +55,7 @@
 
 # llvm-gcc-4.2 makes cairo fail to generate PDFs properly
 # clang on Xcode 4.1 cannot build libpixman
-compiler.blacklist      llvm-gcc-4.2 {clang < 211.10.1}
+compiler.blacklist-append      {clang < 211.10.1} {*gcc-4.[0-2]}
 
 configure.checks.implicit_function_declaration.whitelist-append \
                         strchr
@@ -73,11 +77,6 @@
         ${docdir}
 }
 
-platform darwin 8 powerpc {
-    # apple-gcc-4.2 makes Tiger ppc fail to detect pthread support and then fail to build
-    compiler.blacklist-append apple-gcc-4.2
-}
-
 livecheck.type          regex
 livecheck.url           [lindex ${master_sites} 0]
 livecheck.regex         ${my_name}-(\[0-9.\]+)${extract.suffix}

comment:2 Changed 3 months ago by jmroot (Joshua Root)

Cc: mascguy added
Owner: set to ryandesign
Status: newassigned

Please remember to assign to or Cc the port maintainer(s).

comment:3 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed

Duplicate of #68473.

comment:4 in reply to:  1 Changed 3 months ago by barracuda156

Replying to kencu:

$ port -v installed libpixman
The following ports are currently installed:
  libpixman @0.42.2_0 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2024-02-22T17:35:39-0800'

I did this:

# clang on Xcode 4.1 cannot build libpixman

Shouldn’t it be clang < 400 or something alike then? I am afraid the current modification may result in Xcode clang of 3.2.6 being picked, which gonna fail, from what it looks.

UPD. Perhaps I am wrong, 211 is enough to avoid Xcode 4.1 and below (including therefore 3.2.6):

Xcode 4.2

Xcode: BuildVersion: 4C199
llvm-gcc: i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
clang: Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Last edited 3 months ago by barracuda156 (previous) (diff)

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

nope, the current looks fine, using the most modern clang that can be installed by Xcode on 10.6:

$ uname -a
Darwin kensmacbookpro 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

kensmacbookpro: $ /usr/bin/clang -v
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

Edit - actually, I'm not sure if anyone has specifically tested clang-211.10.1 on Intel to see if it can build this any time recently.

clang-211.10.1 corresponds to Xcode 4.2.

Last edited 3 months ago by kencu (Ken) (previous) (diff)

comment:6 in reply to:  5 ; Changed 3 months ago by barracuda156

Replying to kencu:

nope, the current looks fine, using the most modern clang that can be installed by Xcode on 10.6:

Yeah, as long as it is 4.2, we are good. It does not support powerpc so cannot be chosen on Rosetta (maximum is clang of 3.2.6), and since for Intel it works, everything is correct.

comment:7 in reply to:  6 Changed 3 months ago by kencu (Ken)

Replying to barracuda156:

Replying to kencu:

nope, the current looks fine, using the most modern clang that can be installed by Xcode on 10.6:

Yeah, as long as it is 4.2, we are good. It does not support powerpc so cannot be chosen on Rosetta (maximum is clang of 3.2.6), and since for Intel it works, everything is correct.

Xcode 4.2 builds powerpc code without trouble, but it doesn't exist in powerpc architecture AFAIK (hiding in somebody's desk drawer somewhere in Cupertino notwithstanding).

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

Cc: ballapete added

comment:9 Changed 5 weeks ago by elihow (Elias Howell)

In b674c51f20ed74dc425e591712b1deeca5b03f3a/macports-ports (master):

libpixman{,-devel}: patch for ppc build failure

Fixes: #68473
See: #69385

Note: See TracTickets for help on using tickets.