Page 1 of 1

Cygwin environment broken

Posted: 07 Oct 2006 12:26
by Trax
There is a problem for using Cygwin as a compilation environment for VLC, FFmpeg, x264 etc. with the latest version of packages (at least since 7 oct. 2006).

VLC (svn 16959 but also later revisions) compile breaks at:

Code: Select all

misc/version.c:6: error: missing terminating " character misc/version.c:7: error: missing terminating " character misc/version.c:7: error: parse error at end of input make[4]: *** [misc/libvlc_a-version.o] Error 1
The contents of version.c (generated every compile by ./toolbox --update-version) appears flawed and shows the svn version nr. with a question mark "16959?"

Using a simple svnversion test the following output is created:

Code: Select all

$ bash --version GNU bash, version 3.1.17(9)-release (i686-pc-cygwin) Copyright (C) 2005 Free Software Foundation, Inc. $ test=`svnversion .`; echo \"$test\" "16959
This is wrong since there is a missing " at the end. Reverting to older bash 3.1.17(6) does show a " at the end but still the version.c has the same problem with the question mark. This doesn't only affect VLC but also other sources such as x264 (svn 584) compilation:

Code: Select all

In file included from x264.c:42: config.h:5: error: missing terminating " character x264.c: In function `Help': x264.c:142: error: missing terminating " character x264.c:142: error: parse error before ',' token make: *** [x264.o] Error 1
Again the version nr. inside the generated config.h is not correct and shows a ? mark at the end. FFmpeg (svn 6572) already fails on configure:

Code: Select all

$ ./configure : command not found: : No such file or directoryull '/configure: line 20: syntax error near unexpected token `{ '/configure: line 20: `show_help(){
The problem seems bash / dos2unix related.

The advice for now is if you have a working environment, DO NOT UPGRADE any package at this time. If you have any suggestions please post here. Downgrading binutils, bash etc. does not help.

Some threads referring to broken cygwin/binutils/gdb:
viewtopic.php?t=27504 - Compiling latest svn trunk (17130) fails
viewtopic.php?t=27372 - Debugging vlc in cygwin/gdb
viewtopic.php?t=27993 - Compiled 0.8.5 version okay, but can't execute on winXP
viewtopic.php?t=28204 - Can't compile VLC with cygwin

Posted: 24 Oct 2006 13:36
by Kashy
I have had a similar problem while compiling 0.8.5 with cygwin.

By changing some stuff I got it to work again.

The solution I had found was that your keyboard language should be set to 'United States(International)' which fixed the problem for us.

Besides that, uninstall SVN and download the source of vlc manually.

This fixed my problems trying to compile under cygwin.

version file

Posted: 12 Jan 2007 12:43
by dreif
Hi,

I'm new using VLC and tried to compile it from SVN using cygwin. I ran in this problem to. I fixed it by patching the toolbox script.

Actually svnversion seems to append a M$ carridge return after the version number. this code seems to correct the problem:

toolbox 'Create version file' line 608

Code: Select all

VLC_CHANGESET=$(echo $VLC_CHANGESET| tr -d '\r\032')

Hope it helps.

Regards,
Frederic

Posted: 19 Jan 2007 04:43
by Paul Yarkov
So, can anybody tell me, what version from SVN (rev. 15380 or higher) is most stable and easy to compiling with cygwin? I try to build rev. 15380 with precompiled libraries contrib-20060428-win32-bin-gcc-3.4.5-only.tar.bz2, it's compiled almost normally, but executable file not works perfectly - telnet interface starting is impossible. :( Any ideas? Anybody can help me? Thanks a lot.
PS. Excuse me for my bad English.

Posted: 26 Jan 2007 14:27
by Trax
I've added a new howto to the wiki which should cover the existing problems with Cygwin and work with latest svn again: http://wiki.videolan.org/Win32CompileCygwin

Posted: 16 Feb 2007 07:47
by Paul Yarkov
I've added a new howto to the wiki which should cover the existing problems with Cygwin and work with latest svn again: http://wiki.videolan.org/Win32CompileCygwin
Yes, it works. :) Now I can build rev. 18730 from SVN using contrib-20061202-win32-bin-gcc-3.4.5-only.tar.bz2 precompiled libraries. But a lot of warninigs on configuring (about 10) and compiling (more than 1500) still present. :( Is it normal? How I can fix this problem? Thanks a lot.

Posted: 16 Feb 2007 09:23
by Jean-Baptiste Kempf
Warnings are just warnings, not error . So if it compiles, then it is OK.

Posted: 20 Jun 2007 10:48
by Trollslayer
I've added a new howto to the wiki which should cover the existing problems with Cygwin and work with latest svn again: http://wiki.videolan.org/Win32CompileCygwin
This works for me as well, nice page for those running Windows!