Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14960 closed defect (fixed)

BUG: ffmpeg svn fetch is using HEAD for parts of the software

Reported by: raimue (Rainer Müller) Owned by: acho@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: ffmpeg Cc: macports@…, yanjingfeng@…, bazzoola@…, chou.marcus@…
Port:

Description

ffmpeg is fetched using svn from 1svn://svn.mplayerhq.hu/ffmpeg/trunk/ using a specific revision specified by svn.tag.

But in this directory in the repository is a svn:externals declaration:

  svn:externals : libswscale     svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

Therefore, libswscale is always fetched from HEAD of *another* repository. Building ffmpeg now always uses HEAD of libswscale which is not reliable. Also, building ffmpeg will result in different results although the version and revision of the port is the same.

As reported on IRC by dangrus, ffmpeg fails at the moment on destrooting due to some HEAD commit in libswscale:

: make -C libpostproc install-headers
make              -C libswscale  install-headers
Makefile:20: ../subdir.mak: No such file or directory
make[1]: *** No rule to make target `../subdir.mak'.  Stop.
make: *** [install-headers] Error 2

We can't rely on this and therefore we should export our own source tarballs for ffmpeg.

Change History (17)

comment:1 Changed 16 years ago by raimue (Rainer Müller)

Cc: macports@… added

CC'ing original reporter.

comment:2 Changed 16 years ago by antonin@…

Same problem here :

$ sudo port -d install ffmpeg +gpl +lame +extvorbis +faac +faad +xvid +x264 +a52 
+avfilter +postproc
....
....
make -C libswscale  all
Makefile:24: ../subdir.mak: No such file or directory
make[1]: *** No rule to make target `../subdir.mak'.  Stop.
make: *** [lib] Error 2


I've successfully compiled it with ffmpeg rev 12276 and libswscale rev 26183 using dependencies build by macports :

svn export --ignore-externals svn://svn.mplayerhq.hu/ffmpeg/trunk@12276 ffmpeg
cd ffmpeg
svn export svn://svn.mplayerhq.hu/mplayer/trunk/libswscale@26183

ruby -i.bak -pe 'gsub(/defined\(ARCH_X86\) \&\& defined\(CONFIG_GPL\)/, "defined(ARCH_X86) && defined(CONFIG_GPL) && !defined(__APPLE__)")' libswscale/rgb2rgb.c

svn export svn://svn.mplayerhq.hu/mplayer/trunk/libswscale@26183
./configure --enable-shared --disable-mmx --enable-pthreads --enable-liba52 --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-pp --enable-libxvid --enable-libx264 --enable-swscaler --extra-cflags="-I/opt/local/include" --extra-ldflags="-L/opt/local/lib"

make

HTH.

comment:3 in reply to:  2 Changed 16 years ago by antonin@…

I forgot to say that I'm on the latest macbook (core 2 duo).

comment:4 Changed 16 years ago by jmroot (Joshua Root)

Cc: yanjingfeng@… added

Cc reporter of duplicate #14964.

comment:5 Changed 16 years ago by raimue (Rainer Müller)

Cc: bazzoola@… added

Cc reporter of duplicate #15017.

comment:6 in reply to:  2 Changed 16 years ago by fanmail@…

I followed antonin's instructions, and managed to force macports to use the the correct export of libswscale

sudo port install ffmpeg

That will fail out. Then we do:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ffmpeg
sudo rm -rf libswscale
sudo svn export svn://svn.mplayerhq.hu/mplayer/trunk/libswscale@26183
sudo port install ffmpeg

I'm no expert, so this could be the dumbest idea ever...

comment:7 Changed 16 years ago by raimue (Rainer Müller)

I rewrote the fetch phase completely in r36295.

Please report back if it works now.

comment:8 Changed 16 years ago by faye@…

This is how it seems to break now. It breaks when you use +avfilter. It could just be that we need a new patch for this version. I suspect the person who got the successful compile with those revisions wasn't using avfilter.

--->  Applying patches to ffmpeg
--->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/multimedia/ffmpeg/files/patch-libswscale-Makefile.diff
DEBUG: Environment: 
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" && patch -p0'
patching file libswscale/Makefile
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libswscale/Makefile.rej
Error: Target org.macports.patch returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" && patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/multimedia/ffmpeg/files/patch-libswscale-Makefile.diff'" returned error 1
Command output: patching file libswscale/Makefile
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libswscale/Makefile.rej

comment:9 Changed 16 years ago by raimue (Rainer Müller)

That's bad. I would be glad if somebody could update the patch or point me to a working revision combination of ffmpeg and libwscale.

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

Cc: chou.marcus@… added

The libswscale patch failure with the +avfilter variant was reported again on macports-users by Marcus Chou.

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

I tried to fix the +avfilter patch failure in r36394. Let me know if I succeeded or not.

comment:12 in reply to:  7 Changed 16 years ago by rick@…

Replying to raimue@macports.org:

I rewrote the fetch phase completely in r36295.

Please report back if it works now.

Works fine again thanks!

$ port -d sync
$ port clean ffmpeg
$ port install ffmpeg

comment:13 Changed 16 years ago by bazzoola@…

[MacBookPro-3:/Users/macpro] macpro# port -d sync DEBUG: Synchronizing ports tree(s) Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/ DEBUG: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/ports/ /opt/local/var/macports/sources/rsync.macports.org/release/ports receiving file list ... done multimedia/ffmpeg/ deleting multimedia/ffmpeg/work

sent 74 bytes received 310343 bytes 8277.79 bytes/sec total size is 17957643 speedup is 57.85 [MacBookPro-3:/Users/macpro] macpro# port clean ffmpeg ---> Cleaning ffmpeg [MacBookPro-3:/Users/macpro] macpro# port install ffmpeg +gpl +postproc +lame +extvorbis +theora +faac +faad +xvid +x264 +a52 +avfilter ---> Fetching ffmpeg ---> Verifying checksum(s) for ffmpeg ---> Extracting ffmpeg Error: Target org.macports.extract returned: error copying "/opt/local/var/macports/distfiles/ffmpeg/12276/trunk": no such file or directory Error: Status 1 encountered during processing.

comment:14 Changed 16 years ago by raimue (Rainer Müller)

Please run port clean --all ffmpeg and then try again. This will also delete the exported directory and then re-fetch it. If the issue still occurs, the output of port clean --all ffmpeg && port -d extract ffmpeg will be more helpful.

Please use the appropriate wiki syntax for preformatted text next time.

comment:15 in reply to:  14 Changed 16 years ago by bazzoola@…

Replying to raimue@macports.org:

Please run port clean --all ffmpeg and then try again. This will also delete the exported directory and then re-fetch it. If the issue still occurs, the output of port clean --all ffmpeg && port -d extract ffmpeg will be more helpful.

[MacBookPro-3:/Users/macpro] macpro# port clean --all ffmpeg
--->  Cleaning ffmpeg

[MacBookPro-3:/Users/macpro] macpro# port install ffmpeg +darwin_i386 +gpl +postproc +lame +extvorbis +theora +faac +faad +xvid +x264 +a52 +avfilter
--->  Fetching ffmpeg
--->  Verifying checksum(s) for ffmpeg
--->  Extracting ffmpeg
--->  Applying patches to ffmpeg
--->  Configuring ffmpeg
--->  Building ffmpeg with target all
--->  Staging ffmpeg into destroot
--->  Installing ffmpeg 0.4.9-pre1_8+a52+avfilter+darwin_i386+extvorbis+faac+faad+gpl+lame+postproc+theora+x264+xvid
--->  Activating ffmpeg 0.4.9-pre1_8+a52+avfilter+darwin_i386+extvorbis+faac+faad+gpl+lame+postproc+theora+x264+xvid
--->  Cleaning ffmpeg

Please use the appropriate wiki syntax for preformatted text next time.

I noticed that after I posted, I couldn't edit my own comment so I left it for you to analyze. My comment implies that the commands posted before do not work thats all.

comment:16 Changed 16 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

So, this seem to work for everyone now, therefore I am closing this ticket. The standard install builds fine for me on Mac OS X 10.5 Leopard. If some variant is still failing, open a seperate ticket.

comment:17 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.