LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS-7.3: 6.17 Gcc-4.7.2, ld cannot find crti.o? (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-3-6-17-gcc-4-7-2-ld-cannot-find-crti-o-4175452750/)

McZ 03-05-2013 01:43 AM

LFS-7.3: 6.17 Gcc-4.7.2, ld cannot find crti.o?
 
I am updating my scripts for LFS-7.3 and I am building using LFS-7.2 as host.

Anyway, Gcc 4.7.2 in chapter 6.17 is failing, ld can't find crti.o even though the toolchain test works and crt*.o is in /usr/lib/ (and /tools/lib) and all packages before GCC (and after adjusting toolchain) works, so why can't gcc find crti.o?

Running the toolchain tests after GCC failed will still work as intended.

druuna 03-05-2013 02:02 AM

Can you post which step and the errors it produces (incl. 5 to 10 lines before the error)?

McZ 03-05-2013 02:20 AM

Quote:

Originally Posted by druuna (Post 4904889)
Can you post which step and the errors it produces (incl. 5 to 10 lines before the error)?

http://i.imgur.com/37r0T0T.png

I hope a screenshot will do, and ignore that the VM is named LFS-7.1 it has been upgraded to 7.2 but not the name of the machine.

AFAIK the script is failing on make after configure

EDIT: imgur is overloaded.. new link http://img404.imageshack.us/img404/3...dcrtierror.png and toolchain test script output http://img835.imageshack.us/img835/3...lchaintest.png

druuna 03-05-2013 02:39 AM

If you use scripts to install, this might be a bit harder to troubleshoot.

Did you have any problems with 6.10. Adjusting the Toolchain, especially this step:
Code:

grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log

 If everything is working correctly, there should be no errors, and the output of the last command will be:
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded

To find out if this is a scripting problem or not you could try doing these steps (and leading up to gcc) manually.

EDIT: McZ edited his post while I was replying.

McZ 03-05-2013 04:05 AM

Quote:

Originally Posted by druuna (Post 4904912)
If you use scripts to install, this might be a bit harder to troubleshoot.

Did you have any problems with 6.10. Adjusting the Toolchain, especially this step:
Code:

grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log

 If everything is working correctly, there should be no errors, and the output of the last command will be:
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded

To find out if this is a scripting problem or not you could try doing these steps (and leading up to gcc) manually.

EDIT: McZ edited his post while I was replying.

I tried building gcc manually in my chroot environment but it still fails, and it fail on make. I don't understand why it fails when other packages before can be compiled.

druuna 03-05-2013 04:38 AM

LFS 7.3 is rather new and although people have build it successfully (me included), it is not at a point that I would say it is 100% stable (also based on post on the mailing list) and first errata is already present).

On the other hand is the use of scripts to automate the build, which could also be the culprit.

If it where up to me I would restart chapter 6 and do it by hand to make sure the steps work (or not). If they do work then the error must be in the script(s).

McZ 03-05-2013 06:04 AM

Quote:

Originally Posted by druuna (Post 4904966)
LFS 7.3 is rather new and although people have build it successfully (me included), it is not at a point that I would say it is 100% stable (also based on post on the mailing list) and first errata is already present).

On the other hand is the use of scripts to automate the build, which could also be the culprit.

If it where up to me I would restart chapter 6 and do it by hand to make sure the steps work (or not). If they do work then the error must be in the script(s).

I have solved the problem. I am building using x86_64 host and due to earlier problems I am forcing libraries into /usr/lib64 with --libdir=/usr/lib64 the problem was that my script to create all directories for some unknown reason bugged on me and didn't create /usr/lib thus /usr/lib/../lib64/crti.o cannot be found.

Not exactly easy to find since I'm not following the book due too my extra --libdir switch.


All times are GMT -5. The time now is 05:50 AM.