LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.1 errors in chapter 6 when building gcc in 6.17 (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-1-errors-in-chapter-6-when-building-gcc-in-6-17-a-4175443734/)

kevstev 01-01-2013 07:21 PM

LFS 7.1 errors in chapter 6 when building gcc in 6.17
 
I ran into some issues building gcc the second time around. Everything was going very smoothly. I had built gcc, ran the tests, which ran mostly clean aside from mudflap, but then it would not install, it said it could not find a library- unfortunately I am not sure which, as I figured i just made a mistake and forgot to run make install on one of gmp, mpfr, or mpc. I double checked my steps, and ran it again. Still issues. I went back and ran the tests on mpfr, and gmp, and everything was good. I ran them on mpc, and it could not find libmpfr. I did a little searching on the net, and tried to EXPORT LD_LIBRARY_PATH=/usr/lib:/usr/lib64. This made the tests pass. I didn't feel good about having to change that, but pressed on.

I tried to clean build gcc at this point, deleting the gcc-build dir and recreating it, then ran the configure script. That ran ok, but when building I got the following error:

checking for x86_64-unknown-linux-gnu-gcc... /sources/gcc-build/./gcc/xgcc -B/sources/gcc-build/./gcc/ -B/usr/x86_64-unknown-linux-gnu/bin/ -B/usr/x86_64-unknown-linux-gnu/lib/ -isystem /usr/x86_64-unknown-linux-gnu/include -isystem /usr/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile'

I tried to really back things up at this point and unset LD_LIBRARY_PATH, and now when I run the configure script for gcc, it sats the C compiler cannot create executables. What a mess.

I checked that /tools/bin/gcc is there and is version 4.7.1, /usr/bin/gcc is there and is reporting as version 4.6.3

not sure where I went wrong or how to proceed here. How can I fix this?

business_kid 01-02-2013 03:32 AM

If you're in chapter 6, you have the static, and are building the dynamic. Can you go back to the beginning of ch. 6? It's been so long since I did it I forget.

Go back and wipe anyhow, that's my advice. It's quicker in the long run. With LFS, it's quicker even in the short run.

kevstev 01-02-2013 10:19 AM

Quote:

Originally Posted by business_kid (Post 4861103)
If you're in chapter 6, you have the static, and are building the dynamic. Can you go back to the beginning of ch. 6? It's been so long since I did it I forget.

Go back and wipe anyhow, that's my advice. It's quicker in the long run. With LFS, it's quicker even in the short run.

I tried that. Did not work unfortunately. I guess I will give this another stab from the beginning, but make an archive after chapter 5 is completed, so I can always return to that state if need be. Up until this point, I was actually shocked at how smooth everything was going.

business_kid 01-02-2013 12:31 PM

I only had that happen once. I ran it down to the gcc in the host operating system, or at least the binutils/glibc/headers/gcc combination.


All times are GMT -5. The time now is 05:18 PM.