Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52875 closed defect (fixed)

libsdl2: build failure blocks ffmpeg @3.2 build on Leopard i386 nor PPC

Reported by: arboz Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: leopard haspatch Cc: jeremyhu@…, jmroot (Joshua Root), mkae (Marko Käning)
Port: libsdl2 ffmpeg

Description

Naturally this is due to the upgrade for libsdl to libsdl2. Libsdl will not build without access to the Lion OSX 10.7.sdk

as it turns out ffmpeg can build without libsdl2 You won't get ffplayer maybe a few more tools

however the main ffmpeg executable with full access to all the usual codecs can be built

In looking through the config file there is a switch to turn off using libsdl and libsdl2 however during configuration, if libsdl2 is not found, it simply does not make those tools

you will see in the log

:info:configure Enabled programs:
:info:configure ffmpeg			ffprobe			ffserver

At the same time, there is a compiled binary for sdl2 that is supposed to work with Leopard i386. It is packaged as a framework. I didn't yet get to just drop it into /Library/Frameworks and then see if it is found or not...

So in the meantime, after successfully compiling and then spending the few days getting libunwind to compile correctly (-forcing clang-3.7) I di a fresh selfupdate and found libsdl2 attempting to compile and of course failing.

I re-applied my changes to the ffmpeg portfile

and cleaned libsdl2 out of the way.

I submit the patch for your review I suspect there is a more correct way to do this, but it moves libsdl2 out of the way for me.

Attachments (1)

Portfile-ffmpeg-3.2_2.diff (1.1 KB) - added by arboz 8 years ago.
patch for leopard to compile ffmpeg 3.2.x

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by arboz

Attachment: Portfile-ffmpeg-3.2_2.diff added

patch for leopard to compile ffmpeg 3.2.x

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

Cc: openmaintainer@… removed
Port: ffmpeg added; ffmpeg@3.2 removed

I would not increase the revision, since all you're doing is fixing a port that did not build in the first place.

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Actually the epoch is being increased in the patch, but it should not be.

comment:3 Changed 8 years ago by dbevans (David B. Evans)

Cc: devans@… removed
Owner: changed from macports-tickets@… to dbevans
Status: newaccepted

This patch is ineffective as the support for libsdl has been removed entirely in 3.2 and replaced by libsdl2. In addition, adding or removing dependencies is insufficient to add or remove the corresponding functionality reliably -- the functionality also needs to be disabled/enabled using the corresponding configuration option.

comment:4 Changed 8 years ago by dbevans (David B. Evans)

Cc: jmroot added
Port: libsdl2 added
Summary: ffmpeg @3.2 will not build on Leopard i386 nor PPClibsdl2: build failure blocks ffmpeg @3.2 build on Leopard i386 nor PPC

comment:5 Changed 8 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: acceptedclosed

In 2c9b7ffc/macports-ports:

ffmpeg, ffmpeg-devel: disable libsdl2 support on 10.6 and earlier

libsdl2 requires the Xcode 10.7 SDK to build successfully. This change
allows ffmpeg to build on 10.6 and earlier but with limited functionality.
In particular, ffplay, which explicitly requires libsdl2, is not built.

Closes #52875

comment:6 Changed 8 years ago by mkae (Marko Käning)

Cc: mkae added

comment:7 Changed 8 years ago by arboz

seems the trac system crashed or became unavailable while I was writing this...

You guys literally fixed this while I was sleeping. GREAT!!, Thanks.

My only comment is that I got the clue from this post: http://ffmpeg.gusari.org/viewtopic.php?f=8&t=1651 which has a few right and wrong answers and is circa v2.4.1

So I did look at the configure file and decided to try just removing the dep for libsdl2 with no additional flags.

That actually does reliably work because of:

--disable-sdl2           disable sdl2 [autodetect]

and there is a block of scripting in the configure file to look around for the sdl/2 headers to support that, and sure enough, it detected my lack of libsdl2 and did not build ffplay ---EDIT--- I just wanted to add the link to the configure file in source as there is actually no explicit

--enable- for sdl2 https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/configure

only the disable as above. both sdl and sdl2 are in the external_library_list If we trust the [autodetect] then it should be possible to install without sdl2, but then some might wonder where the ffplay tool has gone. --END EDIT---

Now I still wonder if it would be satisfied with the pre-built binary framework (headers included) from: https://www.libsdl.org/download-2.0.php which claims:

Mac OS X:
SDL2-2.0.5.dmg (Intel 10.5+)

However, my testing will need to wait a bit for that; in the meantime, I can still have access to the command-line ffmpeg tool and the codecs.

Thanks again.

Last edited 8 years ago by arboz (previous) (diff)
Note: See TracTickets for help on using tickets.