Compiling issue MinGW

Compiling issue MinGW

Postby dimproject » 04 May 2015, 11:59

OS Windows
IDE CodeBlocks 13.12 http://www.codeblocks.org/features
Compiler i686-w64-mingw32 4.9.2 from http://sourceforge.net/projects/mingw-w ... t/download

Something wrong with linking.

{l Code}: {l Select All Code}
Linking CXX executable bin\supertuxkart.exe
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\supertuxkart.dir\link.txt --verbose=1
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E remove -f CMakeFiles\supertuxkart.dir/objects.a
C:\MinGW\mingw32\bin\ar.exe cr CMakeFiles\supertuxkart.dir/objects.a @CMakeFiles\supertuxkart.dir\objects1.rsp
C:\MinGW\mingw32\bin\i686-w64-mingw32-g++.exe   -fopenmp -std=gnu++0x -Wall -O2 -DNDEBUG   -Wl,--subsystem,windows -Wl,--whole-archive CMakeFiles\supertuxkart.dir/objects.a -Wl,--no-whole-archive  -o bin\supertuxkart.exe -Wl,--out-implib,libsupertuxkart.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\supertuxkart.dir\linklibs.rsp
../dependencies/lib/libpng.lib: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [bin/supertuxkart.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles/supertuxkart.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
mingw32-make.exe[2]: Leaving directory `C:/STK/stk-code/build'
mingw32-make.exe[1]: Leaving directory `C:/STK/stk-code/build'
Process terminated with status 2 (0 minute(s), 20 second(s))
0 error(s), 0 warning(s) (0 minute(s), 20 second(s))
dimproject
 
Posts: 212
Joined: 18 Jul 2013, 13:51

Re: Compiling issue MinGW

Postby deve » 04 May 2015, 21:16

I have exactly the same problem on linux after recent upgrade when I try to cross-compile it...

As a temporary workaround you can:
- remove libpng.lib libjpeg.lib and zdll.lib from dependencies/lib directory
- copy dependencies/dll/jpeg62.dll to dependencies/lib/libjpeg.dll
- copy dependencies/dll/libpng12.dll to dependencies/lib/libpng12.dll
- copy dependencies/dll/zlib1.dll to dependencies/lib/zlib1.dll
- create new build directory to force cmake to find these libraries

I have also the same problem with other libraries :(

If there is no easy way to still use these .lib files, I will probably simply use .dll instead of .lib in dependency package.
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Compiling issue MinGW

Postby deve » 04 May 2015, 21:42

Looks like a regression in binutils 2.25, already fixed in current git:
https://sourceware.org/bugzilla/show_bug.cgi?id=17910

I will update STK dependency package soon.

Edit:
Ok, already pushed to the repo:
https://github.com/supertuxkart/depende ... 1fb182c326
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Compiling issue MinGW

Postby dimproject » 06 May 2015, 12:51

No problem with build now.
Thanks deve for great work! :)
dimproject
 
Posts: 212
Joined: 18 Jul 2013, 13:51

Who is online

Users browsing this forum: No registered users and 1 guest