package (#21) - Error installing pgrouting-1.0 with driving distance package on opensuse and ubuntu (#53) - Message List

Error installing pgrouting-1.0 with driving distance package on opensuse and ubuntu

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.

    • 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.

      • Message #203

        Can you tell me how did you compile CGAL? Did you use interactive installation?

        • 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.

          • 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?

            • Message #269

              I have the similar error. I used CGAL version 3.2.1.

            • 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? :-(

              • Message #285

                Well, this error sounds better :)

                For me it looks like it can not find libCGAL.so file.

                • 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... :-(

                  • 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.

                    • Message #293

                      And where do have located your CGAL libs? In /usr/lib/postgresql or /usr/lib or /usr/lib/CGAL?

                      • 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.

                        • 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! :-)

                          • Message #356

                            Gosh! We still have routing_dd.so instead of librouting_dd.so! I will fix it immediately.

                          • Message #357

                            Did you ever tried to run "install_cgal -i" and then check dependencies?

                            • 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?

                              • 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".

                                • 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.

                                • 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? :-/