Giter Club home page Giter Club logo

Comments (12)

woodbri avatar woodbri commented on July 19, 2024

you need to make sure you have install the postgresql server devel package for you system

from osm2pgrouting.

aj07mm avatar aj07mm commented on July 19, 2024

yeah, definitely the problem. I installed the postgres 9.4 and it went further, now what happens is:

Linking CXX executable osm2pgrouting
Undefined symbols for architecture x86_64:
  "_PQclear", referenced from:
      Export2DB::createTables() in Export2DB.cpp.o
      Export2DB::exportNodes(std::__1::map<long long, osm::Node*, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, osm::Node*> > >&) in Export2DB.cpp.o
      Export2DB::exportRelations(std::__1::vector<osm::Relation*, std::__1::allocator<osm::Relation*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportWays(std::__1::vector<osm::Way*, std::__1::allocator<osm::Way*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportTypesWithClasses(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osm::Type*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, osm::Type*> > >&) in Export2DB.cpp.o
      Export2DB::createTopology() in Export2DB.cpp.o
  "_PQconnectdb", referenced from:
      Export2DB::connect() in Export2DB.cpp.o
  "_PQendcopy", referenced from:
      Export2DB::exportNodes(std::__1::map<long long, osm::Node*, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, osm::Node*> > >&) in Export2DB.cpp.o
      Export2DB::exportRelations(std::__1::vector<osm::Relation*, std::__1::allocator<osm::Relation*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportWays(std::__1::vector<osm::Way*, std::__1::allocator<osm::Way*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportTypesWithClasses(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osm::Type*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, osm::Type*> > >&) in Export2DB.cpp.o
  "_PQerrorMessage", referenced from:
      Export2DB::createTables() in Export2DB.cpp.o
      Export2DB::createTopology() in Export2DB.cpp.o
  "_PQexec", referenced from:
      Export2DB::createTables() in Export2DB.cpp.o
      Export2DB::dropTables() in Export2DB.cpp.o
      Export2DB::exportNodes(std::__1::map<long long, osm::Node*, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, osm::Node*> > >&) in Export2DB.cpp.o
      Export2DB::exportRelations(std::__1::vector<osm::Relation*, std::__1::allocator<osm::Relation*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportWays(std::__1::vector<osm::Way*, std::__1::allocator<osm::Way*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportTypesWithClasses(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osm::Type*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, osm::Type*> > >&) in Export2DB.cpp.o
      Export2DB::createTopology() in Export2DB.cpp.o
      ...
  "_PQfinish", referenced from:
      Export2DB::~Export2DB() in Export2DB.cpp.o
  "_PQputline", referenced from:
      Export2DB::exportNodes(std::__1::map<long long, osm::Node*, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, osm::Node*> > >&) in Export2DB.cpp.o
      Export2DB::exportRelations(std::__1::vector<osm::Relation*, std::__1::allocator<osm::Relation*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportWays(std::__1::vector<osm::Way*, std::__1::allocator<osm::Way*> >&, osm::Configuration*) in Export2DB.cpp.o
      Export2DB::exportTypesWithClasses(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osm::Type*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, osm::Type*> > >&) in Export2DB.cpp.o
  "_PQresultStatus", referenced from:
      Export2DB::createTables() in Export2DB.cpp.o
      Export2DB::createTopology() in Export2DB.cpp.o
  "_PQstatus", referenced from:
      Export2DB::connect() in Export2DB.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [osm2pgrouting] Error 1
make[1]: *** [CMakeFiles/osm2pgrouting.dir/all] Error 2
make: *** [all] Error 2

from osm2pgrouting.

aj07mm avatar aj07mm commented on July 19, 2024

Nevermind, i ended up using https://github.com/zzolo/osm2pgrouting-mac
a fork for mac. Thks for the feedback.

from osm2pgrouting.

dkastl avatar dkastl commented on July 19, 2024

Probably this small change will solve the problem, but we need to see, if this affects other operating systems: zzolo@dc7fdce

from osm2pgrouting.

aj07mm avatar aj07mm commented on July 19, 2024

One thing that i don't know is worth the attention here is an error that i had in the load with the mac version:

ERROR:  value "2171617416" is out of range for type integer

from osm2pgrouting.

sanak avatar sanak commented on July 19, 2024

I confirmed this issue on my macports environment.
The direct cause was that cmake/FindPostgreSQL.cmake can't find /opt/local/include/postgresql93/libpq-fe.h.
I tried to replace cmake/FindPostgreSQL.cmake to latest official cmake module (http://www.cmake.org/cmake/help/v3.2/module/FindPostgreSQL.html?#module:FindPostgreSQL ),
but it still fails with another error.
So, copying from pgrouting cmake/FindPostgreSQL.cmake, then adjusting it to search client header/library may be better to fix this issue.

from osm2pgrouting.

cvvergara avatar cvvergara commented on July 19, 2024

Osm data indices are bigint, maybe the code is storing them on int variables?. so the value 2171617416 is an ID and its out of range of integers but fit on int64_t. (aka long)

from osm2pgrouting.

Yetzederixx avatar Yetzederixx commented on July 19, 2024

On Ubuntu 14.04 installing libpq-dev and changing the include in Export2DB.h worked, but now I, and at least one other person on Gis Stack Exchange, get a bunch of linking errors. Apparently the solution is to add a -lpq somewhere, but I can't figure out where. The make output is very long so I dumped it into pastebin: http://pastebin.com/7ukNB3yn

from osm2pgrouting.

dkastl avatar dkastl commented on July 19, 2024

Well, I had no problems to create Ubuntu packages for 14.04, so it shouldn't be a problem to compile at least with Debian based distributions. You can find the package related configuration here:
https://github.com/pgRouting/osm2pgrouting-build/tree/master/debian

Debian rules file just makaes use of CMake helper, so the important information about dependencies is in the control file:

Build-Depends: debhelper (>= 7), cdbs, cmake, libboost-graph-dev, libpq-dev, libexpat1-dev

So libboost-graph-dev, libpq-dev, libexpat1-dev should be all you need beside a the compiler and build tools.

from osm2pgrouting.

aj07mm avatar aj07mm commented on July 19, 2024

I think the problem is due to the postgre version. I have this one installed: postgres (PostgreSQL) 9.3.6
The thing thou is that if i update my version it works for the osm2pgrouting, although the other softwares to run the "geosuite" maybe be compromised by the postgre version.

PS: Im using mac OSX 10.9.5

from osm2pgrouting.

woodbri avatar woodbri commented on July 19, 2024

Try doing locate libpq-fe.h and then symlink that to the directory where it expects to find it. This is probably the easiest way to temporarily fix the issue on your system. If you don't have a copy installed then you should try to locate what package is missing. On Ubuntu it is packaged in libpq-dev,

from osm2pgrouting.

aj07mm avatar aj07mm commented on July 19, 2024
aj07mms-MacBook-Air-8:frontend aj07mm$ locate libpq-fe.h 

WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:

  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.


this message is displayed even after i run the command "sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist"

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.