How to build gcc 3.x on a SuSE 7.3 sparc system?
I have a problem with building gcc 3.x on a SuSE 7.3 sparc system. I have not recieved any useful answers after asking on the suse-sparc list what the problem could be, so now I try here: Each time I try building gcc 3.x I get different errors for differing minor versions. All of the errors indicate that there is a problem with the glibc not being compatible. Here is an example where I have tried building gcc 3.2.2: # cd gcc-3.2.2/ # mkdir objdir # cd objdir # ../configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ # make -j4 > ~/make_output 2>&1 & Here is the last output from the make process: /usr/bin/ld: cannot find /lib/libc.so.6 collect2: ld returned 1 exit status make[2]: *** [libgcc_s.so] Error 1 make[2]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/home/david/packages/gcc-3.2.2/objdir/gcc' make[2]: Leaving directory `/home/david/packages/gcc-3.2.2/objdir/gcc' make[1]: *** [stmp-multilib] Error 2 make[1]: Leaving directory `/home/david/packages/gcc-3.2.2/objdir/gcc' make: *** [all-gcc] Error 2 Here is what my libc.so.6 looks like: david@sol:~> ls -l /lib/libc.so.6 -rwxr-xr-x 1 root root 1537287 Oct 4 2002 /lib/libc.so.6 Best regards, David List
On Sunday 25 May 2003 11:38, David List wrote:
# cd gcc-3.2.2/ # mkdir objdir # cd objdir # ../configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ # make -j4 > ~/make_output 2>&1 &
First, gcc should not be built from inside the source directory, not even a subdirectory to the sourcedir. Try building from a directory parallel to gcc-3.2.2 # cd gcc-3.2.2 # cd .. # mkdir objdir # cd objdir # ../gcc-3.2.2/configure --enable-threads=posix --enable-languages=c,c++ # make -j4 bootstrap 2>&1 | tee ~/make_output The linker error seems strange, perhaps there is some interesting information to be gathered from your configure process? -- Ch
On Sun, 25 May 2003, Christian Andersson wrote:
On Sunday 25 May 2003 11:38, David List wrote:
# cd gcc-3.2.2/ # mkdir objdir # cd objdir # ../configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ # make -j4 > ~/make_output 2>&1 &
First, gcc should not be built from inside the source directory, not even a subdirectory to the sourcedir. Try building from a directory parallel to gcc-3.2.2 ...<snip>...
I will try that and return with more information.
The linker error seems strange, perhaps there is some interesting information to be gathered from your configure process?
All right, I will redirect the 'configure' output to a file. It's a bit too much to post here, I believe, but I can put that file on my webserver and point to it in my next post. Thank you for your answer. Best regards, David List
On Sun, 25 May 2003, Christian Andersson wrote:
On Sunday 25 May 2003 11:38, David List wrote:
# cd gcc-3.2.2/ # mkdir objdir # cd objdir # ../configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ # make -j4 > ~/make_output 2>&1 &
First, gcc should not be built from inside the source directory, not even a subdirectory to the sourcedir. Try building from a directory parallel to gcc-3.2.2
# cd gcc-3.2.2 # cd .. # mkdir objdir # cd objdir # ../gcc-3.2.2/configure --enable-threads=posix --enable-languages=c,c++ # make -j4 bootstrap 2>&1 | tee ~/make_output
Now I did: # cd ~/packages # tar -xvzf gcc-3.2.2.tar.gz # mkdir objdir # cd objdir # ../gcc-3.2.2/configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ > ~/configure_output 2>&1 & # make -j4 > ~/make_output 2>&1 & I will try the 'bootstrap' make option now and return again.
The linker error seems strange, perhaps there is some interesting information to be gathered from your configure process?
I have put the configure output here: http://www.davidlist.dk/configure_output I have put the make output here: http://www.davidlist.dk/make_output Best regards, David List
On Sunday 25 May 2003 15:12, David List wrote:
# cd ~/packages # tar -xvzf gcc-3.2.2.tar.gz # mkdir objdir # cd objdir # ../gcc-3.2.2/configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ > ~/configure_output 2>&1 & # make -j4 > ~/make_output 2>&1 &
I will try the 'bootstrap' make option now and return again.
Seems like you libc is not compatible with the new compiler. What is your default version of gcc? 2.95.3? This text might be interesting: (http://gcc.gnu.org/install/specific.html) sparc-*-linux* GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4 or newer on this platform. All earlier binutils and glibc releases mishandled unaligned relocations on sparc-*-* targets. Furthermore, I'd suggest that you first simplify things by omitting the C++ target. You can build that later when the C compiler works. -- Ch
On Sun, 25 May 2003, Christian Andersson wrote:
On Sunday 25 May 2003 15:12, David List wrote:
# cd ~/packages # tar -xvzf gcc-3.2.2.tar.gz # mkdir objdir # cd objdir # ../gcc-3.2.2/configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ > ~/configure_output 2>&1 & # make -j4 > ~/make_output 2>&1 &
I will try the 'bootstrap' make option now and return again.
Seems like you libc is not compatible with the new compiler. What is your default version of gcc? 2.95.3?
Yes.
This text might be interesting: (http://gcc.gnu.org/install/specific.html)
sparc-*-linux* GCC versions 3.0 and higher require binutils 2.11.2 and glibc 2.2.4 or newer on this platform. All earlier binutils and glibc releases mishandled unaligned relocations on sparc-*-* targets.
glibc is the default SuSE Linux 7.3 version: 2.2.4-20. binutils is the default SuSE Linux 7.3 version: 2.11.90.0.29-14
Furthermore, I'd suggest that you first simplify things by omitting the C++ target. You can build that later when the C compiler works.
I'll try that. Best regards, David List
On Sun, 25 May 2003, Christian Andersson wrote: ...<snip>...
# make -j4 bootstrap 2>&1 | tee ~/make_output ...<snip>...
I tried the 'bootstrap' make option now. Same result. You suggested that I look into the configure output in your earlier posting. I don't see anything I *really* suspect, but then again, I may not know what to look for. I have replaced the latest outputs on my web server. They are here: configure output: http://www.davidlist.dk/configure_output make output: http://www.davidlist.dk/make_output I accidently mailed my last posting directly to you and cc'ed it to the list. That was not my intention, of course. Sorry. Best regards, David List
On Sunday 25 May 2003 16:15, David List wrote:
I tried the 'bootstrap' make option now. Same result. You suggested that I look into the configure output in your earlier posting. I don't see anything I *really* suspect, but then again, I may not know what to look for.
Ok, I didn't really suspect this bootstrap parameter would help, really. Issuing it is just a kind of common practice, making the build process first to make a basic (not BASIC) compiler, which is then used to make a final version. I do not see anything strange in your configure output either. Still, however, your libc seems to be uncompatible with the build of the compiler. Could it be that glibc is built for another target than sparc64-unknown-linux-gnu? Your /usr partition should have a subdirectory sparc-???-???-linux-??? something. Try to give the name of that directory to the configure script of gcc, like this: # ../gcc-3.2.2/configure --target=sparc-???-??? --enable... and so on -- Ch
On Sun, 25 May 2003, Christian Andersson wrote: ...<snip>...
Ok, I didn't really suspect this bootstrap parameter would help, really. Issuing it is just a kind of common practice, making the build process first to make a basic (not BASIC) compiler, which is then used to make a final version.
I'm aware of that. I hadn't used it and didn't much expect it to make any difference, since - as far as I know - you use this option for when you basically hasn't got any compiler on the system already. The compiler I have on the system right now *does* work with anything else...
I do not see anything strange in your configure output either. Still, however, your libc seems to be uncompatible with the build of the compiler. Could it be that glibc is built for another target than sparc64-unknown-linux-gnu? Your /usr partition should have a subdirectory sparc-???-???-linux-??? something. Try to give the name of that directory to the configure script of gcc, like this:
# ../gcc-3.2.2/configure --target=sparc-???-??? --enable... and so on
I'll look into that. Best regards, David List
On Sun, 25 May 2003, David List wrote:
On Sun, 25 May 2003, Christian Andersson wrote:
...<snip>...
Ok, I didn't really suspect this bootstrap parameter would help, really. Issuing it is just a kind of common practice, making the build process first to make a basic (not BASIC) compiler, which is then used to make a final version.
I'm aware of that. I hadn't used it and didn't much expect it to make any difference, since - as far as I know - you use this option for when you basically hasn't got any compiler on the system already. The compiler I have on the system right now *does* work with anything else...
I do not see anything strange in your configure output either. Still, however, your libc seems to be uncompatible with the build of the compiler. Could it be that glibc is built for another target than sparc64-unknown-linux-gnu? Your /usr partition should have a subdirectory sparc-???-???-linux-??? something. Try to give the name of that directory to the configure script of gcc, like this:
# ../gcc-3.2.2/configure --target=sparc-???-??? --enable... and so on
I'll look into that.
I have a /usr/sparc-suse-linux directory and I tried with both --target=sparc-suse-linux and --target=sparc64-unknown-linux-gnu They both delivered the same result when I ran make. Best regards, David List
participants (2)
-
Christian Andersson
-
David List