compiler looking for libgmp.so.10?

Asked by Edward G. Schaub

In an attempt to install the linux driver for a D-LINK DWA-140 wireless adapter, I get the following errors during the make

root@eddies-HP:/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0# make
make -C tools
make[1]: Entering directory `/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0/tools'
gcc -g bin2h.c -o bin2h
/usr/lib/gcc/i686-linux-gnu/4.4.5/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0/tools'
make: *** [build_tools] Error 2

I have run into this problem before. As far as the build-essential, it won't work, since I installed Ubuntu 10.10 off of a burned CD I built from the web site download. Why did it not install this library and where in the world do I get this library?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

lsb_release -a; uname -a

Thanks

Revision history for this message
Edward G. Schaub (egschaub) said :
#2

Here you go

root@eddies-HP:/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick
root@eddies-HP:/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0# uname -a
Linux eddies-HP 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux
root@eddies-HP:/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0#

It indicates no modules are available?

Revision history for this message
Luky Winarto (luckyborneo) said :
#3

Hello Edward G. Schaub,

Would you mind give us the output of this command:
ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1

Thank you...

Revision history for this message
Edward G. Schaub (egschaub) said :
#4

Here it is

root@eddies-HP:~# ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1
 linux-gate.so.1 => (0x006c6000)
 libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00904000)
 libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00d61000)
 libdl.so.2 => /lib/libdl.so.2 (0x00500000)
 libc.so.6 => /lib/libc.so.6 (0x00bce000)
 /lib/ld-linux.so.2 (0x00321000)
 libgmp.so.10 => not found

Revision history for this message
Luky Winarto (luckyborneo) said :
#5

Seems ligmp.so.10 is not there. Hmmm...
Run this command please:
sudo ldconfig -v

then run again:
ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1

Let's see the result....

Revision history for this message
Edward G. Schaub (egschaub) said :
#6

I had to run the ldconfig command twice since the output exceeded the
screen buffer. The second time I piped the output to a file. Here's
how I did it

root@eddies-HP:~# ldconfig -v > ldconfig.out
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or
directory
/sbin/ldconfig.real: Can't stat /lib64: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib64: No such file or directory

the output of the ldconfiig file, ldconfig.out is in
http://pastebin.ubuntu.com/608950/.

I then ran the ldd command

root@eddies-HP:~# ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1
     linux-gate.so.1 => (0x00dc2000)
     libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00455000)
     libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00767000)
     libdl.so.2 => /lib/libdl.so.2 (0x00530000)
     libc.so.6 => /lib/libc.so.6 (0x005ab000)
     /lib/ld-linux.so.2 (0x00c6b000)
     libgmp.so.10 => not found

 From ldconfig command, it looks like the libraries are in the wrong
place. If I do a find command, I get

root@eddies-HP:/# find . -name lib64
./usr/src/linux-headers-2.6.35-22/arch/sh/lib64

or find on i686-linux-gnu I get

root@eddies-HP:/# find . -name i686-linux-gnu
./usr/lib/i686-linux-gnu
./usr/lib/gcc/i686-linux-gnu
./usr/include/c++/4.4/i686-linux-gnu

I or the installation apparently put them in the wrong place? What's the
best way to fix this? and will this take care of the compiler error of
not being able to find libgmp.so.10?
Thanks,
Ed

On 5/16/2011 10:41 PM, Luky Winarto wrote:
> Your question #157810 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/157810
>
> Status: Open => Answered
>
> Luky Winarto proposed the following answer:
> Seems ligmp.so.10 is not there. Hmmm...
> Run this command please:
> sudo ldconfig -v
>
> then run again:
> ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1
>
> Let's see the result....
>

Revision history for this message
Edward G. Schaub (egschaub) said :
#7

I had to run the ldconfig command twice since the output exceeded the screen buffer. The second time I piped the output to a file. Here's how I did it

root@eddies-HP:~# ldconfig -v > ldconfig.out
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /lib64: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib64: No such file or directory

the output of the ldconfiig file, ldconfig.out is in http://pastebin.ubuntu.com/608950/.

I then ran the ldd command

root@eddies-HP:~# ldd /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1
    linux-gate.so.1 => (0x00dc2000)
    libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00455000)
    libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00767000)
    libdl.so.2 => /lib/libdl.so.2 (0x00530000)
    libc.so.6 => /lib/libc.so.6 (0x005ab000)
    /lib/ld-linux.so.2 (0x00c6b000)
    libgmp.so.10 => not found

From ldconfig command, it looks like the libraries are in the wrong place. If I do a find command, I get

root@eddies-HP:/# find . -name lib64
./usr/src/linux-headers-2.6.35-22/arch/sh/lib64

or find on i686-linux-gnu I get

root@eddies-HP:/# find . -name i686-linux-gnu
./usr/lib/i686-linux-gnu
./usr/lib/gcc/i686-linux-gnu
./usr/include/c++/4.4/i686-linux-gnu

I or the installation apparently put them in the wrong place? What's the best way to fix this? and will this take care of the compiler error of not being able to find libgmp.so.10?
Thanks,
Ed

Revision history for this message
Edward G. Schaub (egschaub) said :
#8

I apologize for posting twice. I couldn't recall the nuances of launchpad and sent a reply here and via my e-mail. Read #7, since it has the link and not just the text.

Also, this may help. Here's what I get when I inquire on the version of gcc loaded

root@eddies-HP:/dwa140_revB_linux_drivers_2130/2010_0413_RT3070_Linux_STA_v2.1.3.0# gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

Ed

Revision history for this message
Luky Winarto (luckyborneo) said :
#9

Hmmm... I'm curious, did you already install package named libgmp3-dev?
sudo apt-get install libgmp3-dev

Try to install that package...

Revision history for this message
Edward G. Schaub (egschaub) said :
#10

I apparently hadn't

root@eddies-HP:/# apt-get install libgmp3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgmp3-dev

I'll download it from the
http://packages.ubuntu.com/maverick/i386/libgmp3-dev/download site and
install it. I'll let you know what happens.
Ed

On 5/17/2011 9:35 AM, Luky Winarto wrote:
> Your question #157810 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/157810
>
> Status: Open => Answered
>
> Luky Winarto proposed the following answer:
> Hmmm... I'm curious, did you already install package named libgmp3-dev?
> sudo apt-get install libgmp3-dev
>
> Try to install that package...
>

Revision history for this message
Edward G. Schaub (egschaub) said :
#11

Alright, installed libgmp3-dev, which also required I install
libgmpxx4ldbl. I still get the same error when I run make, looking for
libgmp.so.10. The only difference I notice after running through the
commands you have given me is that the output of the 'ldconfig -v'
command adds the following line in the output

         libgmpxx.so.4 -> libgmpxx.so.4.1.2

Ed

On 5/17/2011 9:35 AM, Luky Winarto wrote:
> Your question #157810 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/157810
>
> Status: Open => Answered
>
> Luky Winarto proposed the following answer:
> Hmmm... I'm curious, did you already install package named libgmp3-dev?
> sudo apt-get install libgmp3-dev
>
> Try to install that package...
>

Revision history for this message
Edward G. Schaub (egschaub) said :
#12

So, I have everyone stumped? Unintentional, believe me. This is the 2nd WUSB I've been trying to get Ubuntu to recognize without any success. Yes, I've gone through all their instructions. I hate to say it, I'm apparently stuck with Windows. Argh!

Revision history for this message
Luky Winarto (luckyborneo) said :
#13

Hi Edward G. Schaub,

Let's do the trick again.
Grab gmp from the source:
wget ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.gz

Untar it:
tar zxvf gmp-5.0.2.tar.gz

Install it:
cd gmp-5.0.2
./configure
make
make check
sudo make install

Your libgmp.so.10 will be installed on /usr/local/lib

If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

Revision history for this message
Edward G. Schaub (egschaub) said :
#14

Unfortunately, I ran into this problem when I tried to install
gmp-5.0.1.tar.gz

root@eddies-HP:/gmp/gmp-5.0.2# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... no
checking compiler icc -no-gcc ... no
checking compiler cc -O ... no
configure: error: could not find a working compiler, see config.log for
details

look at this thread,
https://answers.launchpad.net/ubuntu/+source/apt/+question/147394, and
you will see I had the same problem trying to install gcc. I'm going to
take the following steps

   1. Remove Ubuntu 10.10
         1. Do this by going into windows and removing disc partition
            where Ubuntu is located at.
               1. Doing this will insure everything I've tried with
                  installing gcc is removed.
   2. Re-install Ubuntu from the burn disc I created.
         1. I would like to run it under 64 bit. I would like to take
            advantage of the increased memory since I'm doing all of
            this to run opensource CFD software like
            http://www.openfoam.com/.
               1. I've made comparisons before between 32 bit and 64 bit
                  running commercial codes. The mesh size is
                  significantly larger with 64 bit.
   3. Go through the ./configure you just gave me.

If this doesn't work, I'm at a complete loss at how to get Ubuntu to
recognize any WUSB I give it and or to use a working compiler. I'm
either going to have to find a version of linux that will recognize my
WUSB's

   1. D-Link DWA-140
   2. Netgear WNA 1100
   3. D-Link DWA-130

or I'll have to go to the windows version of this opensource software.
I would like to get things running under linux, but I'm running out of
options.

Ed

On 5/18/2011 5:50 PM, Luky Winarto wrote:
> Luky Winarto proposed the following answer:
> Hi Edward G. Schaub,
>
> Let's do the trick again.
> Grab gmp from the source:
> wgetftp://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.gz

Revision history for this message
Edward G. Schaub (egschaub) said :
#15

Luky,
Got it working.

If you read the thread I pointed too, all the corruption I had done to gcc in trying to get the gcc compiler to work on openfoam without internet access had caused the problem. I re-installed Ubuntu 10.10 64 bit. Ran the DWA-140 installation and only got a few errors with gcc on compiling the RT3070 driver, which wasn't need. Plugged in the DWA-140 and it works! If I have to modify any of the openfoam functions, I'm still may need to add several options to gcc. I'll cross that bridge when I come to it. Thanks for your help.
Ed

Revision history for this message
Luky Winarto (luckyborneo) said :
#16

I'm glad that your problem is solve.
Feel free to ask more about Ubuntu.

--Luky

Revision history for this message
Launchpad Janitor (janitor) said :
#17

This question was expired because it remained in the 'Open' state without activity for the last 15 days.