LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-02-2007, 11:59 AM   #1
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Rep: Reputation: 0
Error running gmake


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?

thanks
 
Old 01-02-2007, 12:11 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 01-02-2007, 12:19 PM   #3
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
^ oh! Sorry, I did not know that. Thanks. I am looking up the man page for ldconfig. Thanks again!
 
Old 01-02-2007, 12:21 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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.
 
Old 01-02-2007, 12:32 PM   #5
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
Well, there is no file called /etc/ld.so.conf. Am I supposed to create a new file?
 
Old 01-02-2007, 12:50 PM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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.
 
Old 01-02-2007, 01:43 PM   #7
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by raskin
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/X11R6/lib
/usr/local/lib
/usr/compat/linux/lib
 
Old 01-02-2007, 01:51 PM   #8
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
/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:
Code:
[ taylor @ zeltennia ] : ~ > ldd /usr/local/bin/gmake
/usr/local/bin/gmake:
        libintl.so.6 => /usr/local/lib/libintl.so.6 (0x28096000)
        libc.so.6 => /lib/libc.so.6 (0x280a0000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28186000)
[ taylor @ zeltennia ] : ~ > ls /lib | grep libc
-r--r--r--  1 root  wheel   932840 Jun 23 18:31:01 2006 libc.so.6
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?
 
Old 01-02-2007, 02:01 PM   #9
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
I get this for ldd

ldd /usr/local/bin/gmake
/usr/local/bin/gmake:
libintl.so.6 => /usr/local/lib/libintl.so.6 (0x28097000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x280a0000)
libc.so.6 => not found (0x0)
 
Old 01-02-2007, 04:18 PM   #10
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
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?
 
Old 01-02-2007, 05:06 PM   #11
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
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"

I am using freebsd version 5.5

I installed a gmake package gmake-3.81_1.tbz
 
Old 01-02-2007, 05:47 PM   #12
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
You can't use Linux libraries with FreeBSD binaries.

How did you install the package? Did you use any flags? Did you get any errors/warnings?
 
Old 01-02-2007, 05:57 PM   #13
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
^ 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...
 
Old 01-02-2007, 06:22 PM   #14
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Was the package you downloaded for 5.5?

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.
 
Old 01-03-2007, 01:18 PM   #15
emperor_black
LQ Newbie
 
Registered: Sep 2005
Location: Milpitas, CA
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by frob23
Was the package you downloaded for 5.5?

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 !!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gmake error or gcc old version......??? pravinth Linux - Newbie 2 11-23-2006 10:43 AM
Eclipse C/C++ gmake problem netjack Linux - Software 1 05-02-2006 11:26 PM
gmake or make question neocontrol Linux - Newbie 2 03-29-2006 11:36 PM
gmake error in postgres instalation umala SUSE / openSUSE 1 04-08-2005 09:18 AM
Running gmake on Mandrake Nhlapoth Programming 0 05-17-2004 03:23 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration