OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:43 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: GCC Cross-Compiler extra note
PostPosted: Mon Dec 13, 2010 4:22 am 
Offline

Joined: Sun Dec 12, 2010 2:09 pm
Posts: 6
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/ :
Quote:
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:
Quote:
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:
Quote:
#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


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Mon Dec 13, 2010 5:41 am 
Offline
Member
Member

Joined: Sun Jan 14, 2007 9:15 pm
Posts: 2566
Location: Sydney, Australia (I come from a land down under!)
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...
Quote:
(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.

_________________
Pedigree | GitHub | Twitter | LinkedIn


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Mon Dec 13, 2010 5:57 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
@ 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.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Mon Dec 13, 2010 4:45 pm 
Offline

Joined: Sun Dec 12, 2010 2:09 pm
Posts: 6
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.
Quote:
$ 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.


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Wed Dec 15, 2010 5:17 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
Hm... I can't see anything obvious that could be blamed.

Code:
> !::='::\'


What's this?

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Wed Dec 15, 2010 5:20 am 
Offline
Member
Member

Joined: Sun Jan 14, 2007 9:15 pm
Posts: 2566
Location: Sydney, Australia (I come from a land down under!)
Can you change that to a unified diff? They're a bit easier to read...

_________________
Pedigree | GitHub | Twitter | LinkedIn


Top
 Profile  
 
 Post subject: Re: GCC Cross-Compiler extra note
PostPosted: Wed Dec 15, 2010 6:10 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
'>' 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:
BASH=/usr/bin/bash
PPID=1
TERM=dumb
_=/home/thelamb/.bashrc
__COMPAT_LAYER=ElevateCreateProcess


And defines these:

Code:
!::='::\'
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

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group