Hi all,
having a bit of trouble building the cross-compiler on Cygwin. When I start building binutils, I get down to: "configuring in ./bfd", (checks...),
then "creating Makefile",
"creating doc/Makefile",
"creating bfd-in3.h",
"creating po/Makefile.in",
"creating config.h"
...
"executing libtool commands"
"executing bfd_stdint.h commands"
"executing default commands"
then I get the message "make: Entering an unknown directory"
then "make: *** empty string invalid as filename. Stop."
then "make: Leaving an unknown directory"
then "make: *** [all-libiberty] Error 2"
...
I'm not really up on these programs, nor the make process, being primarily a Windows developer. I've tried re-downloading everything, to no avail.
Versions: binutils = 2.22.51-1
gcc-core = 3.4.4-999
Any help would be greatly appreciated.
binutils (Cross-compiler) make issues
- JackScott
- Member
- Posts: 1032
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- GitHub: https://github.com/JackScottAU
- Contact:
Re: binutils (Cross-compiler) make issues
Hi, and welcome to the forum!
You're using a really old version of GCC (3.4.4, which is about a decade old). Try downloading the latest, which should be 4.6.1. When building 4.6.1, you'll need to make sure you have the build prerequisites installed (MPFR, MPC, etc). It's detailed on the wiki page.
Hope this helps! Let us know if you have any more luck (or any problems) building the latest GCC.
Edit: It's just been pointed out to me that your problem is with Binutils. Nevertheless, I recommend a later version of GCC. In addition, the latest version is 4.6.2, not 4.6.1.
You're using a really old version of GCC (3.4.4, which is about a decade old). Try downloading the latest, which should be 4.6.1. When building 4.6.1, you'll need to make sure you have the build prerequisites installed (MPFR, MPC, etc). It's detailed on the wiki page.
Hope this helps! Let us know if you have any more luck (or any problems) building the latest GCC.
Edit: It's just been pointed out to me that your problem is with Binutils. Nevertheless, I recommend a later version of GCC. In addition, the latest version is 4.6.2, not 4.6.1.
Re: binutils (Cross-compiler) make issues
In addition we recommend using the binutils source tarballs from http://ftp.gnu.org/gnu/binutils/. As far as I can see 2.22.51-1 is not officially released yet. There is a source download of this version available from the cygwin installer, but this likely has cygwin-specific changes which could mean it won't work as a cross compiler.
Regards,
John.
Regards,
John.
Re: binutils (Cross-compiler) make issues
That is rude. Nowhere in that page you would find anything related to his problem. And of course, he did mention the error he was getting in the hope that someone accustomed to the problem would give him some tips.berkus wrote:http://wiki.osdev.org/GCC_Cross-Compiler
RTFM, FAQ
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
- Combuster
- 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:
Re: binutils (Cross-compiler) make issues
jnc100 +1
You haven't followed the download instructions, have you? Why do I have the idea you're recompiling your cygwin host toolchain or posting their version numbers instead of what you are actually compiling?Versions: binutils = 2.22.51-1
gcc-core = 3.4.4-999
Re: binutils (Cross-compiler) make issues
The Cygwin source tarballs do break in an attempt to build a cross-compiler from them. That is why the cross-compiler tutorial says to download the sources from ftp.gnu.org.
As that was apparently not explicit enough, I added a line to that effect to the tutorial.
As that was apparently not explicit enough, I added a line to that effect to the tutorial.
Every good solution is obvious once you've found it.
-
- Posts: 3
- Joined: Sun Nov 06, 2011 3:16 pm
Re: binutils (Cross-compiler) make issues
Thanks a lot And I had assumed, obviously naively, that by downloading the most recent version of Cygwin, I would also get the most recent version of GCC and binutils which could run in the shell.
Apparently not; my apologies - I'm not generally the kind of person that posts stupid questions. As for following the wiki - nowhere did it say don't use the source from Cygwin. I'm not new to operating system concepts, nor programming, but I am new to working with Unix and Unix programs, and how they're ported and which versions for use on the Windows platform etc. it seemed simpler at the time to stick to the Cygwin source. I do notice with interest that this has now been added to the tutorial.
Thanks for the help though - and I will try to follow everything exactly next time.
Apparently not; my apologies - I'm not generally the kind of person that posts stupid questions. As for following the wiki - nowhere did it say don't use the source from Cygwin. I'm not new to operating system concepts, nor programming, but I am new to working with Unix and Unix programs, and how they're ported and which versions for use on the Windows platform etc. it seemed simpler at the time to stick to the Cygwin source. I do notice with interest that this has now been added to the tutorial.
Thanks for the help though - and I will try to follow everything exactly next time.
Re: binutils (Cross-compiler) make issues
It's the balance between saying everything that is necessary, and saying everything you could say on the subject, making the text bloated to the point where people don't read it anymore.
The text said "use the sources from ftp.gnu.org". It also points out that it works on Cygwin, and that the latest GCC version it was tested with is GCC 4.4.3. Now it also says "don't use the 3.4.4 sources from Cygwin"...
We had a similar extension before, where we explicitly had to make clear that binutils-2.20.0 is newer than binutils-2.9.0, never mind common sense, file dates or whatever.
Sometimes you need to be redundant in order to be failsafe. Even though the tutorial should be only half as much prose...
(No offense meant, TheAdminJr. Just venting a bit of frustration...)
The text said "use the sources from ftp.gnu.org". It also points out that it works on Cygwin, and that the latest GCC version it was tested with is GCC 4.4.3. Now it also says "don't use the 3.4.4 sources from Cygwin"...
We had a similar extension before, where we explicitly had to make clear that binutils-2.20.0 is newer than binutils-2.9.0, never mind common sense, file dates or whatever.
Sometimes you need to be redundant in order to be failsafe. Even though the tutorial should be only half as much prose...
(No offense meant, TheAdminJr. Just venting a bit of frustration...)
Every good solution is obvious once you've found it.
-
- Posts: 3
- Joined: Sun Nov 06, 2011 3:16 pm
Re: binutils (Cross-compiler) make issues
Well, even versions aside, having downloaded & extracted the tarballs from the archives, and using those, I still get exactly the same error.
Any other ideas on what the problem is?
Any other ideas on what the problem is?