Обсуждение: GCC error and libmpfr.so.4 not found

Поиск
Список
Период
Сортировка

GCC error and libmpfr.so.4 not found

От
Asma Riyaz
Дата:
Hi, 

Due to root access permissions I have to resort to manually installing postgres from source code available under the ftp site. When I execute ./configure --prefix="dir/path"- my config log shows the following error: 

gcc version 4.9.0 (GCC) 
configure:3817: $? = 0 
configure:3806: gcc -V >&5 
gcc: error: unrecognized command line option '-V' 
gcc: fatal error: no input files 
compilation terminated. 
configure:3817: $? = 1 
configure:3806: gcc -qversion >&5 
gcc: error: unrecognized command line option '-qversion' 
gcc: fatal error: no input files 
compilation terminated. 
configure:3817: $? = 1 
configure:3837: checking whether the C compiler works 
configure:3859: gcc    conftest.c  >&5 
/../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/libexec/gcc/x86_64-redhat-linux/4.9.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot     open shared object file: No such file or directory 

I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

Re: GCC error and libmpfr.so.4 not found

От
Geoff Winkless
Дата:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff

Re: GCC error and libmpfr.so.4 not found

От
Asma Riyaz
Дата:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff


Re: GCC error and libmpfr.so.4 not found

От
Jimmy Yih
Дата:
Hey Asma,

Have you tried running ldd and checking the library linkage?  You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working.

- Jimmy

On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff



Re: GCC error and libmpfr.so.4 not found

От
Asma Riyaz
Дата:
Hi Jimmy,

Here is what I did upon your suggestion;

in bashrc:-

LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

sourced it and then exceuted /.configure as below:

./configure --prefix=/../../DATABASE/postgres

I get the same error log as before.

Asma





On Thu, Jun 11, 2015 at 1:30 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Have you tried running ldd and checking the library linkage?  You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working.

- Jimmy

On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff




Re: GCC error and libmpfr.so.4 not found

От
Jimmy Yih
Дата:
Hey Asma,

Did you check the linkage with ldd?  For example on my blank RHEL 6.5 AWS VM using gcc 4.4.7:

[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff9b9ff000)
    libmpfr.so.1 => /usr/lib64/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Most likely you should have an empty/broken libmpfr.so linkage.  You can play around with LD_LIBRARY_PATH like so:
## create another libmpfr.so link in a different directory for example
[jyih@test1 ~]$ ls -al /usr/lib64/libmpfr*
lrwxrwxrwx. 1 root root     16 Jun  7  2014 /usr/lib64/libmpfr.so.1 -> libmpfr.so.1.2.0
-rwxr-xr-x. 1 root root 318408 Jun 23  2010 /usr/lib64/libmpfr.so.1.2.0
[jyih@test1 ~]$ ln -s /usr/lib64/libmpfr.so.1.2.0 /tmp/libmpfr.so.1

## show that LD_LIBRARY_PATH is empty and then add new paths
[jyih@test1 ~]$ echo $LD_LIBRARY_PATH

[jyih@test1 ~]$ export LD_LIBRARY_PATH=/tmp:$LD_LIBRARY_PATH

## ldd shows new linking
[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff06dff000)
    libmpfr.so.1 => /tmp/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Hope that helps!

- Jimmy

On Thu, Jun 11, 2015 at 11:44 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
Hi Jimmy,

Here is what I did upon your suggestion;

in bashrc:-

LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

sourced it and then exceuted /.configure as below:

./configure --prefix=/../../DATABASE/postgres

I get the same error log as before.

Asma





On Thu, Jun 11, 2015 at 1:30 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Have you tried running ldd and checking the library linkage?  You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working.

- Jimmy

On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff





Re: GCC error and libmpfr.so.4 not found

От
Tom Lane
Дата:
Asma Riyaz <asmariyaz23@gmail.com> writes:
> in bashrc:-

> LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

If you didn't have an "export LD_LIBRARY_PATH" in there, I don't
think this would do anything.

But your real problem is you have a broken gcc installation.  Basic
tools like that should not need a custom LD_LIBRARY_PATH to work.

            regards, tom lane


Re: GCC error and libmpfr.so.4 not found

От
Asma Riyaz
Дата:
Hi Jimmy,

I checked linkage with ldd:

ldd /path/to/cc1

Here is the result:

linux-vdso.so.1 =>  (0x00007fffed53f000)
libmpfr.so.4 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib/libmpfr.so.4 (0x00007f264f304000)
libgmp.so.10 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib/libgmp.so.10 (0x00007f264f08f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000034a2800000)
libm.so.6 => /lib64/libm.so.6 (0x00000034a2000000)
libc.so.6 => /lib64/libc.so.6 (0x00000034a1c00000)
/lib64/ld-linux-x86-64.so.2 (0x00000034a1800000)

libmpfr.so.4 already exists but it still didn't find it.

I will now export LD_LIBRARY_PATH and see if it works..

Thank you,
Asma













On Thu, Jun 11, 2015 at 3:18 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Did you check the linkage with ldd?  For example on my blank RHEL 6.5 AWS VM using gcc 4.4.7:

[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff9b9ff000)
    libmpfr.so.1 => /usr/lib64/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Most likely you should have an empty/broken libmpfr.so linkage.  You can play around with LD_LIBRARY_PATH like so:
## create another libmpfr.so link in a different directory for example
[jyih@test1 ~]$ ls -al /usr/lib64/libmpfr*
lrwxrwxrwx. 1 root root     16 Jun  7  2014 /usr/lib64/libmpfr.so.1 -> libmpfr.so.1.2.0
-rwxr-xr-x. 1 root root 318408 Jun 23  2010 /usr/lib64/libmpfr.so.1.2.0
[jyih@test1 ~]$ ln -s /usr/lib64/libmpfr.so.1.2.0 /tmp/libmpfr.so.1

## show that LD_LIBRARY_PATH is empty and then add new paths
[jyih@test1 ~]$ echo $LD_LIBRARY_PATH

[jyih@test1 ~]$ export LD_LIBRARY_PATH=/tmp:$LD_LIBRARY_PATH

## ldd shows new linking
[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff06dff000)
    libmpfr.so.1 => /tmp/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Hope that helps!

- Jimmy

On Thu, Jun 11, 2015 at 11:44 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
Hi Jimmy,

Here is what I did upon your suggestion;

in bashrc:-

LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

sourced it and then exceuted /.configure as below:

./configure --prefix=/../../DATABASE/postgres

I get the same error log as before.

Asma





On Thu, Jun 11, 2015 at 1:30 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Have you tried running ldd and checking the library linkage?  You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working.

- Jimmy

On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff






Re: GCC error and libmpfr.so.4 not found

От
John R Pierce
Дата:
On 6/11/2015 7:20 AM, Asma Riyaz wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

on RHEL7/CentOS 7, that library is provided by the package mpfr...  ask the ssytem administrator to install...

    yum install mpfr

if your host is not providing basic working development tools,  you either need to find a new host, or discuss this with management.

-- 
john r pierce, recycling bits in santa cruz

Re: GCC error and libmpfr.so.4 not found

От
Asma Riyaz
Дата:
Hi everyone...

I think libmpfr.so.4 is being searched for in the /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/libexec (according to error message) directory but on our system it is located in /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib

Any idea how I can specify as to which directory should configure refer to for library directory?

-Thank you,
Asma

 



On Thu, Jun 11, 2015 at 3:32 PM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
Hi Jimmy,

I checked linkage with ldd:

ldd /path/to/cc1

Here is the result:

linux-vdso.so.1 =>  (0x00007fffed53f000)
libmpfr.so.4 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib/libmpfr.so.4 (0x00007f264f304000)
libgmp.so.10 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib/libgmp.so.10 (0x00007f264f08f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000034a2800000)
libm.so.6 => /lib64/libm.so.6 (0x00000034a2000000)
libc.so.6 => /lib64/libc.so.6 (0x00000034a1c00000)
/lib64/ld-linux-x86-64.so.2 (0x00000034a1800000)

libmpfr.so.4 already exists but it still didn't find it.

I will now export LD_LIBRARY_PATH and see if it works..

Thank you,
Asma













On Thu, Jun 11, 2015 at 3:18 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Did you check the linkage with ldd?  For example on my blank RHEL 6.5 AWS VM using gcc 4.4.7:

[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff9b9ff000)
    libmpfr.so.1 => /usr/lib64/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Most likely you should have an empty/broken libmpfr.so linkage.  You can play around with LD_LIBRARY_PATH like so:
## create another libmpfr.so link in a different directory for example
[jyih@test1 ~]$ ls -al /usr/lib64/libmpfr*
lrwxrwxrwx. 1 root root     16 Jun  7  2014 /usr/lib64/libmpfr.so.1 -> libmpfr.so.1.2.0
-rwxr-xr-x. 1 root root 318408 Jun 23  2010 /usr/lib64/libmpfr.so.1.2.0
[jyih@test1 ~]$ ln -s /usr/lib64/libmpfr.so.1.2.0 /tmp/libmpfr.so.1

## show that LD_LIBRARY_PATH is empty and then add new paths
[jyih@test1 ~]$ echo $LD_LIBRARY_PATH

[jyih@test1 ~]$ export LD_LIBRARY_PATH=/tmp:$LD_LIBRARY_PATH

## ldd shows new linking
[jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1
    linux-vdso.so.1 =>  (0x00007fff06dff000)
    libmpfr.so.1 => /tmp/libmpfr.so.1 (0x00000033b8400000)
    libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000033b8000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003c1e400000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003c1e800000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c1e000000)

Hope that helps!

- Jimmy

On Thu, Jun 11, 2015 at 11:44 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
Hi Jimmy,

Here is what I did upon your suggestion;

in bashrc:-

LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

sourced it and then exceuted /.configure as below:

./configure --prefix=/../../DATABASE/postgres

I get the same error log as before.

Asma





On Thu, Jun 11, 2015 at 1:30 PM, Jimmy Yih <jyih@pivotal.io> wrote:
Hey Asma,

Have you tried running ldd and checking the library linkage?  You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working.

- Jimmy

On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory?

I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the shared location as before. Any advice will be helpful.

Thank you,
Asma

On Thu, Jun 11, 2015 at 10:34 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
On 11 June 2015 at 15:20, Asma Riyaz <asmariyaz23@gmail.com> wrote:
I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh?

libmpfr. Unless I've misunderstood, the other errors are simply configure trying to work out which compiler you're running - -V and -qversion simply aren't valid flags to gcc - so those "error" lines are expected result.

Geoff







Re: GCC error and libmpfr.so.4 not found

От
Asif Naeem
Дата:


On Fri, Jun 12, 2015 at 12:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Asma Riyaz <asmariyaz23@gmail.com> writes:
> in bashrc:-

> LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib

> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib

If you didn't have an "export LD_LIBRARY_PATH" in there, I don't
think this would do anything.

But your real problem is you have a broken gcc installation.  Basic
tools like that should not need a custom LD_LIBRARY_PATH to work.

+1, don't jump directly to complex script like PG configure, fix your gcc installation first and test it with hello world c program.
 

                        regards, tom lane


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general