Cross Compiler problem

Programming, for all ages and all languages.
Post Reply
User avatar
Candamir
Posts: 4
Joined: Sun Jun 18, 2006 6:33 pm
Location: Mexico City / Switzerland

Cross Compiler problem

Post by Candamir »

I knew it was no good idea to reinstall Cygwin... :?

As i was exactly following the instructions in the tutorial (downloaded latest versions of binutils and gcc-core), in the step 'make all' of bootstrapping binutils, this was the output:

Code: Select all

make[1]: Entering directory '/usr/src/build-binutils'
mkdir --p -- ./libiberty
Configuring in ./libiberty
Configure: error: invalid feature name: nls
make[1]: *** [configure-libiberty] Error 1
make[1]: Leaving directory '/usr/src/build-binutils'
make: *** [all] Error 2
As for the nls, I did use --disable-nls in the configure process. Googling for 'invalid feature name nls make' didn't help, either.

Thanks for your help

Candamir
A problem shows itself worth the fight when it fights back.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Are you sure you obtained these sources from the PROPER location? via official mirrors not the "Cygwin" modified sources.

http://ftp.gnu.org/gnu/binutils/
http://ftp.gnu.org/gnu/gcc/

I'm positive you'll find the right archives above lol 8)

(Also, Post your complete ./configure command next time as it's not possible to us to read minds..)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Candamir
Posts: 4
Joined: Sun Jun 18, 2006 6:33 pm
Location: Mexico City / Switzerland

Post by Candamir »

Sorry, but I did get my archives from the GNU website:

http://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2
http://ftp.gnu.org/gnu/gcc/gcc-4.2.0/gc ... .0.tar.bz2

Is there a chance the procedure doesn't work with this versions? (GCC 4.2.0 isn't mentioned in the Wiki, I did, however, get binutils 2.17 which is mentioned in the wiki and was stuck at bootstrapping binutils, not gcc).
(Also, Post your complete ./configure command next time as it's not possible to us to read minds..)
Sorry; here it is (the one from the Wiki, which is the one I used):

Code: Select all

../binutils-2.17/configure --target=$TARGET --prefix=$PREFIX --disable-nls
Thanks

Candamir

Edit: I have now tried a few things... I installed bison, flex and byacc because I remember that I had them too on my old installation... I tried setting the target to i386-elf and i486-elf instead of i586-elf... but the error message is always the same... I also took a look at the configure output, and there it stated that it needed a program called cmp but didn't find it and cmp wasn't on the package list in setup.exe... :?
A problem shows itself worth the fight when it fights back.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Candamir wrote:I also took a look at the configure output, and there it stated that it needed a program called cmp but didn't find it and cmp wasn't on the package list in setup.exe... :?
It's supposedly part of the rootkit. A default cygwin install should provide it. Installing again cleanly from a different mirror might solve that (it fixed my install a few times already :shock:)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Hi,

You're not the only one - I have tried the build with 4.2.0 and have exactly the same problems. Having said that, the same happens with 4.1.2. If I follow the instructions with Damn Small Linux running in Virtual PC, no problems - but I am much more familiar with Windows for devving.

[verypolitetone]
A few days/weeks ago, someone kindly posted a zipped version of their cleanly-built "/usr/cross" directory which worked very well for me. If anyone wanted to do that for a version including g++ too, that would be extremely nice of them... :D

Cheers,
Adam
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

AJ wrote:A few days/weeks ago, someone kindly posted a zipped version of their cleanly-built "/usr/cross" directory
I posted a cygwin hosted cross compiler targeting i586-elf, based upon gcc 4.1.2 and binutils 2.17. Its available here but I'd really appreciate it if someone mirrored it somewhere with a better bandwidth as at the moment its just running off my server sitting next to me with a rather slow upstream. The page above has one known problem (+ fix) with the package - if anyone else finds other problems please let me know.
AJ wrote:If anyone wanted to do that for a version including g++ too, that would be extremely nice of them...
Might do, if I get a chance. I don't use c++ for my os, so didn't bother, and at the time I created the last archive it was in response to a request for a small download for someone who had a dial-up connection, so I tried to keep it as small as possible.

Regards,
John.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

GNU 4.1.2 C++ cross compiler running on Windows available here. Again, if anyone could mirror these I'd be grateful. Note that I haven't tested the C++ compiler in this package, except by running the --version command, which seems to work. The C compiler is also included and seems to work okay at compiling my kernel.

Regards,
John.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Fantastic, thank you!

If I find somewhere to host these files, are you happy for me to distribute them for others?

Cheers,
Adam
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

AJ wrote:If I find somewhere to host these files, are you happy for me to distribute them for others?
Of course, please could you test them first though. They're under the GPL after all.

Regards,
John.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

OK.

So far I have compiled a few elf test binaries and my kernel's exe loader seems to load them fine. I'll do a few more tests then scratch around for some bandwidth :)

I'm currently a very happy bloke!

Cheers,
Adam
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

@Candamir
When you reinstalled cygwin did you set the mode to text? It must be set to binary in order to build gcc and binutils.
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

User avatar
Candamir
Posts: 4
Joined: Sun Jun 18, 2006 6:33 pm
Location: Mexico City / Switzerland

Post by Candamir »

Thank you all, I could solve my problem. The problem was (as frank pointed out) that my Cygwin was running in text mode and I had to run setup.exe again in order to enable binary / UNIX mode.

Thanks

Candamir

Edit: Maybe this would be worthy for the wiki article, but I haven't yet been approved as an editor, so I'll do it when my application gets through or maybe someone else would do it?
A problem shows itself worth the fight when it fights back.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Candamir wrote:Edit: Maybe this would be worthy for the wiki article, but I haven't yet been approved as an editor, so I'll do it when my application gets through or maybe someone else would do it?
chase wrote:I've opened up the wiki editing to any registered forum member.
I added a note here, but you should have had the required access already :?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Hi,

For anyone who is interested, as I was, a link to the crosscompiler provided by jnc100 is now in my sig. I switched it to zip format. Much as I think anyone owning Windows should have 7 zip (which provides much better compression), I did it so that anyone using XP+ can just open the folder directly.

Cheers,
Adam
Post Reply