Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285082 - Postgis does not work properly with eselect'able slotted postgres
Summary: Postgis does not work properly with eselect'able slotted postgres
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-15 13:25 UTC by Douglas Mayle
Modified: 2011-05-01 17:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Mayle 2009-09-15 13:25:24 UTC
While postgres-server is slotted, allowing side-by-side installation of, for example, 8.2 and 8.3, postgis is not built against both.

Reproducible: Always

Steps to Reproduce:
1. Install Postgres 8.2
2. Install Postgres 8.3
3. Install Postgis
4. Try to use postgis
Actual Results:  
ERROR:  incompatible library "/usr/lib64/postgresql//liblwgeom.so": version mismatch
DETAIL:  Server is version 8.3, library is version 8.2.

Expected Results:  
Well, I'm not sure I expect it to work properly, but I suppose eselect needs to understand postgis as well as postgres
Comment 1 Jaska K 2009-09-23 07:13:19 UTC
Maybe this is something related?

After upgrading
[ebuild     U ] dev-db/postgis-1.4.0 [1.3.3] USE="-doc (-geos%*) (-proj%*)" 0 kB

/usr/lib64/postgresql//liblwgeom  is missing


 PostGIS is now configured for x86_64-pc-linux-gnu

 -------------- Compiler Info ------------- 
  C compiler:           x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe
  C++ compiler:         x86_64-pc-linux-gnu-g++ -march=nocona -O2 -pipe

 -------------- Dependencies -------------- 
  GEOS config:          /usr/bin/geos-config
  GEOS version:         3.1
  PostgreSQL config:    /usr/bin/pg_config
  PostgreSQL version:   8.2
  PROJ4 version:        46
  PostGIS debug level:  0

 -------- Documentation Generation -------- 
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:     /usr/share/sgml/docbook/xsl-stylesheets
  dblatex:              
  convert:              /usr/bin/convert


=# select postgis_full_version();
ERROR:  could not access file "/usr/lib64/postgresql//liblwgeom": No such file or directory
CONTEXT:  SQL statement "SELECT postgis_lib_version()"
PL/pgSQL function "postgis_full_version" line 11 at SQL statement



Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-1.12.11.1
Timestamp of tree: Wed, 23 Sep 2009 05:15:02 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_US fi"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/portage/local/layman/java-overlay /usr/local/portage"
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage"
USE="X a52 aac acl alsa amd64 amr apache2 berkdb bzip2 cairo cli cracklib crypt cups curl dbus dri dv dvb dvd dvdr dvdread ecwj2k encode exif ffmpeg flac fontconfig fortran gd gdbm geos gif gml gpm gps gtk hdf5 iconv ieee1394 imagemagick imlib ipv6 isdnlog java jbig jpeg jpeg2k json kino lame lcms libwww mjpeg mmx modules motif mozdevelop mp3 mpeg mplayer mudflap multilib mysql ncurses netcdf nls nptl nptlonly nsplugin ogdi ogg opengl openmp pam pcre pdf perl png postgis postgres pppd proj python quicktime readline reflection session sox speex spl sqlite sse sse2 ssl subtitles svg sysfs tcpd tiff truetype unicode utils v4l v4l2 vorbis x264 xine xml xmlreader xmlwriter xorg xsl xv xvid 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 mmap_emul 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    proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http  rewrite setenvif    speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="dibusb-usb2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US fi" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Comment 2 Trevor Benedict 2009-10-02 18:08:28 UTC
Im having the same kind of issue.
It does not seem to be building liblwgeom.so
Ive looked in /var/tmp/portage/dev-db/postgis-1.4.0/ I see the liblwgeom stuff, no .so files. Only liblwgeom.a 

ERROR:  could not access file "/usr/lib/postgresql//liblwgeom.so.1.3": No such file or directory
CONTEXT:  SQL statement "SELECT postgis_lib_version()"

Only version I have installed right now is 8.3.
Comment 3 Trevor Benedict 2009-10-02 18:16:46 UTC
(In reply to comment #2)
> Im having the same kind of issue.
> It does not seem to be building liblwgeom.so
> Ive looked in /var/tmp/portage/dev-db/postgis-1.4.0/ I see the liblwgeom stuff,
> no .so files. Only liblwgeom.a 
> 
> ERROR:  could not access file "/usr/lib/postgresql//liblwgeom.so.1.3": No such
> file or directory
> CONTEXT:  SQL statement "SELECT postgis_lib_version()"
> 
> Only version I have installed right now is 8.3.
> 

ln -s /usr/lib/postgresql//liblwgeom.so.1.3 /usr/lib/postgresql-8.3/lib/postgis-1.4.so
Its a nasty fix, but it seems like there is no more liblwgeom.so 
Comment 4 Burak Arslan 2009-10-09 08:52:21 UTC
in my case, this was caused by not slotting the template_gis database.

when creating a gis-enabled database, use the 

psql ${db_name} -f /usr/share/postgresql-${version}/contrib/postgis.sql
psql ${db_name} -f /usr/share/postgresql-${version}/contrib/spatial_ref_sys.sql

commands instead of

createdb ${db_name} -t template_gis

in some versions of postgis, you have lwpostgis.sql instead of postgis.sql.
Comment 5 Aaron W. Swenson gentoo-dev 2011-05-01 17:39:15 UTC
  01 May 2011; Aaron W. Swenson <titanofold@gentoo.org>
  +postgis-1.5.2-r1.ebuild, +files/postgis_dbs, metadata.xml:
  Fixes bug 273960, 285082, 296172, 314243, 325113 and 339312