demo (#22) - ERROR: could not access file "$libdir/librouting (#241) - Message List

ERROR: could not access file "$libdir/librouting

Dear Forum,

I have some problems to get the $libdir/librouting.

With the code out of the svn-repository I do;

cmake -DWITH_DD=ON .

And get: Boost headers were found here: /usr/include Output directory for libraries is set to sh: pg_config: command not found Installation directory for libraries is set to sh: pg_config: command not found and for SQL files is set to /usr/share/postlbs -- Configuring done -- Generating done -- Build files have been written to: /home/anonymous/pgrouting

If I do a make

I get in red-colour: "Linking CXX shared library ../../../lib/librouting_dd.so " what seems to be an error ?? (Because of the red colour?)

I find librouting_dd.so in /home/anonymous/pgrouting/lib

and I write that path in my /etc/ld_so_config (and do ldconfig after that), but somehow pgrouting does not find that library if I try to load in routing_core.sql?

Does anybody know how to fix that please? Thano you very much, Kai

  • Message #848

    Maybe you're installing with the same CMake profile as before ... there is a cache file, which I don't remember the name now, which is created when you run cmake first time.

    • Message #849

      Hi Daniel, thank you for answering but unfortunately that wasn`t what the erroc creates (I deleted all the code and checked out a "clean" one again).

      Hmmmm.....really not easy.

      What I really don`t understand after a cmake .

      is: "Output directory for libraries is set to sh: pg_config: command not found" ?

      Might it has something to do with that I set a new path to cmake/FindPostgreSQL.cmake (I set there /usr/local/pgsql/include/server because otherwise my source-code-installation of postgresql is not found) ?

      And I wonder how I can find out the path for $libdir in routing_core.sql (I mean for which path $libdir stands for?)?

      Could be a solution to set the path static in the installation-files (but in which one?)?

      Best regards, Kai

      • Message #850

        Did you see this? http://pgrouting.postlbs.org/wiki/1.x/InstallationManual#Step2:CompilingthepgRoutinglibrary

           1. Add the library path (ie. /usr/local/pgsql/lib) to /etc/ld.co.conf
           2. Run ldconfig
        

        I remember there was a certain command for Debian-ish Linux. Did you run ldconfig afterall?

        Another point, did you install postgresql-server-dev-8.x?

        • Message #851

          Its really a miracle, meanwhile I have in my ld.so.conf.d:

          /lib/i486-linux-gnu

          /usr/lib/i486-linux-gnu

          /usr/lib

          /home/anonymous/CGAL-3.3.1

          /usr/local/lib

          /usr/local

          /usr/local/pgsql/bin/pg_config

          /home/anonymous/pgrouting/lib

          /usr/local/pgsql/lib

          And I did an ldconfig.

          but I still get an:

          psql:/usr/share/postlbs/routing_core.sql:53: ERROR: could not access file "$libdir/librouting": Datei oder Verzeichnis nicht gefunden

          With the library path you mean the path to PostgreSQL or pgrouting?

          After cmake, make, make install I do a updateb and then a locate librouting

          and I get:

          /home/anonymous/pgrouting/trunk/extra/driving_distance/src/CMakeFiles/CMakeRelink.dir/librouting_dd.so

          /home/anonymous/pgrouting/trunk/lib/librouting_dd.so

          /home/anonymous/pgrouting/trunk/lib/librouting.so

          /usr/lib/librouting_dd.so

          /usr/lib/librouting.so

          /usr/local/sh: pg_config: command not found/librouting_dd.so

          /usr/local/sh: pg_config: command not found/librouting.so

          This all worked on debian etch when I installed with apt-get install postgres......

          But I installed now postgresql-8.3.7.tar.gz (only that). PostgreSQL works fine, so does PostGIS, but no success with pgRouting. Puh......., really difficult, well I will do on.........

          • Message #852

            After a cmake shouldn't that be the problem:

            Output directory for libraries is set to sh: pg_config: command not found Installation directory for libraries is set to sh: pg_config: command not found

            It doesn`t know where to write to libraries to??? (Maybe)?

            • Message #853

              GREAT :-) ! I have got it, indeed it was a pg_config-problem.

              I did now:

              export PATH="$PATH:/usr/local/pgsql/bin"

              and then the pg_config-Command works. Thanks for the help, now up to the next steps :-)