Giter Club home page Giter Club logo

Comments (8)

dkastl avatar dkastl commented on July 21, 2024

pgRouting has a well maintained Docker repository and as far as I know they all images contain osm2pgrouting as well: https://github.com/pgRouting/docker-pgrouting/ . Could you maybe compare what is different in the way you are creating a Docker image?

from osm2pgrouting.

jmarca avatar jmarca commented on July 21, 2024

It seems maybe they ran into the same problem? For example, looking at the dockerfile for the Postgres 13 version,

https://github.com/pgRouting/docker-pgrouting/blob/c0ae2c671ed730157970f397e60d803cb972b209/13-3.0-3.1.0/extra/Dockerfile

They pin osm2pgrouting version to 2.3.6 and also fix the version of libpqxx:

ENV OSM2PGROUTING_VERSION 2.3.6

RUN apt update \
 && apt install -y \
        libpqxx-6.2 \
...

from osm2pgrouting.

cayetanobv avatar cayetanobv commented on July 21, 2024

These errors from compiler are because Libpqxx v7.x require C++17.
Related to issue #289

from osm2pgrouting.

cayetanobv avatar cayetanobv commented on July 21, 2024

This is not a bug. It's an improvement so I'm going to change the tag.

from osm2pgrouting.

jmarca avatar jmarca commented on July 21, 2024

from osm2pgrouting.

ildar15 avatar ildar15 commented on July 21, 2024

In addition to compile flag -std=c++17, I also had to change

diff --git a/src/osm_elements/osm2pgrouting.cpp b/src/osm_elements/osm2pgrouting.cpp
index e11fb2f..37e6232 100644
--- a/src/osm_elements/osm2pgrouting.cpp
+++ b/src/osm_elements/osm2pgrouting.cpp
@@ -140,7 +140,7 @@ int main(int argc, char* argv[]) {
                 cout << "Can't open database" << endl;
                 return 1;
             }
-            C.disconnect ();
+            C.close ();
         }catch (const std::exception &e){
             cerr << e.what() << std::endl;
             return 1;

with my version of pqxx:

user:build$ grep VERSION /usr/include/pqxx/version.hxx 
#ifndef PQXX_H_VERSION
#  define PQXX_VERSION "7.3.1"
#  define PQXX_VERSION_MAJOR 7
#  define PQXX_VERSION_MINOR 3
#  define PQXX_VERSION_CHECK                                                  \
    check_pqxx_version_##PQXX_VERSION_MAJOR##_##PQXX_VERSION_MINOR
PQXX_LIBEXPORT int PQXX_VERSION_CHECK() noexcept;

from osm2pgrouting.

cvvergara avatar cvvergara commented on July 21, 2024

@jmarca
Sorry for the delay, the PR is ready if you can review #292 and leave a comment on the PR
The most critical part is the change on the minimum standard for C++

  • C++ minimum standard depends on libpqxx
    • For version libpqxx 6: C++14
    • For version libpqxx 7: C++17 see here

I also modified FindPQXX that detects the version, can you verify that it works as it should.

from osm2pgrouting.

jmarca avatar jmarca commented on July 21, 2024

from osm2pgrouting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.