The summary pretty much says it all. I've installed postgresql-server-8.3.1
with uuid in my use flags and I can't run the provided ossp-uuid install script
because of an undefined symbol in /usr/lib/postgresql-8.3/lib/uuid-ossp.so
(uuid_error is the undefined symbol that causes the problem, but there are
several other undefined symbols, too, according to objdump -T).
Searching Google turned up this page:
http://www.postgresqlforums.com/forums/viewtopic.php?f=29&t=568&p=2131
I thought maybe the ebuild was failing to ./configure with --with-ossp-uuid, or
something, so I tried using the ebuild command to run every part of
postgresql-server-8.3.1.ebuild except for the compile step, and then I made
sure to run ./configure with all the necessary flags but it didn't fix the
problem.
Reproducible: Always
Steps to Reproduce:
1. Install postgresql-server-8.3.1 with uuid in USE (this requires some work
because the package and its dependencies are still in testing)
2. Create a database 'foo'
3. Execute 'psql -U postgres foo <
/usr/share/postgresql-8.3/contrib/uuid-ossp.sql'
Actual Results:
$ psql -U postgres foo < /usr/share/postgresql-8.3/contrib/uuid-ossp.sql
SET
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
ERROR: could not load library "/usr/lib/postgresql-8.3/lib/uuid-ossp.so":
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: undefined symbol: uuid_error
Expected Results:
The various UUID-related functions defined in uuid-ossp.sql should be
successfully defined in database foo.
$ objdump -T /usr/lib/postgresql-8.3/lib/uuid-ossp.so
/usr/lib/postgresql-8.3/lib/uuid-ossp.so: file format elf32-i386
DYNAMIC SYMBOL TABLE:
00000000 D *UND* 00000000 uuid_out
00000000 D *UND* 00000000 errstart
00000000 D *UND* 00000000 CurrentMemoryContext
00000000 w D *UND* 00000000 __gmon_start__
00000000 w D *UND* 00000000 _Jv_RegisterClasses
00000000 D *UND* 00000000 uuid_error
00000000 D *UND* 00000000 errfinish
00000000 D *UND* 00000000 uuid_export
00000000 D *UND* 00000000 uuid_import
00000000 D *UND* 00000000 textout
00000000 D *UND* 00000000 uuid_create
00000000 D *UND* 00000000 uuid_load
00000000 D *UND* 00000000 uuid_in
00000000 D *UND* 00000000 DirectFunctionCall1
00000000 D *UND* 00000000 uuid_destroy
00000000 D *UND* 00000000 errmsg
00000000 D *UND* 00000000 errcode
00000000 D *UND* 00000000 uuid_make
00000000 w DF *UND* 000000fb GLIBC_2.1.3 __cxa_finalize
00000000 D *UND* 00000000 pg_detoast_datum
00000000 D *UND* 00000000 MemoryContextAlloc
00000c40 g DF .text 00000016 Base pg_finfo_uuid_ns_url
00001060 g DF .text 0000003f Base uuid_generate_v3
00000c00 g DF .text 00000016 Base pg_finfo_uuid_nil
00000f40 g DF .text 00000012 Base uuid_generate_v4
00001254 g DF .fini 00000000 Base _fini
00000c80 g DF .text 00000016 Base pg_finfo_uuid_ns_x500
00001020 g DF .text 0000003f Base uuid_generate_v5
000009e0 g DF .init 00000000 Base _init
000010a0 g DF .text 00000012 Base uuid_generate_v1mc
00000ca0 g DF .text 00000016 Base pg_finfo_uuid_generate_v1
00003048 g D *ABS* 00000000 Base __bss_start
0000304c g D *ABS* 00000000 Base _end
00000ce0 g DF .text 00000016 Base pg_finfo_uuid_generate_v3
00000d00 g DF .text 00000016 Base pg_finfo_uuid_generate_v4
00000d20 g DF .text 00000016 Base pg_finfo_uuid_generate_v5
00003048 g D *ABS* 00000000 Base _edata
000011d0 g DF .text 0000001a Base uuid_ns_dns
00001190 g DF .text 0000001a Base uuid_ns_oid
00000c20 g DF .text 00000016 Base pg_finfo_uuid_ns_dns
00000be0 g DF .text 00000016 Base Pg_magic_func
00000c60 g DF .text 00000016 Base pg_finfo_uuid_ns_oid
000011f0 g DF .text 0000001a Base uuid_nil
00000cc0 g DF .text 00000016 Base pg_finfo_uuid_generate_v1mc
000010c0 g DF .text 00000012 Base uuid_generate_v1
00001170 g DF .text 0000001a Base uuid_ns_x500
000011b0 g DF .text 0000001a Base uuid_ns_url
$ emerge --info
Portage 2.1.4.4 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0,
2.6.23-gentoo-r6 i686)
=================================================================
System uname: 2.6.23-gentoo-r6 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Timestamp of tree: Tue, 22 Apr 2008 16:45:02 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python: 2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -mfpmath=sse -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/postgresql
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -mfpmath=sse -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distcc distlocks metadata-transfer parallel-fetch
sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_CA.UTF-8"
MAKEOPTS="-j11"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa apache2 bash-completion bidi binary-drivers bluetooth
branding bzip2 cairo canna cardbus cdb cdparanoia cdr cjk cpudetection cracklib
crypt cups dbus dell deprecated dga dio dlloader dmi doc dri dvd dvdr dvi enca
encode examples exif expat fam fbcon fbsplash firefox ftp gdbm gif gimpprint
glitz gnome gnutls gphoto2 gpm graphviz gstreamer gtk guile hal hddtemp iconv
idea ieee1394 imagemagick imap innodb ipv6 ithreads java java5 javascript jboss
jpeg jpeg2k junit libnotify libwww lm_sensors m17n-lib maildir mime mmap mmx
mmxext mozdevelop mozilla moznocompose moznoirc moznomail moznoroaming moznoxft
mp3 mplayer multiuser mysql nautilus ncurses new-login nls nptl nptlonly
nsplugin nvidia nvtv odbc offensive ogg opengl pam pcntl pcre pdf perl pmu png
postgres ppds pppd print python qmail qt-static qt3 qt4 quotes readline regex
rtc ruby sdl seamonkey semanticfix sensord session sharedmem smp sockets sound
sox speex spell sse sse2 ssl stream subtitles svg sysfs sysvipc t1lib tcpd
tetex theora threads threadsafe thunderbird tidy tiff truetype unicode usb uuid
vim-syntax vim-with-x vorbis wifi win32codecs wmp x86 xanim xine xinerama xml
xorg xosd xpm xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias
authn_anon authn_dbm authn_default authn_file authz_dbm authz_default
authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs
dav_lock deflate dir disk_cache env expires ext_filter file_cache filter
headers include info log_config logio mem_cache mime mime_magic negotiation
rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" USERLAND="GNU" VIDEO_CARDS="vesa nvidia nv"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Just found this bug after updating to postgresql-server and got curious, so I
built the ossp-uuid lib with both its flags (php and cxx) enabled, and look
what flew by during configure:
..
checking whether to build PostgreSQL bindings to C API... (cached) no
..
I bet that is the reason why symbols are missing. I'll try to add the
postgresql-server use flag into the ebuild tomorrow.
@Holger: No, that's ok. The reason is that ossp-uuid had support for a
PostgreSQL extension before, but that part has been moved directly into
PostgreSQL with version 8.3.