Page 1 of 1
GCC Cross-Compiler extra note
Posted: Mon Dec 13, 2010 4:22 am
by thelamb
I added an extra note to the GCC Cross-Compiler entry that apparently two users could not verify... I added it in a bit of a hurry, but allow me to elaborate here.
Initially, I used the rxvt Cygwin terminal, but at some point the build failed with:
'cannot exec '/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe': Bad address'
That's basically all it told me. When Googling for the error, only two results pop up.
From
http://www.webdevrefinery.com/forums/topic/5442-nodejs/ :
gcc: installation problem, cannot exec '/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe': Bad address
The user found a solution himself:
Edit: Hmm, that's weird. I got that error when compiling in a Puttycyg terminal, but when I try it via a normal Windows command prompt, it seems to work
So I reverted back to the default Windows command prompt, re-did the build and everything went smoothly.
(Part of) my Cywin.bat:
#bash --login -i
set EDITOR=vi
set VISUAL=vi
set CYGWIN=codepage:oem tty binmode title
start rxvt -sr -sl 10000 -fg white -bg black -fn fixedsys -fb fixedsys -e /bin/bash --login -i
Re: GCC Cross-Compiler extra note
Posted: Mon Dec 13, 2010 5:41 am
by pcmattman
Have you tried reinstalling the gcc/binutils Cygwin packages? What version of GCC and binutils are you trying to build? It really seems like an environment or installation issue of some sort.
For the record, I've done the exact steps in that tutorial many, many times... it definitely works in both the stock Cygwin terminal and rxvt, and it works with the Cygwin sshd. And yes, it works wiht the Cygwin tools in PATH on the Windows 'cmd' terminal.
If reinstalling the compiler packages doesn't help however...
(Part of) my Cywin.bat
Try showing a bit more information. Also, both the 'codepage' and 'binmode' options are obsolete as of Cygwin 1.7.
Re: GCC Cross-Compiler extra note
Posted: Mon Dec 13, 2010 5:57 am
by Solar
@ thelamb:
It sounds as if your rxvt terminal does not source the environment correctly. So let's try to solve your terminal setup.
One thing I came across while using XMing as Windows/X11 server: The server does not forward changes to Windows environment variables to terminals opened under it, it requires a restart.
A good first hint is when your rxvt shows you a different command prompt from the default Cygwin bash. You can dump your environment using 'set'; assert that it is identical for both shells.
Re: GCC Cross-Compiler extra note
Posted: Mon Dec 13, 2010 4:45 pm
by thelamb
I see, in that case I apologize for my rushed decision to put it on the Wiki, rather than consulting here first. I was genuinely under the impression that is was a 'common' problem with other terminals.
This is the first time I had problems with rxvt though... I looked at the differences in set, but my untrained eye doesn't see anything notable that could case this.
$ diff cmd_set rxvt_set
0a1
> !::='::\'
4c5
< BASH=/usr/bin/bash
---
> BASH=/bin/bash
13a15,16
> COLORFGBG='15;default;0'
> COLORTERM=rxvt-xpm
19a23
> CYGWIN='codepage:oem tty binmode title'
22a27,28
> DISPLAY=:0
> EDITOR=vi
56c62
< PPID=1
---
> PPID=224
83c89
< TERM=dumb
---
> TERM=xterm
88a95
> VISUAL=vi
93,94c100,101
< _=/home/thelamb/.bashrc
< __COMPAT_LAYER=ElevateCreateProcess
---
> WINDOWID=14451872
> _=set
@pcmattman,
I (shamefully) admit that I copied the rxvt command in my Cygwin.bat off of a random, probably old, Google result without really understanding it.
I realize this is bad
, but I was eager to start working and the 80-char windows cmd just stressed me out.
Re: GCC Cross-Compiler extra note
Posted: Wed Dec 15, 2010 5:17 am
by Solar
Hm... I can't see anything obvious that could be blamed.
What's this?
Re: GCC Cross-Compiler extra note
Posted: Wed Dec 15, 2010 5:20 am
by pcmattman
Can you change that to a unified diff? They're a bit easier to read...
Re: GCC Cross-Compiler extra note
Posted: Wed Dec 15, 2010 6:10 am
by Solar
'>' means lines in the RXVT environment that aren't in the "normal" shell, '<' means lines that are missing in the RXVT environment. As these are one-liners, order does not matter.
His RXVT is missing these:
Code: Select all
BASH=/usr/bin/bash
PPID=1
TERM=dumb
_=/home/thelamb/.bashrc
__COMPAT_LAYER=ElevateCreateProcess
And defines these:
Code: Select all
!::='::\'
BASH=/bin/bash
COLORFGBG='15;default;0'
COLORTERM=rxvt-xpm
CYGWIN='codepage:oem tty binmode title'
DISPLAY=:0
EDITOR=vi
PPID=224
TERM=xterm
VISUAL=vi
WINDOWID=14451872
_=set