[vlc-devel] Current extras/contrib faac patch broken -- needsLF only, at least under Cygwin

Rafaël Carré funman at videolan.org
Wed Sep 19 01:35:26 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Moriarty a écrit :
> I have never seen msys to work, even worse than Cygwin, I totally gave up on
> it as even a concept after the fourth installation.
> 
> The things I'm running into shouldn't be msys vs. Cygwin, but simply someone
> touching some individual lines of the files so that the .patch files end up
> being a mix of both DOS and Unix style within a single patch file -- CR-LF
> issues are simple, but real, things.  I ran into them in my initial VLC
> patches several years ago, learned to make sure that I had my editor set
> properly so that the files I touched came out in Unix style.
> 
> Patches/live-config.patch has the same problem, too, on the very latest svn
> download (from 12 hours ago). Here's what I get on a build with the very
> latest extras/contrib:
> patch -Np0 < Patches/live-config.patch
> patching file live/config.armeb-uclibc
> patching file live/config.armlinux
> Hunk #1 FAILED at 1.
> 1 out of 1 hunk FAILED -- saving rejects to file live/config.armlinux.rej
> The next patch would create the file live/config.armlinux.orig,
> which already exists!  Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file
> live/config.armlinux.orig.rej
> The next patch would create the file live/config.armlinux.rej,
> which already exists!  Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file
> live/config.armlinux.rej.rej
> patching file live/config.cygwin
> patching file live/config.freebsd
> patching file live/config.linux
> patching file live/config.linux-gdb
> patching file live/config.macosx-before-version-10.4
> patching file live/config.mingw
> Hunk #1 succeeded at 1 with fuzz 2.
> patching file live/config.openbsd
> patching file live/config.solaris
> patching file live/config.uClinux
> make[2]: *** [live] Error 1
> make[2]: Leaving directory `/home/mfm/vlc-trunk/extras/contrib/src'
> make[1]: *** [src] Error 2
> 
> I open live-config.patch, resave in Unix format, and live then builds fine.
> 
> 
> 
> -----Original Message-----
> From: vlc-devel-bounces at videolan.org [mailto:vlc-devel-bounces at videolan.org]
> On Behalf Of Rafaël Carré
> Sent: Tuesday, September 18, 2007 8:23 AM
> To: Mailing list for VLC media player developers
> Subject: Re: [vlc-devel] Current extras/contrib faac patch broken -- needsLF
> only, at least under Cygwin
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
>>
>>
> 
> do you have a reason for not using msys ?
> 
> --
> Rafaël Carré
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
> 

[fun at zod /media/bordel/trunk/extras/contrib/src]% rm -rf live
[fun at zod /media/bordel/trunk/extras/contrib/src]% make live
rm -rf live || true
gunzip -c live555-latest.tar.gz | tar xf - --exclude='[*?:<>\|]'
mv live555-latest live || true
mv: ne peut évaluer `live555-latest': Aucun fichier ou répertoire de ce type
touch live
patch -p0 < Patches/live.patch
patching file live/groupsock/Groupsock.cpp
Hunk #1 succeeded at 29 with fuzz 2 (offset 3 lines).
patching file live/groupsock/NetInterface.cpp
Hunk #1 succeeded at 28 with fuzz 2 (offset 4 lines).
patching file live/liveMedia/RTSPClient.cpp
Hunk #2 succeeded at 1030 (offset 1 line).
Hunk #3 succeeded at 1043 (offset 1 line).
Hunk #4 succeeded at 2284 (offset 1 line).
patch -p0 < Patches/live-starttime.patch
patching file live/liveMedia/MediaSession.cpp
Hunk #1 succeeded at 62 (offset 1 line).
Hunk #2 succeeded at 349 (offset 1 line).
Hunk #3 succeeded at 358 (offset 1 line).
Hunk #4 succeeded at 531 (offset 1 line).
Hunk #5 succeeded at 553 (offset 1 line).
Hunk #6 succeeded at 979 (offset 2 lines).
patching file live/liveMedia/RTSPClient.cpp
patching file live/liveMedia/include/MediaSession.hh
patching file live/liveMedia/include/RTSPClient.hh
Hunk #1 succeeded at 186 (offset 1 line).
patching file live/liveMedia/include/liveMedia_version.hh
patch -Np0 < Patches/live-config.patch
patching file live/config.armeb-uclibc
patching file live/config.armlinux
patching file live/config.armlinux.orig
patching file live/config.armlinux.rej
patching file live/config.cygwin
patching file live/config.freebsd
patching file live/config.linux
patching file live/config.linux-gdb
patching file live/config.macosx-before-version-10.4
patching file live/config.mingw
patching file live/config.openbsd
patching file live/config.solaris
patching file live/config.uClinux

Original patch builds fine.

[fun at zod /media/bordel/trunk/extras/contrib/src]% fromdos
Patches/live-config.patch

I convert it to pure UNIX \n terminator (LF)

[fun at zod /media/bordel/trunk/extras/contrib/src]% make live
rm -rf live || true
gunzip -c live555-latest.tar.gz | tar xf - --exclude='[*?:<>\|]'
mv live555-latest live || true
mv: ne peut évaluer `live555-latest': Aucun fichier ou répertoire de ce type
touch live
patch -p0 < Patches/live.patch
patching file live/groupsock/Groupsock.cpp
Hunk #1 succeeded at 29 with fuzz 2 (offset 3 lines).
patching file live/groupsock/NetInterface.cpp
Hunk #1 succeeded at 28 with fuzz 2 (offset 4 lines).
patching file live/liveMedia/RTSPClient.cpp
Hunk #2 succeeded at 1030 (offset 1 line).
Hunk #3 succeeded at 1043 (offset 1 line).
Hunk #4 succeeded at 2284 (offset 1 line).
patch -p0 < Patches/live-starttime.patch
patching file live/liveMedia/MediaSession.cpp
Hunk #1 succeeded at 62 (offset 1 line).
Hunk #2 succeeded at 349 (offset 1 line).
Hunk #3 succeeded at 358 (offset 1 line).
Hunk #4 succeeded at 531 (offset 1 line).
Hunk #5 succeeded at 553 (offset 1 line).
Hunk #6 succeeded at 979 (offset 2 lines).
patching file live/liveMedia/RTSPClient.cpp
patching file live/liveMedia/include/MediaSession.hh
patching file live/liveMedia/include/RTSPClient.hh
Hunk #1 succeeded at 186 (offset 1 line).
patching file live/liveMedia/include/liveMedia_version.hh
patch -Np0 < Patches/live-config.patch
patching file live/config.armeb-uclibc
patching file live/config.armlinux
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file live/config.armlinux.rej
The next patch would create the file live/config.armlinux.orig,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
live/config.armlinux.orig.rej
The next patch would create the file live/config.armlinux.rej,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
live/config.armlinux.rej.rej
patching file live/config.cygwin
patching file live/config.freebsd
patching file live/config.linux
patching file live/config.linux-gdb
patching file live/config.macosx-before-version-10.4
patching file live/config.mingw
patching file live/config.openbsd
patching file live/config.solaris
patching file live/config.uClinux
make: *** [live] Erreur 1

Now that fails, so converting to UNIX terminator is a no go.

[fun at zod /media/bordel/trunk/extras/contrib/src]% todos
Patches/live-config.patch

I convert it to pure Windows \r\n (CRLF)

[fun at zod /media/bordel/trunk/extras/contrib/src]% make live
rm -rf live || true
gunzip -c live555-latest.tar.gz | tar xf - --exclude='[*?:<>\|]'
mv live555-latest live || true
mv: ne peut évaluer `live555-latest': Aucun fichier ou répertoire de ce type
touch live
patch -p0 < Patches/live.patch
patching file live/groupsock/Groupsock.cpp
Hunk #1 succeeded at 29 with fuzz 2 (offset 3 lines).
patching file live/groupsock/NetInterface.cpp
Hunk #1 succeeded at 28 with fuzz 2 (offset 4 lines).
patching file live/liveMedia/RTSPClient.cpp
Hunk #2 succeeded at 1030 (offset 1 line).
Hunk #3 succeeded at 1043 (offset 1 line).
Hunk #4 succeeded at 2284 (offset 1 line).
patch -p0 < Patches/live-starttime.patch
patching file live/liveMedia/MediaSession.cpp
Hunk #1 succeeded at 62 (offset 1 line).
Hunk #2 succeeded at 349 (offset 1 line).
Hunk #3 succeeded at 358 (offset 1 line).
Hunk #4 succeeded at 531 (offset 1 line).
Hunk #5 succeeded at 553 (offset 1 line).
Hunk #6 succeeded at 979 (offset 2 lines).
patching file live/liveMedia/RTSPClient.cpp
patching file live/liveMedia/include/MediaSession.hh
patching file live/liveMedia/include/RTSPClient.hh
Hunk #1 succeeded at 186 (offset 1 line).
patching file live/liveMedia/include/liveMedia_version.hh
patch -Np0 < Patches/live-config.patch
(Stripping trailing CRs from patch.)
patching file live/config.armeb-uclibc
(Stripping trailing CRs from patch.)
patching file live/config.armlinux
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file live/config.armlinux.rej
The next patch would create the file live/config.armlinux.orig,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
live/config.armlinux.orig.rej
The next patch would create the file live/config.armlinux.rej,
which already exists!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
live/config.armlinux.rej.rej
(Stripping trailing CRs from patch.)
patching file live/config.cygwin
(Stripping trailing CRs from patch.)
patching file live/config.freebsd
(Stripping trailing CRs from patch.)
patching file live/config.linux
(Stripping trailing CRs from patch.)
patching file live/config.linux-gdb
(Stripping trailing CRs from patch.)
patching file live/config.macosx-before-version-10.4
(Stripping trailing CRs from patch.)
patching file live/config.mingw
(Stripping trailing CRs from patch.)
patching file live/config.openbsd
(Stripping trailing CRs from patch.)
patching file live/config.solaris
(Stripping trailing CRs from patch.)
patching file live/config.uClinux
make: *** [live] Erreur 1

That fails again, so the patch will stay like it is.



Looking at the patch with an editor showing differently the \r\n and \n
show that they are mixed. This is because the patch changes some files
with CRLF terminators (namely config.armlinux), and some other with LF
terminatores.


There is several solutions for you:

1. Switch to Linux, as most developers do. You can use a virtual machine
emulator like Qemu or VMware to run Linux, and build a _Windows_ package
of vlc.

- From there, you can get the package from the virtual machine to the real
one with a web server or what ever you want.

2. Bug the live maintainer to not mix CRLF & LF in the tarball.

3. Split the live patch to workaround your buggy diff program.

4. Fix cygwin diff.

5. Use the prebuilt contribs.

Hope you'll get the correct one ;)

- --
Rafaël Carré
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8GC9YWCeGMCv8Q8RAkQEAJ0UcxSHG6oagZBeijPX8P4kZDyQHwCgpsgm
zWgiNeR2o2MVrfdBFeRP/BU=
=IrSO
-----END PGP SIGNATURE-----



More information about the vlc-devel mailing list