Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 13520  / 1 Year ago, sun, march 19, 2023, 1:28:10

How can I build an older gcc (specifically, 4.5.2) on Ubuntu 11.10 and avoid errors about "/usr/bin/ld: cannot find crti.o: No such file or directory"?



I've done a bit of digging and found several similar items, but none that actually resolve my issue:




  • I've verified all my packages (libc6-dev and the like) are re-installed per this question

  • I've verified crti.o exists in /usr/lib32 and /usr/lib/x86_64-linux-gnu, and that my ld.so.conf is configured to look in those directories

  • I've verified that prepending my make invocation with LIBRARY_PATH=/usr/lib/x86_64-linux-gnu works, but would like to avoid this (it becomes a diverging point in makefiles)

  • I've tried various things with --with-build-sysroot, but with no success (read: maybe I just don't know the right flag to set)

  • When running with strace (as per this answer), I can see the bare reference to crti.o:



    13240 open("crti.o", O_RDONLY) = -1 ENOENT (No such file or directory)




Thanks!


More From » 11.10

 Answers
1

I had the same problem. Making symbolic links from /usr/libs/crt?.o to /usr/lib/x86_64-linux-gnu/crt?.o solved the problem for me.


[#42327] Monday, March 20, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
olfdit

Total Points: 118
Total Questions: 98
Total Answers: 97

Location: Honduras
Member since Fri, Nov 25, 2022
1 Year ago
;