Adding the .o path to the default ld (crtbeginS.o, not the .so files)
When using GCC to compile most things, I get this error:
/..//bin/ld: cannot find crtbeginS.o: No such file or directory
crtbeginS.o exists in / usr / local / lib / gcc / x 86_64-unknown-linux-gnu / 6.0.0 / crtbeginS.o (installed from GCC trunk, 6.0.0-trunk)
I added this directory to ldconfig and ran ldconfig, but it didn't pick up any additional directories. (I think since it is .o and not .so)
As a temporary fix, I tried to symlink to / usr / local / lib 64 / crtbeginS.o - but that gives the same error.
What should I do, so the / usr / local / lib / gcc / x86_64-unknown-linux-gnu / 6.0.0 / directory is always searched to find the library?
If I run gcc -print-search-dirs|grep "/usr/local/lib/gcc/x86_64-unknown-linux-gnu/6.0.0"
it shows the libraries: = / usr / local / lib / gcc / x86_64-unknown-linux-gnu / 6.0.0 /: ... But that is of course gcc not ld.
If I run ld --verbose | grep SEARCH_DIR
I see / usr / local / lib / gcc _x86_64-unknown-linux-gnu / 6.0.0 is NOT enabled.
I would really like to do this as a system default, so I don't have to give -L to everything. I am building bintools fine from source if needed.
source to share
No one has answered this question yet
Check out similar questions: