8.3.6 build error on Debian Lenny

Started by Josh Trutwinabout 17 years ago9 messagesgeneral
Jump to latest
#1Josh Trutwin
josh@trutwins.homeip.net

Hi - I'm trying to build 8.3.6 on a box recently upgraded from Sarge
to Lenny and I get the following error during compile:

make[4]: Entering directory
`/backup/source/db/postgresql-8.3.6/src/backend/utils/adt' gcc -O2
-Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../../../src/include -D_GNU_SOURCE -I/usr/local/lib -c
-o geo_ops.o geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol
lookup error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

./configure --prefix=/usr/local/pgsql-8.3.6 --with-python
--with-perl --with-openssl --with-libraries=/usr/local/lib
--with-includes=/usr/local/lib

dpkg -S /usr/lib/libmpfr.so.1
libmpfr1ldbl: /usr/lib/libmpfr.so.1

Any ideas? Google isn't telling me much that I can understand. :(

Thanks,

Josh

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Trutwin (#1)
Re: 8.3.6 build error on Debian Lenny

Josh Trutwin <josh@trutwins.homeip.net> writes:

Hi - I'm trying to build 8.3.6 on a box recently upgraded from Sarge
to Lenny and I get the following error during compile:

make[4]: Entering directory
`/backup/source/db/postgresql-8.3.6/src/backend/utils/adt' gcc -O2
-Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../../../src/include -D_GNU_SOURCE -I/usr/local/lib -c
-o geo_ops.o geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol
lookup error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

[ blink... ] There's no reason for a compile to be looking into shared
libraries. What I think must have happened here is that this reflects a
bogus function call internally in gcc itself. Which probably means that
you have a gcc version that's out-of-sync with your libmpfr.so.1 version
(whatever the heck that is). I'd suggest asking around among some
Debian experts, or just reinstalling instead of upgrading.

regards, tom lane

#3Leonel Nunez
listas@enelserver.com
In reply to: Tom Lane (#2)
Re: 8.3.6 build error on Debian Lenny

Josh Trutwin <josh@trutwins.homeip.net> writes:

Hi - I'm trying to build 8.3.6 on a box recently upgraded from Sarge
to Lenny and I get the following error during compile:

make[4]: Entering directory
`/backup/source/db/postgresql-8.3.6/src/backend/utils/adt' gcc -O2
-Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../../../src/include -D_GNU_SOURCE -I/usr/local/lib -c
-o geo_ops.o geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol
lookup error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

[ blink... ] There's no reason for a compile to be looking into shared
libraries. What I think must have happened here is that this reflects a
bogus function call internally in gcc itself. Which probably means that
you have a gcc version that's out-of-sync with your libmpfr.so.1 version
(whatever the heck that is). I'd suggest asking around among some
Debian experts, or just reinstalling instead of upgrading.

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

Lenny has 8.3.6 why don't just apt-get install postgresql ???
http://packages.debian.org/lenny/postgresql

Leonel

#4Josh Trutwin
josh@trutwins.homeip.net
In reply to: Tom Lane (#2)
Re: 8.3.6 build error on Debian Lenny

On Tue, 10 Mar 2009 00:49:32 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

Josh Trutwin <josh@trutwins.homeip.net> writes:

<snip>

geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol lookup
error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

[ blink... ] There's no reason for a compile to be looking into
shared libraries. What I think must have happened here is that
this reflects a bogus function call internally in gcc itself.
Which probably means that you have a gcc version that's out-of-sync
with your libmpfr.so.1 version (whatever the heck that is). I'd
suggest asking around among some Debian experts, or just
reinstalling instead of upgrading.

Reinstalling would be rough - this box is remote, I felt lucky to get
through the upgrade over ssh.

I'll try Debian lists / irc - hopefully don't get snarks. :)

Thanks,

Josh

#5Josh Trutwin
josh@trutwins.homeip.net
In reply to: Leonel Nunez (#3)
Re: 8.3.6 build error on Debian Lenny

On Mon, 9 Mar 2009 22:01:38 -0700 (MST)
"Leonel Nunez" <listas@enelserver.com> wrote:

Lenny has 8.3.6 why don't just apt-get install postgresql ???
http://packages.debian.org/lenny/postgresql

If I were doing a complete reinstall I would definitely go that
route. I came from a slackware background and liked to compile the
packages I wanted more control over - nowadays I'd defer to the
package manager.

Unfortunately just recently I've also had the same error come up
trying to build php. Something seems goofed up with my build
tools.

Josh

#6Richard Huxton
dev@archonet.com
In reply to: Josh Trutwin (#5)
Re: 8.3.6 build error on Debian Lenny

Josh Trutwin wrote:

Unfortunately just recently I've also had the same error come up
trying to build php. Something seems goofed up with my build
tools.

I wouldn't be surprised if it had kept your old version of gcc etc. in
case you needed that specific version for some reason. A quick bit of
apt searching should tell you.
--
Richard Huxton
Archonet Ltd

#7Bruce Momjian
bruce@momjian.us
In reply to: Josh Trutwin (#4)
Re: 8.3.6 build error on Debian Lenny

Josh Trutwin <josh@trutwins.homeip.net> writes:

On Tue, 10 Mar 2009 00:49:32 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

Josh Trutwin <josh@trutwins.homeip.net> writes:

<snip>

geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol lookup
error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

[ blink... ] There's no reason for a compile to be looking into
shared libraries. What I think must have happened here is that
this reflects a bogus function call internally in gcc itself.
Which probably means that you have a gcc version that's out-of-sync
with your libmpfr.so.1 version (whatever the heck that is). I'd
suggest asking around among some Debian experts, or just
reinstalling instead of upgrading.

Searching on google it seems this is a typical error message when you have a
hand-compiled gmp installed locally in /usr/local/lib as well as a system gmp
installed in /usr/lib. So you may be getting one version of libmpfr and a
mismatched version of libgmpMPFR. I would imagine this could cause problems if
one is compiled statically and the other dynamically. (Or if they're both
static but you list them in the wrong order on the command-line.)

Reinstalling would be rough - this box is remote, I felt lucky to get
through the upgrade over ssh.

It's usually unnecessary to reinstall Debian. I've been running unstable since
1996 and only had to do it once and only because I had a filesystem
corruption.

I'll try Debian lists / irc - hopefully don't get snarks. :)

Yes well...

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning

#8Josh Trutwin
josh@trutwins.homeip.net
In reply to: Bruce Momjian (#7)
Re: [SOLVED] 8.3.6 build error on Debian Lenny

On Tue, 10 Mar 2009 12:37:21 +0000
Gregory Stark <stark@enterprisedb.com> wrote:

Searching on google it seems this is a typical error message when
you have a hand-compiled gmp installed locally in /usr/local/lib as
well as a system gmp installed in /usr/lib. So you may be getting
one version of libmpfr and a mismatched version of libgmpMPFR. I
would imagine this could cause problems if one is compiled
statically and the other dynamically. (Or if they're both static
but you list them in the wrong order on the command-line.)

Thanks for the pointers Gregory / Richard - I found a rogue gmp
install in /usr/local that was conflicting so removed that and now pg
builds fine.

Josh

#9donald63
donald.axel@gmail.com
In reply to: Tom Lane (#2)
Re: 8.3.6 build error on Debian Lenny

Tom Lane-2 wrote:

Josh Trutwin <josh@trutwins.homeip.net> writes:

Hi - I'm trying to build 8.3.6 on a box recently upgraded from Sarge
to Lenny and I get the following error during compile:

make[4]: Entering directory
`/backup/source/db/postgresql-8.3.6/src/backend/utils/adt' gcc -O2
-Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -I../../../../src/include -D_GNU_SOURCE -I/usr/local/lib -c
-o geo_ops.o geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol
lookup error: /usr/lib/libmpfr.so.1: undefined symbol:
__gmp_get_memory_functions

[ blink... ] There's no reason for a compile to be looking into shared
libraries. What I think must have happened here is that this reflects a
bogus function call internally in gcc itself. Which probably means that
you have a gcc version that's out-of-sync with your libmpfr.so.1 version
(whatever the heck that is). I'd suggest asking around among some
Debian experts, or just reinstalling instead of upgrading.

regards, tom lane

I had exactly same error (missing symbol __gmp_get_memory_functions)
while compiling libsndfile-1.0.20
This old message helped a lot. libmpfr was compiled with gcc-4.3.3
and I had updated to gcc-4.4.1

I recompiled mpfr and the error was solved.
(I am still using PostgreSQL-8.3.4 on Scientific
Linux 5.x which I compiled with gcc-4.1.2)
Thank you for this nice mailing list :-)

MPFR is a portable library written in C for arbitrary precision
arithmetic on floating-point numbers. It is based on the GNU MP library.
It aims to extend the class of floating-point numbers provided by the
GNU MP library by a precise semantics. The main differences with the
`mpf' class from GNU MP are:

* the `mpfr' code is portable, i.e. the result of any operation does
not depend (or should not) on the machine word size
`mp_bits_per_limb' (32 or 64 on most machines);

* the precision in bits can be set exactly to any valid value for
each variable (including very small precision);

* `mpfr' provides the four rounding modes from the IEEE 754-1985
standard.

In particular, with a precision of 53 bits, `mpfr' should be able to
exactly reproduce all computations with double-precision machine
floating-point numbers (`double' type in C), except the default
exponent range is much wider and subnormal numbers are not implemented
but can be emulated.

--
View this message in context: http://www.nabble.com/8.3.6-build-error-on-Debian-Lenny-tp22427839p25757187.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.