CLI Compile error under minGW
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
CLI Compile error under minGW
I have been compiling the CLI under ubuntu minGW for a little while now, until I updated past rev 3266. 3266 compiles fine, but 3267, which updates ffmpeg, and a few other things,fails to compile. I know it's been a little while since this was patched, but I don't compile every night.
Here's the error log:
: /usr/bin/make -C ./contrib/ffmpeg/ffmpeg-r22950/
: make[1]: Entering directory `/home/ed/HandBrake/build/contrib/ffmpeg/ffmpeg-r22950'
: CC libavdevice/alldevices.o
: In file included from ./libavformat/avformat.h:55,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:372: error: no previous prototype for ‘getc’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:379: error: no previous prototype for ‘putc’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:386: error: no previous prototype for ‘getchar’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:393: error: no previous prototype for ‘putchar’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:606: error: no previous prototype for ‘vsnwprintf’
: In file included from ./libavutil/common.h:31,
: from ./libavutil/avutil.h:81,
: from ./libavcodec/avcodec.h:30,
: from ./libavformat/avformat.h:56,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/inttypes.h:259: error: no previous prototype for ‘imaxabs’
: In file included from ./libavutil/common.h:33,
: from ./libavutil/avutil.h:81,
: from ./libavcodec/avcodec.h:30,
: from ./libavformat/avformat.h:56,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:357: error: no previous prototype for ‘__fpclassifyl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:378: error: no previous prototype for ‘__isnan’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:387: error: no previous prototype for ‘__isnanf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:396: error: no previous prototype for ‘__isnanl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:413: error: no previous prototype for ‘__signbit’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:419: error: no previous prototype for ‘__signbitf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:425: error: no previous prototype for ‘__signbitl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:459: error: no previous prototype for ‘sinhf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:463: error: no previous prototype for ‘coshf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:467: error: no previous prototype for ‘tanhf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:489: error: no previous prototype for ‘expf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:505: error: no previous prototype for ‘frexpf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:517: error: no previous prototype for ‘ldexpf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:597: error: no previous prototype for ‘hypotf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:602: error: no previous prototype for ‘powf’
: make[1]: *** [libavdevice/alldevices.o] Error 1
: make[1]: Leaving directory `/home/ed/HandBrake/build
Any idea why this is failing?
Here's the error log:
: /usr/bin/make -C ./contrib/ffmpeg/ffmpeg-r22950/
: make[1]: Entering directory `/home/ed/HandBrake/build/contrib/ffmpeg/ffmpeg-r22950'
: CC libavdevice/alldevices.o
: In file included from ./libavformat/avformat.h:55,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:372: error: no previous prototype for ‘getc’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:379: error: no previous prototype for ‘putc’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:386: error: no previous prototype for ‘getchar’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:393: error: no previous prototype for ‘putchar’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/stdio.h:606: error: no previous prototype for ‘vsnwprintf’
: In file included from ./libavutil/common.h:31,
: from ./libavutil/avutil.h:81,
: from ./libavcodec/avcodec.h:30,
: from ./libavformat/avformat.h:56,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/inttypes.h:259: error: no previous prototype for ‘imaxabs’
: In file included from ./libavutil/common.h:33,
: from ./libavutil/avutil.h:81,
: from ./libavcodec/avcodec.h:30,
: from ./libavformat/avformat.h:56,
: from libavdevice/alldevices.c:22:
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:357: error: no previous prototype for ‘__fpclassifyl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:378: error: no previous prototype for ‘__isnan’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:387: error: no previous prototype for ‘__isnanf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:396: error: no previous prototype for ‘__isnanl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:413: error: no previous prototype for ‘__signbit’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:419: error: no previous prototype for ‘__signbitf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:425: error: no previous prototype for ‘__signbitl’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:459: error: no previous prototype for ‘sinhf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:463: error: no previous prototype for ‘coshf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:467: error: no previous prototype for ‘tanhf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:489: error: no previous prototype for ‘expf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:505: error: no previous prototype for ‘frexpf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:517: error: no previous prototype for ‘ldexpf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:597: error: no previous prototype for ‘hypotf’
: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/math.h:602: error: no previous prototype for ‘powf’
: make[1]: *** [libavdevice/alldevices.o] Error 1
: make[1]: Leaving directory `/home/ed/HandBrake/build
Any idea why this is failing?
Re: CLI Compile error under minGW
in the build dir
make ffmpeg.xclean
make
make ffmpeg.xclean
make
Re: CLI Compile error under minGW
Same results. I remove the build directory before I run configure...
Re: CLI Compile error under minGW
Probably dying for the same reason the nightly is. Someone will fix it when they have time to get around to it
Re: CLI Compile error under minGW
Ok. Thanks.
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: CLI Compile error under minGW
I tested building mingw before the last ffmpeg bump was committed. It worked then. So I just did a make xclean; make. Works now as well. So I thought, maybe I should replicate your steps completely and remove the build directory. Still works. Don't know what else to try. I use fedora which has a more complete mingw set of packages.
Re: CLI Compile error under minGW
Oddly enough, I could never get it to compile under fedora, always failed then too. I installed ubuntu, worked ok until yesterday when I updated to the newest revision. This morning I did a svn up -r 3266 HandBrake, then a rm -r -f build, then ./configure --cross=i586-mingw32msvc --launch. Compile successfully. I then did svn up -r 3267 HandBrake, then a rm -r -f build, then ./configure --cross=i586-mingw32msvc --launch. And got the error message above. Just tried it again to make sure, same result. I'm at a loss too.
Re: CLI Compile error under minGW
Found the problem, in case anyone is interested. ffmpeg added check_cflags -Werror=missing-prototypes to configure, and the version of mingw32 that comes with ubuntu (4.2) doesn't like that. The version that comes with fedora is newer (4.4). I still can't get it to compile on fedora though, bombs out when it tries to create hb.lib with a lot of undefined references in libdvdread.a and libx264.a.
Thanks for looking into this for me though.
Thanks for looking into this for me though.
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: CLI Compile error under minGW
Yes, fedora's *complete* mingw distribution does a little more than you want. For starters, it installs wine and enables automatic execution of windows executables. This breaks many configure scripts that attempt to run an exe that they build in order to determine if you are cross compiling or not. So configure guesses wrong and ends up building with incorrect options. So you need to open System->Administration->Services and disable wine and make sure it doesn't run it the next time you boot.
In addition, our build system builds a local copy of pthreads that conflicts with the pthreads lib fedora installs. So you need to uninstall mingw's pthreads lib.
And finally, libdl (dlopen and friends) doesn't work properly with the way we configure libdvdread. So you need to uninstall mingw's libdl.
In addition, our build system builds a local copy of pthreads that conflicts with the pthreads lib fedora installs. So you need to uninstall mingw's pthreads lib.
And finally, libdl (dlopen and friends) doesn't work properly with the way we configure libdvdread. So you need to uninstall mingw's libdl.
Re: CLI Compile error under minGW
Excellent, that did the trick, thanks!
Re: CLI Compile error under minGW
Hi guys!
I was having the same issue compiling under Ubuntu (clean install this week) and noticed that if I installed the mingw32 packages i get
But there is another package called gcc-mingw32 which gives you
It seems a little strange to get two different versions of the same software in a repo, but the newer version works for me at compiling the latest build.
Hope this helps others.
I was having the same issue compiling under Ubuntu (clean install this week) and noticed that if I installed the mingw32 packages i get
Code: Select all
/usr/bin/i586-mingw32msvc-gcc --version
i586-mingw32msvc-gcc (GCC) 4.2.1-sjlj (mingw32-2)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code: Select all
/usr/bin/i586-mingw32msvc-gcc --version
i586-mingw32msvc-gcc (GCC) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Hope this helps others.
Re: CLI Compile error under minGW
Thank you, NaVVy, that did the trick for me as well (Ubuntu 10.04 LTS).
Roger
Code: Select all
$ sudo apt-get remove mingw32
$ sudo apt-get install gcc-mingw32
$ ./configure --cross=i586-mingw32msvc --launch-jobs=1 --launch --force