Missing uuid_generate_v1()

Started by Mike Christensenover 15 years ago25 messagesgeneral
Jump to latest
#1Mike Christensen
mike@kitchenpc.com

My production server is running Postgres 9.0 on Ubuntu Server, and I'm
getting some errors in sprocs that call uuid_generate_v1().. This is
because the function is missing.

On my Windows box, this function would automatically be installed as
part of the database.. If I try to create the function with:

CREATE OR REPLACE FUNCTION uuid_generate_v1()
RETURNS uuid AS
'$libdir/uuid-ossp', 'uuid_generate_v1'
LANGUAGE c VOLATILE STRICT
COST 1;

I get:

ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
SQL state: 58P01

How do I get this working under Linux? Thanks!!

Mike

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: Mike Christensen (#1)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.com> wrote:

My production server is running Postgres 9.0 on Ubuntu Server, and I'm
getting some errors in sprocs that call uuid_generate_v1()..  This is
because the function is missing.

On my Windows box, this function would automatically be installed as
part of the database..  If I try to create the function with:

CREATE OR REPLACE FUNCTION uuid_generate_v1()
 RETURNS uuid AS
'$libdir/uuid-ossp', 'uuid_generate_v1'
 LANGUAGE c VOLATILE STRICT
 COST 1;

I get:

ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
SQL state: 58P01

How do I get this working under Linux?  Thanks!!

Have you installed the contrib package? Often there's an associated
.sql file to turn a contrib module on in a given database. It'll be
in something like /usr/share usually

#3Mike Christensen
mike@kitchenpc.com
In reply to: Scott Marlowe (#2)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:

On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.com> wrote:

My production server is running Postgres 9.0 on Ubuntu Server, and I'm
getting some errors in sprocs that call uuid_generate_v1()..  This is
because the function is missing.

On my Windows box, this function would automatically be installed as
part of the database..  If I try to create the function with:

CREATE OR REPLACE FUNCTION uuid_generate_v1()
 RETURNS uuid AS
'$libdir/uuid-ossp', 'uuid_generate_v1'
 LANGUAGE c VOLATILE STRICT
 COST 1;

I get:

ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
SQL state: 58P01

How do I get this working under Linux?  Thanks!!

Have you installed the contrib package?  Often there's an associated
.sql file to turn a contrib module on in a given database.  It'll be
in something like /usr/share usually

Yup, I tried that - Here's what I get:

# ./psql -d ****** -U ****** -f
/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql
Password for user root:
SET
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:9:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:14:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:19:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:24:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:29:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:34:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:39:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:44:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:49:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:54:
ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory

#4Mike Christensen
mike@kitchenpc.com
In reply to: Mike Christensen (#3)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:27 PM, Mike Christensen <mike@kitchenpc.com> wrote:

On Wed, Oct 6, 2010 at 6:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:

On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.com> wrote:

My production server is running Postgres 9.0 on Ubuntu Server, and I'm
getting some errors in sprocs that call uuid_generate_v1()..  This is
because the function is missing.

On my Windows box, this function would automatically be installed as
part of the database..  If I try to create the function with:

CREATE OR REPLACE FUNCTION uuid_generate_v1()
 RETURNS uuid AS
'$libdir/uuid-ossp', 'uuid_generate_v1'
 LANGUAGE c VOLATILE STRICT
 COST 1;

I get:

ERROR: could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
SQL state: 58P01

How do I get this working under Linux?  Thanks!!

Have you installed the contrib package?  Often there's an associated
.sql file to turn a contrib module on in a given database.  It'll be
in something like /usr/share usually

Yup, I tried that - Here's what I get:

# ./psql -d ****** -U ****** -f
/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql
Password for user root:
SET
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:9:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:14:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:19:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:24:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:29:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:34:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:39:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:44:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:49:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory
psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:54:
ERROR:  could not load library
"/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
cannot open shared object file: No such file or directory

Oh btw, the file does actually exist.. Maybe it's missing some
permission or something?

ls -l /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
-rwxr-xr-x 1 root daemon 12648 Oct 3 20:03
/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#4)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

Oh btw, the file does actually exist.. Maybe it's missing some
permission or something?

ls -l /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
-rwxr-xr-x 1 root daemon 12648 Oct 3 20:03
/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so

What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
say?

regards, tom lane

#6Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#5)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

Oh btw, the file does actually exist..  Maybe it's missing some
permission or something?

ls -l /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
-rwxr-xr-x 1 root daemon 12648 Oct  3 20:03
/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so

What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
say?

                       regards, tom lane

# ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
linux-vdso.so.1 => (0x00007fff5a5ff000)
libuuid.so.16 => not found
libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#6)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
say?

# ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
linux-vdso.so.1 => (0x00007fff5a5ff000)
libuuid.so.16 => not found
libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)

So you don't have libuuid installed. Go forth and get it ...

regards, tom lane

#8Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#7)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
say?

# ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
      linux-vdso.so.1 =>  (0x00007fff5a5ff000)
      libuuid.so.16 => not found
      libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
      /lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)

So you don't have libuuid installed.  Go forth and get it ...

                       regards, tom lane

What's the easiest way to do that? Is there a .bin file I can run?
Or a URL I can wget? Thanks!

#9Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#8)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

So you don't have libuuid installed. �Go forth and get it ...

What's the easiest way to do that? Is there a .bin file I can run?
Or a URL I can wget? Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

regards, tom lane

#10Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#9)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

So you don't have libuuid installed.  Go forth and get it ...

What's the easiest way to do that?  Is there a .bin file I can run?
Or a URL I can wget?  Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

                       regards, tom lane

Ok I just installed anything that looked relevant:

apt-get install libuuid1 uuid-dev uuid-runtime

It said libuuid1 was already installed, but installed the other two.
However, libuuid.so.16 is still "not found"..

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#10)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

However, libuuid.so.16 is still "not found"..

So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
may be)?

regards, tom lane

#12Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#11)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

However, libuuid.so.16 is still "not found"..

So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
may be)?

                       regards, tom lane

/usr/lib# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22 2010 libuuid.a
lrwxrwxrwx 1 root root 21 Oct 7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

/usr/lib64# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22 2010 libuuid.a
lrwxrwxrwx 1 root root 21 Oct 7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#12)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

However, libuuid.so.16 is still "not found"..

So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
may be)?

/usr/lib# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22 2010 libuuid.a
lrwxrwxrwx 1 root root 21 Oct 7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

Well, apparently the copy of Postgres you have was built on a different
platform than you're using ... one where libuuid is thought to be at
major version 16. I don't know where that would've been exactly ---
on my Fedora box, libuuid is libuuid.so.1.3.0 also.

You need to get those version numbers to match up, either by finding a
version of PG that *was* built on your platform, or by rebuilding PG
locally.

I have heard of people hacking this type of situation by creating a
symlink from one library version to the other, but that seems pretty
risky to me.

regards, tom lane

#14Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Mike Christensen (#10)
Re: Missing uuid_generate_v1()

On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:

On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

So you don't have libuuid installed.  Go forth and get it ...

What's the easiest way to do that?  Is there a .bin file I can run?
Or a URL I can wget?  Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

                       regards, tom lane

Ok I just installed anything that looked relevant:

apt-get install libuuid1 uuid-dev uuid-runtime

It said libuuid1 was already installed, but installed the other two.
However, libuuid.so.16 is still "not found"..

What version of Ubuntu and libuuid are you running? The stock version of uuid
that came with my Ubuntu 8.04 does not work. I downloaded a newer
version(1.6.2) from:
http://www.ossp.org/pkg/lib/uuid/
I compiled it and Postgres was happy.

--
Adrian Klaver
adrian.klaver@gmail.com

#15Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#13)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 7:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

However, libuuid.so.16 is still "not found"..

So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
may be)?

/usr/lib# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22  2010 libuuid.a
lrwxrwxrwx 1 root root    21 Oct  7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

Well, apparently the copy of Postgres you have was built on a different
platform than you're using ... one where libuuid is thought to be at
major version 16.  I don't know where that would've been exactly ---
on my Fedora box, libuuid is libuuid.so.1.3.0 also.

You need to get those version numbers to match up, either by finding a
version of PG that *was* built on your platform, or by rebuilding PG
locally.

I have heard of people hacking this type of situation by creating a
symlink from one library version to the other, but that seems pretty
risky to me.

                       regards, tom lane

I got it working..

I just built libuuid 1.6 from the source and installed that :)

BTW, I installed Postgres 9 from the .bin file downloadable at
enterprisedb.com..

#16Mike Christensen
mike@kitchenpc.com
In reply to: Adrian Klaver (#14)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 7:21 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:

On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:

On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

So you don't have libuuid installed.  Go forth and get it ...

What's the easiest way to do that?  Is there a .bin file I can run?
Or a URL I can wget?  Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

                       regards, tom lane

Ok I just installed anything that looked relevant:

apt-get install libuuid1 uuid-dev uuid-runtime

It said libuuid1 was already installed, but installed the other two.
However, libuuid.so.16 is still "not found"..

What version of Ubuntu and libuuid are you running?  The stock version of uuid
that came with my Ubuntu 8.04 does not work. I downloaded a newer
version(1.6.2) from:
http://www.ossp.org/pkg/lib/uuid/
I compiled it and Postgres was happy.

--
Adrian Klaver
adrian.klaver@gmail.com

Yup that's exactly what I did.. I'm on 10.04, which doesn't have
libuuid 1.6 in the software repository, go figure..

I greatly appreciate everyone's help..

#17Mike Christensen
mike@kitchenpc.com
In reply to: Mike Christensen (#16)
Re: Missing uuid_generate_v1()


On Wed, Oct 6, 2010 at 7:24 PM, Mike Christensen <mike@kitchenpc.com> wrote:

On Wed, Oct 6, 2010 at 7:21 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:

On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:

On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

So you don't have libuuid installed.  Go forth and get it ...

What's the easiest way to do that?  Is there a .bin file I can run?
Or a URL I can wget?  Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

                       regards, tom lane

Ok I just installed anything that looked relevant:

apt-get install libuuid1 uuid-dev uuid-runtime

It said libuuid1 was already installed, but installed the other two.
However, libuuid.so.16 is still "not found"..

What version of Ubuntu and libuuid are you running?  The stock version of uuid
that came with my Ubuntu 8.04 does not work. I downloaded a newer
version(1.6.2) from:
http://www.ossp.org/pkg/lib/uuid/
I compiled it and Postgres was happy.

--
Adrian Klaver
adrian.klaver@gmail.com

Yup that's exactly what I did..  I'm on 10.04, which doesn't have
libuuid 1.6 in the software repository, go figure..

I greatly appreciate everyone's help..

Oh BTW, in case anyone stumbles across this thread archived in the
future, once you do this, be sure to do a postgres restart, or PG
apparently just crashes and burns when you call uuid_generate_v1() :)

Once I restarted the server, I could generate UUIDs all day long..

Mike

#18Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#16)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

Yup that's exactly what I did.. I'm on 10.04, which doesn't have
libuuid 1.6 in the software repository, go figure..

Oh ... we're in package-naming hell, is where we are. Poking around
some more on my Fedora 13 box, I find I have two different, similarly
named packages:

$ rpm -qa | grep uuid
uuid-1.6.1-11.fc13.x86_64
libuuid-2.17.2-8.fc13.x86_64
uuid-devel-1.6.1-11.fc13.x86_64
libuuid-devel-2.17.2-8.fc13.x86_64
$ rpm -ql uuid-1.6.1-11.fc13.x86_64
/usr/bin/uuid
/usr/lib64/libossp-uuid.so.16
/usr/lib64/libossp-uuid.so.16.0.21
... and some doc files ...
$ rpm -ql libuuid-2.17.2-8.fc13.x86_64
/lib64/libuuid.so.1
/lib64/libuuid.so.1.3.0

The file you actually want, on Fedora (and, I bet, on Ubuntu),
is libossp-uuid.so.16. But apparently EDB's package was built on some
platform where uuid's library is installed as just "libuuid.so.16".
Maybe they used a homebuilt copy instead of an official platform
distribution?

If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
to that instead of carrying a separate file.

regards, tom lane

#19Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#18)
Re: Missing uuid_generate_v1()

On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mike Christensen <mike@kitchenpc.com> writes:

Yup that's exactly what I did..  I'm on 10.04, which doesn't have
libuuid 1.6 in the software repository, go figure..

Oh ... we're in package-naming hell, is where we are.  Poking around
some more on my Fedora 13 box, I find I have two different, similarly
named packages:

$ rpm -qa | grep uuid
uuid-1.6.1-11.fc13.x86_64
libuuid-2.17.2-8.fc13.x86_64
uuid-devel-1.6.1-11.fc13.x86_64
libuuid-devel-2.17.2-8.fc13.x86_64
$ rpm -ql uuid-1.6.1-11.fc13.x86_64
/usr/bin/uuid
/usr/lib64/libossp-uuid.so.16
/usr/lib64/libossp-uuid.so.16.0.21
... and some doc files ...
$ rpm -ql libuuid-2.17.2-8.fc13.x86_64
/lib64/libuuid.so.1
/lib64/libuuid.so.1.3.0

The file you actually want, on Fedora (and, I bet, on Ubuntu),
is libossp-uuid.so.16.  But apparently EDB's package was built on some
platform where uuid's library is installed as just "libuuid.so.16".
Maybe they used a homebuilt copy instead of an official platform
distribution?

If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
to that instead of carrying a separate file.

                       regards, tom lane

So now what you're saying is if it's not broke, fix it till it is :)

#20Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mike Christensen (#19)
Re: Missing uuid_generate_v1()

Mike Christensen <mike@kitchenpc.com> writes:

On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
to that instead of carrying a separate file.

So now what you're saying is if it's not broke, fix it till it is :)

Well, it's hard to argue with that position ;-). But I'll try anyway:
the platform-provided version of the library will be updated for bug
fixes, compatibility rebuilds, etc. Your private copy won't be, unless
you remember to do it. Eventually that's gonna bite ya.

Of course the best fix would be for EDB to ship a build of Postgres
that actually follows the platform-standard naming convention for this
library. I'm still wondering why they're linking to libuuid.so.
Dave?

regards, tom lane

#21Mike Christensen
mike@kitchenpc.com
In reply to: Tom Lane (#20)
#22Magnus Hagander
magnus@hagander.net
In reply to: Mike Christensen (#21)
#23Mike Christensen
mike@kitchenpc.com
In reply to: Magnus Hagander (#22)
#24Peter Eisentraut
peter_e@gmx.net
In reply to: Mike Christensen (#1)
#25Dave Page
dpage@pgadmin.org
In reply to: Tom Lane (#20)