[vlc-devel] Cygwin/Mingw Disagreements

Mark Moriarty mfmbusiness at earthlink.net
Sat Nov 11 01:47:18 CET 2006


The following are responses to Xtophe's questions:

     How did you called bootsrtap in extra/contrib ? 
I opened to a normal Cygwin bash, CD'd to extras/contrib, ran ./bootstrap,
then make.

     what's the output of gcc -dumpmachine
At the root of my VLC trunk I have:
mfm at Mark ~/vlc-trunk
$ gcc -dumpmachine
i686-pc-cygwin


I just went back down to extras/contrib, purged the files at that level, ran
SVN update at that level (to restore change_prefix.sh, bootstrap, Makefile,
and README), then reran ./bootstrap.  The output starts like:
$ ./bootstrap
++ gcc -dumpmachine
+ BUILD=i686-pc-cygwin
+ test 0 = 1
+ HOST=i686-pc-cygwin
+ rm -f config.mak
+ echo -e '# Automatically generated by bootstrap.\n# Make changes if you
know w
hat you'\''re doing.\n'
+ test i686-pc-cygwin '!=' i686-pc-cygwin
+ case $HOST in
+ echo 'HAVE_WIN32 = 1'
+ CC='gcc -mno-cygwin -isystem /usr/include/mingw'
+ CXX='g++ -mno-cygwin -isystem /usr/include/mingw'
++ gcc -mno-cygwin -isystem /usr/include/mingw -dumpmachine
+ HOST=i686-pc-mingw32
+ EXTRA_CFLAGS=' -mno-cygwin -isystem /usr/include/mingw'
+ EXTRA_CPPFLAGS=' -mno-cygwin -isystem /usr/include/mingw'
+ EXTRA_LDFLAGS=' -mno-cygwin'

You can see there's an initial HOST=i686-pc-cygwin, but then for whatever
reason the bootstrap outputs a line HOST=i686-pc-mingw.  The./bootstrap
creates a config.mak file that then has the HOST=i686-pc-mingw in it, as
opposed to the i686-pc-cygwin.

     what's the value of CC in configure ?
By definition (based on the code for bootstrap in extras/contrib), that
second HOST you see in the output dump above is what CC is outputting.  Just
to be sure, I've cut and paste4 the couple of lines that matter, from
extras/contrib/bootstrap:
mfm at Mark ~/vlc-trunk/extras/contrib
$             CC="gcc -mno-cygwin -isystem /usr/include/mingw"

mfm at Mark ~/vlc-trunk/extras/contrib
$             CXX="g++ -mno-cygwin -isystem /usr/include/mingw"

mfm at Mark ~/vlc-trunk/extras/contrib
$             HOST=`$CC -dumpmachine`

mfm at Mark ~/vlc-trunk/extras/contrib
$ $CC -dumpmachine
i686-pc-mingw32


So, either the ./bootstrap for extras/contrib needs to stick with
i686-pc-cygwin, else the ./bootstrap up at the vlc trunk level needs to say
i686-pc-mingw; right now they disagree, so the VLC top-level ./bootstrap and
./configure ignore the extras/contrib, since there's a disagreement in HOST
definition.

(the cygwin build environment is using a mingw compiler under the hood, so
that second HOST definition is twisting things up)

The first HOST definition in extras/contrib/bootstrap agrees with what
happens when running bootstrap at the top trunk level.

I'm trying again...  
I've gone to extras/contrib, ran a make clean, modified bootstrap to comment
out the HOST line that changes it to mingw:
#            HOST=`$CC -dumpmachine`
and am running a make on extras/contrib.  25 hours from now I'll be able to
retry building VLC at the top level :)  (Building extras/contrib takes a
looong time.  I'll also, of course, have to keep an eye out for the various
extras/contrib build glitches I've seen recently.)

Wish me luck!

Mark

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list