LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2011, 05:36 AM   #1
anon02
Member
 
Registered: Aug 2011
Posts: 223

Rep: Reputation: Disabled
i586-mingw32msvc-gcc using the wrong compiler?


Recently I installed i586-mingw32msvc-gcc onto my openSuSE netbook, and it cannot compile. It returns:
Code:
/tmp/ccZqnIsi.s:7: Fatal error: bad .section directive: want a,w,x,M,S,G,T in string
I checked some forums, and found a suggestion to add -### to see what it was doing. It returned:

Code:
Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.2/specs
Configured with: /home/ron/devel/debian/mingw32/mingw32-3.4.2.20040916.1/build_dir/src/gcc-3.4.2-20040916-1/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 3.4.2 (mingw-special)
 "/usr/libexec/gcc/i586-mingw32msvc/3.4.2/cc1" "-quiet" "main.c" "-quiet" "-dumpbase" "main.c" "-mtune=pentium" "-auxbase" "main" "-o" "/tmp/ccS9nWbI.s"
 "as" "-o" "/tmp/ccuqe7Kg.o" "/tmp/ccS9nWbI.s"
 "/usr/libexec/gcc/i586-mingw32msvc/3.4.2/collect2" "-Bdynamic" "crt2.o" "/usr/lib/gcc/i586-mingw32msvc/3.4.2/crtbegin.o" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2/../../../../i586-mingw32msvc/lib" "/tmp/ccuqe7Kg.o" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "-luser32" "-lkernel32" "-ladvapi32" "-lshell32" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "/usr/lib/gcc/i586-mingw32msvc/3.4.2/crtend.o"
I read the post and it said that where it had 'as' it should be 'mingw32-as'. How could I modify this?
 
Old 11-06-2011, 06:45 AM   #2
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ThatPerson View Post
Recently I installed i586-mingw32msvc-gcc onto my openSuSE netbook, and it cannot compile. It returns:
Code:
/tmp/ccZqnIsi.s:7: Fatal error: bad .section directive: want a,w,x,M,S,G,T in string
I checked some forums, and found a suggestion to add -### to see what it was doing. It returned:

Code:
Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.2/specs
Configured with: /home/ron/devel/debian/mingw32/mingw32-3.4.2.20040916.1/build_dir/src/gcc-3.4.2-20040916-1/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 3.4.2 (mingw-special)
 "/usr/libexec/gcc/i586-mingw32msvc/3.4.2/cc1" "-quiet" "main.c" "-quiet" "-dumpbase" "main.c" "-mtune=pentium" "-auxbase" "main" "-o" "/tmp/ccS9nWbI.s"
 "as" "-o" "/tmp/ccuqe7Kg.o" "/tmp/ccS9nWbI.s"
 "/usr/libexec/gcc/i586-mingw32msvc/3.4.2/collect2" "-Bdynamic" "crt2.o" "/usr/lib/gcc/i586-mingw32msvc/3.4.2/crtbegin.o" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2" "-L/usr/lib/gcc/i586-mingw32msvc/3.4.2/../../../../i586-mingw32msvc/lib" "/tmp/ccuqe7Kg.o" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "-luser32" "-lkernel32" "-ladvapi32" "-lshell32" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "/usr/lib/gcc/i586-mingw32msvc/3.4.2/crtend.o"
I read the post and it said that where it had 'as' it should be 'mingw32-as'. How could I modify this?
3.4.2 is very old. I'd advise to upgrade to 4.4.0. If you're trying to cross-compile app for windows (not exactly a good idea), you should try to find newer tools. You also should be able to run windows compilers using WINE.
 
Old 11-06-2011, 07:39 AM   #3
anon02
Member
 
Registered: Aug 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SigTerm View Post
3.4.2 is very old. I'd advise to upgrade to 4.4.0. If you're trying to cross-compile app for windows (not exactly a good idea), you should try to find newer tools. You also should be able to run windows compilers using WINE.
Thanks for the link. I went there to get it, and ran the commands, and on the 'make' command got the error:

Code:
[check requirements]
[download] mingwrt
[build]    mingwrt
[done]     mingwrt
[download] w32api
[build]    w32api
[done]     w32api
[download] binutils

Wrong checksum of package binutils!
------------------------------------------------------------
           => `-'
Resolving ftp.cs.tu-berlin.de... 130.149.17.12
Connecting to ftp.cs.tu-berlin.de|130.149.17.12|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/gnu/binutils ... done.
==> SIZE binutils-2.21.tar.bz2 ... done.
==> PASV ... done.    ==> RETR binutils-2.21.tar.bz2 ... 
No such file `binutils-2.21.tar.bz2'.
------------------------------------------------------------
[log]      /opt/mingw/log/binutils-download

make: *** [/opt/mingw/usr/installed/binutils] Error 1
Which possibly means that the server is down. Is there another way?
 
Old 11-06-2011, 10:16 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You could just edit the binutils.mk file to point it to a version of binutils that does exist. You can find the file in the "src" directory and it's pretty obvious what you should change. The GNU mirror listed in the file (at least in my version of mingw-cross-env) doesn't appear to have version 2.21 of the file, but it does have 2.21.1 (and 2.21.1a, though I don't know what the difference is). It seems that the TU Berlin mirror isn't as up to date (I just checked). Edit: Of course, you'll need to change the checksum too!

Last edited by Nylex; 11-06-2011 at 10:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error building cross gcc-3.3.2 for i386-mingw32msvc target ugenn Linux - Software 2 10-05-2012 02:33 AM
Installing i586-mingw32msvc-gcc on openSUSE anon02 Linux - Software 2 11-05-2011 03:23 PM
i586-mingw32msvc-gcc and -lpcap vip2442 Linux - Software 2 10-27-2011 01:58 AM
Fortran - G95 - Wrong Syntax or wrong compiler settings laucian Programming 1 03-21-2008 10:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration