package (#21) - Error installing pgrouting-1.0 with driving distance package on opensuse and ubuntu (#53) - Message List
After building and compiling I get the following error message in pgadmin-1.6.3 when I try to import the sql file 'routing_dd.sql' for the driving_distance algorithm:
ERROR: Could not load library /usr/lib/postgresql/librouting_dd.so: undefined symbol: _ZN4CGAL17precondition_failEPKcS1_i
The libraries 'librouting.so' and 'librouting_dd.so' are located in 'usr/lib/postgresql'. Importing the sqls for the core algorithms (astar, sstar, etc.) works well.
Any ideas?
-
Message #200
Hi,
It looks like there is a problem with finding of CGAL. Make sure that CGAL library and headers are reachable.
anton10/17/07 08:57:02 (3 years ago)-
Message #202
I´ve copied all CGAL libs (*.so) from "/opt/xyz/built/CGAL-3.3.1/lib/i686_Linux-2.6_g++-4.1.2" to "/usr/lib/postgresql" and to "/usr/lib" too (to make sure). CGAL headers are in "/usr/include/CGAL". I´ve restarted postgresql, but I still get the same error message. Maybe an incompatiblity issue? I´m using opensuse-10.2 an postgres-8.1.9.
charon10/17/07 16:29:59 (3 years ago)-
Message #203
Can you tell me how did you compile CGAL? Did you use interactive installation?
anton10/17/07 16:34:41 (3 years ago)-
Message #204
I used the command from online manual: "/opt/xyz/built/CGAL-3.3.1# ./install_cgal --prefix=/usr --with-boost=n --without-autofind -ni /usr/bin/g++" No interaction was needed.
charon10/17/07 17:12:53 (3 years ago)-
Message #205
Well, I didn't try it with CGAL version 3.3.1 yet. Just give me few days and I will try it, 'cause I think it could be a reason.
Can you try to downgrade to CGAL version 3.2.1?
anton10/18/07 10:25:13 (3 years ago)-
Message #269
I have the similar error. I used CGAL version 3.2.1.
akkcy11/28/07 14:28:51 (3 years ago) -
Message #283
I´ve downgraded to CGAL-3.2.1, as you said. Here comes a similiar error:
ERROR: could not load library "/usr/lib/postgresql/librouting_dd.so": /usr/lib/postgresql/librouting_dd.so: undefined symbol: _ZN4CGALmiERKNS_8MP_FloatES2_
So, what do I wrong? :-(
charon12/10/07 03:52:58 (3 years ago)-
Message #285
Well, this error sounds better :)
For me it looks like it can not find libCGAL.so file.
anton12/10/07 13:16:00 (3 years ago)-
Message #289
Can you post your system, path configuration for cgal, versions of your postgresql server, postgis and needed libraries, please? I´ve no idea, what to do now... :-(
charon12/10/07 20:54:35 (3 years ago)-
Message #292
We tested it with many OSes (CentOS 5, Ubuntu 7.04 and 7.10, Windows XP) and with different versions of PostgreSQL (8.1.4, 8.1.9, 8.2.5) and PostGIS (1.2.1 and 1.3.2). But we use only 3.2.1 version of CGAL.
anton12/11/07 00:29:59 (3 years ago)-
Message #293
And where do have located your CGAL libs? In /usr/lib/postgresql or /usr/lib or /usr/lib/CGAL?
charon12/11/07 00:33:57 (3 years ago)-
Message #299
In case of CentOS they are in /usr/local/lib. But cmake searches for them at /usr/lib, usr/lib/CGAL, /usr/local/lib, /usr/local/lib/CGAL, /usr/lib64, /usr/lib64/CGAL, /usr/local/lib64 and /usr/local/lib64/CGAL.
anton12/11/07 09:57:45 (3 years ago)-
Message #353
Ok, tested the build process now for different clean (!) linux distributions in my VMware-Player:
opensuse-10.3, ubuntu-7.4 and ubuntu-7.10
...and end up always in the same error situation:
opensuse-10.3:
ERROR: could not load library "/usr/lib/postgresql/routing_dd.so": /usr/lib/postgresql/routing_dd.so: undefined symbol: _ZN4CGALmiERKNS_8MP_FloatES2_
ubuntu-7.04, ubuntu-7.10:
ERROR: could not load library "/usr/lib/postgresql/8.2/lib/routing_dd.so": /usr/lib/postgresql/8.2/lib/routing_dd.so: undefined symbol: _ZN4CGALmiERKNS_8MP_FloatES2_
In case of ubuntu-7.04 (the easiest one) I did simply the following:
1. install packages:
#sudo apt-get install postgresql-server-dev-8.2 postgresql-8.2
#sudo apt-get install build-essential subversion cmake libboost-graph* libgeos-dev proj flex
#sudo apt-get install libcgal1 libcgal-dev (system uses CGAL-3.2.1 here and puts it to /usr/lib!!!)
2. build postgis-1.3.2 (no errors!!!)
3. build pgrouting-1.01
- with target "routing" (no errors!!!)
- with target "routing_dd" (CGAL was found, no errors!!!)
4. copy "librouting_dd.so" from usr/lib to /usr/lib/postgresql/8.2/lib and rename it to "routing_dd.so"
5. psql -U postgres -f /usr/share/postlbs/routing.sql template-postgis-1.3.2-pgrouting-1.01 (no errors!!!)
6. psql -U postgres -f /usr/share/postlbs/routing_dd.sql template-postgis-1.3.2-pgrouting-1.01 (here comes the above error!!!)
Here is the default pg_config created by ubuntu package installer:
BINDIR = /usr/lib/postgresql/8.2/bin DOCDIR = /usr/share/doc/postgresql-doc-8.2 INCLUDEDIR = /usr/include/postgresql PKGINCLUDEDIR = /usr/include/postgresql INCLUDEDIR-SERVER = /usr/include/postgresql/8.2/server LIBDIR = /usr/lib PKGLIBDIR = /usr/lib/postgresql/8.2/lib LOCALEDIR = /usr/share/locale MANDIR = /usr/share/postgresql/8.2/man SHAREDIR = /usr/share/postgresql/8.2 SYSCONFDIR = /etc/postgresql PGXS = /usr/lib/postgresql/8.2/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--build=i486-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/postgresql-8.2' '--disable-maintainer-mode' '--disable-dependency-tracking' '--srcdir=.' '--mandir=/usr/share/postgresql/8.2/man' '--with-docdir=/usr/share/doc/postgresql-doc-8.2' '--datadir=/usr/share/postgresql/8.2' '--bindir=/usr/lib/postgresql/8.2/bin' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-openssl' '--with-gnu-ld' '--with-tclconfig=/usr/lib/tcl8.4' '--with-tkconfig=/usr/lib/tk8.4' '--with-includes=/usr/include/tcl8.4' '--with-pgport=5432' 'CFLAGS=-g -Wall -O2 -fPIC' 'LDFLAGS=-Wl,--as-needed' 'CC=cc' 'CPPFLAGS=' 'build_alias=i486-linux-gnu' CC = cc CPPFLAGS = -D_GNU_SOURCE -I/usr/include/tcl8.4 CFLAGS = -g -Wall -O2 -fPIC -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g CFLAGS_SL = -fpic LDFLAGS = -Wl,--as-needed LDFLAGS_SL = LIBS = -lpgport -lpam -lssl -lcrypto -lkrb5 -lcom_err -lz -lreadline -lcrypt -ldl -lm VERSION = PostgreSQL 8.2.5
So, what do I wrong? I coudn´t reproduce your test results with three different distributions for the driving distance routing_dd library. Any help/suggestion would be appreaciated! :-)
charon01/13/08 10:33:33 (3 years ago)-
Message #356
Gosh! We still have routing_dd.so instead of librouting_dd.so! I will fix it immediately.
anton01/15/08 10:28:44 (3 years ago) -
Message #357
Did you ever tried to run "install_cgal -i" and then check dependencies?
anton01/15/08 10:43:43 (3 years ago)-
Message #361
No, I did not. I strictly followed your install instructions. Ubuntu downloads lots of additional libraries during installing packages libcgal1 libcgal-dev (CGAL-3.2.1). So, I think there is everything in place right now. :-/
Starting "install_cgal -i" on opensuse I get the following screen:
** OS: i686_Linux-2.6 ** ** Compiler: GNU 4.2.1 ** ** Support for: BOOST and BOOST_PROGRAM_OPTIONS. ** ** ** ** Compiler is NOT supported by CGAL. ** ** The setup has been tested ok. ** ** ** ** Libs built: 10 Jan 18:08 ** ** ** ** <C> Compiler Menu ** ** <S> Support Menu ** ** <T> Test (and save) setup ** ** <A> Run all setup tests (no cache) ** ** ** ** <B> Build CGAL Libraries ** ** <I> Install Menu ** ** ** ** <Q> Back to OS ** ** ** ** Your Choice: **
So, could it be a compiler version problem? opensuse-10.3 uses gnu-4.2.1, ubuntu-7.04 uses gnu-4.1.2. Which compiler version do you use?
charon01/15/08 18:00:37 (3 years ago)-
Message #362
Well, yeah, I believe in Ubuntu also, but we are trying to find the reason of failure, right? I need to determine the reason of CGAL inconsistance in your case.
So, please, try to uninstall all CGAL related packages, then download the source code from www.cgal.org and try to run "install_cgal -i".
anton01/15/08 18:07:59 (3 years ago)-
Message #363
Sorry, I edited my post above one more time. As you can see, my compiler version is NOT supported by cgal interactive mode on opensuse. I try to install g++-4.1.1 instead of g++-4.2.1 and will try again. Do you agree? In opensuse I have only the downloaded cgal source package, because cgal does not exist in opensuse package manager repository.
charon01/15/08 18:47:17 (3 years ago) -
Message #385
Okay, I´ve compiled CGAL-3.2.1 with g++-3.4 and built pgRouting again on ubuntu-7.04, because CGAL-3.2.1 obviously does only work correctly with g++-4.x compilers (see "install_cgal -i"). No chance, same error, what could be the next step? :-/
charon01/20/08 20:47:28 (3 years ago)-
Message #389
Can you try the VM we made for a FOSS4G workshop?
It is here - http://files.postlbs.org/foss4g2007/W-12/foss4g_w12.zip
It is Xubuntu and it has all libraries installed.
anton01/21/08 11:26:19 (3 years ago)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-