It seems that the makefile is broken, because the libc.so.6 is assumed to be located in the /lib/ folder (note the preceding slash indicating an absolute path! ). This seems to be the issue.
Have you not considered that possibly the LIBPATH
is set and hard-coded to look for the /lib/libc.so.6
and therefore the /lib
path?
Have you tried to set the environment variable like this on the command line, prior to issuing make
when cross-compiling:
LIBPATH=/home/work/worldcom/filesys/lib
In your specific case, as you have mentioned in the tag 'cross-compiling', it might be worth it to remove any references to /lib
to wholly force the linker to look in your own home directory instead as not to interfere with the cross-compile process.
The other possibility is that the gcc compiler when it was built for your environment, the configuration during the building of the compiler from source, was specified to point to the /lib
path.
Hope this helps, Best regards, Tom.
Hi Lisha,
You didn't indicate what gcc version you are using, but if it is a recent enough one (4.0.0 and above me thinks) you should try the --with-sysroot flag to g++/ld. Point it to $SYSROOT as defined in your Makefile.
Assuming recent enough gcc version, it will work.
Hope this helps, Gilad
Correction: it's -sysroot, not --with-sysroot