*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I installed gmake on a freebsd machine. but when I run gmake, I get the error
/libexec/ld-elf.so.1: Shared object "libc.so.6" not found, required by "gmake"
I can see that libc.so.6 is under /usr/compat/linux/lib. I put /usr/compat/linux/lib in the path. I even created a link under /libexec to libc.so.6. but I still get this error. What needs to be done?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
I could be wrong, but if it's a library shouldn't it be added to /etc/ld.so.conf and rerun ldconfig? The file ld.so.conf and command ldconfig might be in the compat linux tree somewhere. <-- wild guess.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Try
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":/usr/compat/linux/lib
before running gmake. Or add /usr/compat/linux/lib to /etc/ld.so.conf (or how is it called in FreeBSD?) and run ldconfig.
Does ldconfig manual page mention any file with similar name? If yes, you are supposed to edit mentioned file, or use LD_LIBRARY_PATH solution.
There are several scripts that run gmake and I dont want to add a LD_LIBRARY_PATH to everyone of them. lets keep that as the last resort.
As suggested by chort, I found the file under /usr/compat/linux/etc. I have created a new one under /etc and added /usr/compat/linux/lib to it.
How do I "run ldconfig"? I just issued ldconfig at the prompt but nothing happened. I am still getting a error when I run gmake but a different one ...
/libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined symbol "__mb_cur_max"
BTW, my /etc/ld.so.conf file looks like this. Is this right?
/usr/compat is for binary compatibility, which isn't necessary for gmake because it should be compiled natively for FreeBSD (if you built it through Ports or from source). For info on what dynamic libraries are required for a binary, use the ldd command:
Basically, I don't think this should have anything to do with Linux compatibility. What does your ldd output look like? What (specifically) kind of error messages are you getting?
What's the output of `ldconfig -r`? Also, check to see what's in /lib (because libc.so.6 should be in there). I guess I should also ask (1) exactly what version of FreeBSD are you using, and (2) how did you install gmake?
ldconfig -r | grep libc.so.6
25:-lc.6 => /lib/libc.so.6
it seems to show that the libc.so.6 exists under /lib but there was no such file. So, I copied libc.so.6 and ld-linux.so.2 to /lib from /usr/compat/linux/lib.
Now, gmake gives a different error
/libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined symbol "__mb_cur_max"
^ well, I went to the freebsd website and searched for gmake in their ports collection. It listed the gmake port. I downloaded the package and used pkg_add -v to add it. It also needed two other packages which I also installed gettext-0.14.5_2 and libiconv-1.9.2_2. Maybe the required packages are causing the problem? The error is saying something about libiconv...
Why not remove those three packages (with pkg_delete) and then do
"pkg_add -r -v gmake"
Which will automatically fetch the right version with depends and install them. It rarely gets things wrong and is a lot easier than downloading them manually.
Why not remove those three packages (with pkg_delete) and then do
"pkg_add -r -v gmake"
Which will automatically fetch the right version with depends and install them. It rarely gets things wrong and is a lot easier than downloading them manually.
I did exactly like you suggested and now it works! Thanks a million !!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.