Opened 9 years ago

Closed 8 years ago

#50032 closed defect (fixed)

libsdl @1.2.15_3: error: expected specifier-qualifier-list before 'vector'

Reported by: 4625khz.mail@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: tiger powerpc haspatch Cc: kenneth.f.cunningham@…, ryandesign (Ryan Carsten Schmidt)
Port: libsdl

Description

Hello! Building libsdl on Mac OS X Tiger 10.4.11 using apple-gcc42 (from macports too) fails with error:

/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:115: error: expected specifier-qualifier-list before 'vector'

Full log of the debug output (compilation and make) attached.

Attachments (2)

buliding log.txt (73.2 KB) - added by 4625khz.mail@… 9 years ago.
libsdl-darwin8ppc-fix.diff (777 bytes) - added by kenneth.f.cunningham@… 8 years ago.

Download all attachments as: .zip

Change History (14)

Changed 9 years ago by 4625khz.mail@…

Attachment: buliding log.txt added

comment:1 Changed 9 years ago by 4625khz.mail@…

Forgot to mention (although you'll see that in the log) that a PowerPC machine is being used, with Xcode 2.5 installed.

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

Cc: ryandesign@… added
Keywords: libsdl removed
Owner: changed from macports-tickets@… to jmr@…
Summary: libsdl @1.2.15_3 Make failurelibsdl @1.2.15_3: error: expected specifier-qualifier-list before 'vector'

This is a bug in a header file on Tiger. It is worked around by adding -faltivec to configure.cflags. See #34213. Assuming this works (I haven't tried it yet), the port should do this in a platform darwin 8 block—or possibly a platform darwin 8 powerpc block; I'm not sure.

comment:3 Changed 9 years ago by 4625khz.mail@…

Thank you very much, adding configure.cflags-append -faltivec into platform darwin block helped.

comment:4 Changed 8 years ago by rickyzhang82 (Ricky Zhang)

In fact, I use gcc from Apple Xcode, instead gcc from

sudo port install libsdl configure.compiler=gcc

It compile without issues.

Version 1, edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (next) (diff)

comment:5 Changed 8 years ago by kenneth.f.cunningham@…

I bumped into this one on of my Tiger PPC machines just recently as well, and the error led me here. The block Ryan suggested worked as described. I also built libsdl on Tiger Intel, and no surprise, it doesn't need that block (no altivec). Don't know if you want this in the Portfile, or just here to remain as a workaround, but here's a diff file to consider.

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

Cc: kenneth.f.cunningham@… added
Keywords: powerpc haspatch added

Thanks. Yes, I think we should commit that to the Portfile.

comment:7 Changed 8 years ago by jmroot (Joshua Root)

Bear in mind that not all PPC machines have Altivec.

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

You mean G3s. I don't have Tiger set up on such a machine but we could assume that we should only add -faltivec on altivec-capable machines. We could use sysctl to determine whether that's the case.

comment:9 Changed 8 years ago by kenneth.f.cunningham@…

You guys have a lot of experience -- might be a rare person with a G3 running Tiger who wants libsdl, but who knows? I like to be inclusive!

On my G5 Powermac running Tiger, I get

$ sysctl hw.optional.altivec
hw.optional.altivec: 1

so a TCL block testing that with exec (haven't done that before, so have to look into how to do it).

That test has to be locked inside the powerpc block of course, because on an intel processor, I get this, rather than "0":

$ sysctl hw.optional.altivec
second level name optional in hw.optional.altivec is invalid

comment:10 Changed 8 years ago by jmroot (Joshua Root)

No need to exec, we have a sysctl command. See ffmpeg for the way to do it.

Changed 8 years ago by kenneth.f.cunningham@…

Attachment: libsdl-darwin8ppc-fix.diff added

comment:11 Changed 8 years ago by kenneth.f.cunningham@…

The new fix adds in the sysctl check for a powerpc vector unit (altivec). Confirmed to build through on Darwin 8 PowerPC G5 with altivec -- none of my G3s are presently set up with Tiger to confirm it works gracefully there, although it should.

comment:12 Changed 8 years ago by jmroot (Joshua Root)

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