Page 1 of 1

makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Thu Feb 15, 2018 2:49 pm
by new2wx
I downloaded and installed minGW & Code Blocks, and checked it with a basic 'hello, world' C program - OK (except the build wanted to use the c++ compiler). I added the c++ compiler and it worked. I tried a sample Windows graphics program, and that worked, too.
Next I was looking for how to add GUI and found wxWidgets. I downloaded the zip filr (3.0.2) and tried the command-line build using:

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release

but get an error:

...
In file included from ../../src/tiff/libtiff/tiffio.h:257:0,
from ../../src/tiff/libtiff/tiffiop.h:59,
from ../../src/tiff/libtiff/tif_win32.c:30:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed
mingw32-make: *** [gcc_mswudll\wxtiff_tif_win32.o] Error 1


I opened the stdio.h file, and it doesn't have newlines, so I searched for the text and tried adding a ";", but still get the same error..

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Thu Feb 15, 2018 3:31 pm
by stahta01
Try wxWidget 3.0.3 or patch the 3.0.2 you downloaded.

I am 80% sure this problem was patched between 3.0.2 and 3.0.3.

NOTE: You can also use an older MinGW GCC that works with 3.0.2.

Tim S.

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Thu Feb 15, 2018 8:10 pm
by PB
I believe the issue was fixed two months ago in the trunk and was not backported to the 3.0.x branch:
https://trac.wxwidgets.org/ticket/17936

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Thu Feb 15, 2018 10:51 pm
by ONEEYEMAN
Hi,
On the side note - why do you want to use 3.0.2, when you can get 3.1 version.
Not everything is backported to the stable branch.

Thank you.

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Mon Feb 19, 2018 1:33 pm
by new2wx
I only downloaded the zip file 10 days ago, from the wxwidgets website.. I didn't see a newer download..
I just tried the 3.0.3 setup.exe (installed into a new directory), and got the same error!
I considered downloading binaries, but I can't tell which version of MinGW I have.. (downloaded from their website)

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Mon Feb 19, 2018 4:23 pm
by New Pagodi
new2wx wrote:I only downloaded the zip file 10 days ago, from the wxwidgets website.. I didn't see a newer download..
I just tried the 3.0.3 setup.exe (installed into a new directory), and got the same error!
I considered downloading binaries, but I can't tell which version of MinGW I have.. (downloaded from their website)
3.1.1 should be released either later today or tommorow. It should build fine with MinGW.

I wrote about the problem your having here. As I said there, you can either
1) make a small change to tif_config.h to fix the build issue.
2) use the latest version from git.
3) Use a toolchain from the MinGW64 project. If you go that route, you probably want to use either this for 32 bit development or this for 64 bit development.

I guess now there can be a fourth option: wait for 3.1.1

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Mon Feb 19, 2018 11:59 pm
by new2wx
I tried the patch on 3.0.3, but got a different error, so I deleted 3.0.2 and 3.0.3 and downloaded 3.1.1 - and got this error:

In file included from ../../src/stc/scintilla/lexers/LexA68k.cxx:13:0:
c:\mingw\include\stdio.h:349:12: error: declaration does not declare anything [-fpermissive]
extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
^
c:\mingw\include\stdio.h:349:85: error: expected constructor, destructor, or type conversion before ';' token
extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
^
c:\mingw\include\stdio.h:504:25: error: declaration does not declare anything [-fpermissive]
__cdecl __MINGW_NOTHROW __Wformat_vsnprintf
^
makefile.gcc:6183: recipe for target 'gcc_mswudll\wxscintilla_LexA68k.o' failed
mingw32-make: *** [gcc_mswudll\wxscintilla_LexA68k.o] Error 1

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Tue Feb 20, 2018 12:25 am
by ONEEYEMAN
Hi,
You did use the same command as in the OP, right?
Which version of MinGW do you use? Are you running from the Windows command prompt? Can you run "gcc -v" from the command prompt?

It would also be nice to know where did you get this version of MinGW from.

Thank you.

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Tue Feb 20, 2018 7:36 am
by new2wx
I copied the same command as in my original post, which I got from the MinGW website..
https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW

yes, I opened a command prompt window.

This is what I got from gcc -v:

C:\wxWidgets311\build\msw>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)


I got minGW from here: https://sourceforge.net/projects/mingw/ ... t/download

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Tue Feb 20, 2018 10:45 am
by new2wx
I deleted the MinGW files and started again, and I think the build has completed.. now to try the 'hello, world' example to see if it works..

Re: makefile.gcc:5942: recipe for target 'gcc_mswudll\wxtiff_tif_win32.o' failed (W10)

Posted: Tue Feb 20, 2018 5:37 pm
by ONEEYEMAN
Hi,
Don't do any "Hello World" stuff.
Try to build an official "minimal" sample provided with the library. If that works and you can run it - everything is good.

Thank you.