Opened 16 months ago

Last modified 16 months ago

#66454 new defect

libopus @1.3.1_0+universal: Configure & build fail on G4/PPC 10.5.8

Reported by: xanda-escuyer (xanda) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libopus

Description

Build fails as per summary. Config & build logs attached.

Attachments (2)

libopus-config.log (42.4 KB) - added by xanda-escuyer (xanda) 16 months ago.
Configure log
libopus-main.log (32.3 KB) - added by xanda-escuyer (xanda) 16 months ago.
Build main.log

Download all attachments as: .zip

Change History (11)

Changed 16 months ago by xanda-escuyer (xanda)

Attachment: libopus-config.log added

Configure log

Changed 16 months ago by xanda-escuyer (xanda)

Attachment: libopus-main.log added

Build main.log

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

Summary: Configure & build fail on G4/PPC 10.5.8libopus @1.3.1_0+universal: Configure & build fail on G4/PPC 10.5.8

comment:2 Changed 16 months ago by kencu (Ken)

although ideally MacPorts would thoroughly support building universal ppc/i386 on Leopard systems, in practice there are many problems doing this, and nobody is really trying to fix them as many can’t be fixed with current compiler tools available.

Your overall happiness on this system will be much higher if you build as ppc only, without universal as much as possible.

comment:3 Changed 16 months ago by xanda-escuyer (xanda)

Thank you for reply.

Building for 'PPC only' indeed makes life a lot easier - most ports build just fine this way. Unfortunately there is no option in some cases and this is one of them.

:-(

comment:4 Changed 16 months ago by kencu (Ken)

why is it that you need it universal, may I ask?

In the libopus Portfile, it has already fixed this error, by the way:

platform i386 {
    # checking How to get X86 CPU Info... configure: error: no supported Get CPU Info method, please disable intrinsics
    compiler.blacklist *gcc-4.* {clang < 500}
}

however, that fix won't work if you're trying to build it on a PPC as universal, due to the way it's written..

And 100,000 other similar cases that make building universal i386/ppc on Leopard a problem.

comment:5 Changed 16 months ago by xanda-escuyer (xanda)

Thanks for your interest.

To answer the question: We don't need it universal per se; our ultimate aim is to build ReadyMedia

However, from the port health for ReadyMedia, it seems PPC is unknown. Setting the universal flag was an attempt to see if it was possible/feasible to achieve this as ReadyMedia requires a universal build of ffmpeg (and hence libopus as reported above).

Of course if we are barking up the wrong tree then please accept our apologies; it's not our way to create unnecessary work especially for volunteers such as yourself.

:-)

comment:6 Changed 16 months ago by kencu (Ken)

I see.

By the standard methods MacPorts will have trouble building this as universal on either an Intel or PPC system, but there may be ways to do it. I'll see if I can come up with something for you.

comment:7 Changed 16 months ago by kencu (Ken)

This can work.

Add this to the Portfile, below the place where configure.args is already specified:

configure.args-append --disable-rtcd

and building on Leopard PPC will build universal as i386/ppc:

$ port -v installed libopus
The following ports are currently installed:
  libopus @1.3.1_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='i386 ppc' date='2022-12-12T22:12:46-0800'
  

comment:8 Changed 16 months ago by kencu (Ken)

There is a possible more complicated fix, that copies in the cpuid.h file from a newer version of gcc, such as gcc7, specifies it in an include path, and disables PIC, but that might be excessively complicated considering the application here and the fact that this code won't be running on state-of-the-art Intel processors.

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

comment:9 Changed 16 months ago by xanda-escuyer (xanda)

We followed the guidance here at: How to Patch a Port on Your System ... and made the suggested Portfile changes.

The result was as follows:-

$: port -v installed libopus-devel
The following ports are currently installed:
  libopus-devel @1.3.1_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='i386 ppc' date='2022-12-27T21:15:00+0000'

All the same we've had to scrub/reinstall MacPorts but thanks again for the assist.

:-)

Note: See TracTickets for help on using tickets.