developer (#13) - Building PgRouting? Windows (#93) - Message List

Building PgRouting? Windows

Hey all,

In the other forums thread I mentioned our team was going to be trying to alter the PgRouting? code to handle many points at once. I'll have my tech lead look over that thread and make a decision on that.

In the mean time I'm the Guinea Pig to get the code compiling under windows on our work machines. And despite having the Instructions on the wiki (http://pgrouting.postlbs.org/wiki/1.x/WindowsInstallationManual) I am getting either bad target errors or compilation errors.

Here are the steps I've taken, and the results.

Installed MinGW from binary found at  http://sourceforge.net/project/showfiles.php?group_id=2435

Installed MSYS from binary found from  http://www.baldanders.info/spiegel/remark/archives/000209.shtml

  • Installed to C:\msys

Downloaded and ran the pthreads-w32-2-7-0-release.exe file found at  ftp://sources.redhat.com/pub/pthreads-win32/

Opened a MSYS window (note: things with a $ in front of them are now done inside the MSYS window)

  • non trivial tasks were redirected to files for reference
  • went to the pthreads-w32-2-7-0\Pre-built.2 directory in the MSYS window
  • $ cp include/*.h /mingw/include
  • $ cp lib/libpthreadGC2.a /mingw/lib/libpthread.a

Downloaded CMake from  http://www.cmake.org/HTML/Download.html

  • got the Windows Source 2.4.7
  • went to the cmake source directory
  • $ ./configure --prefix=C:/msys/local > CMAKE01.out
  • $ make > CMAKE02.out
  • $ make install > CMAKE03.out

Downloaded Boost 1.33 from  http://sourceforge.net/project/downloading.php?group_id=7586&use_mirror=internap&filename=boost_1_33_1.tar.bz2&16558049

  • used 1.33 over 1.34 as instructions said to

Compiled jam by using build.bat in the jam_src directory

Copied the exe file created into my path

  • $ cp bin.ntx86/bjam.exe /mingw/bin/

ran bjam on boost

  • $ bjam -sTOOLS=mingw "-sBUILD=release <runtime-link>static <threading>multi <native-wchar_t>on" --prefix=/c/msys/local install > BOOST01.out
  • $ mv /usr/local/include/boost-1_33_1/boost /usr/local/include/boost
  • $ rmdir /usr/local/include/boost-1_33_1

Got GAUL as linked from  http://gaul.sourceforge.net/

  • $ ./configure --enable-slang=no > GAUL01.out

Edited the Makefile(s) as instructed by ... the instructions Build the system

  • $ make > GAUL02.out
  • $ make install > GAUL03.out

Downloaded CGAL from  http://www.cgal.org

  • installed it
  • $ ./install_cgal --prefix=/usr/local/cgal --with-BOOST --BOOST_INCL_DIR=/usr/local/include --BOOST_LIB_DIR=/usr/local/lib --without-autofind -ni /mingw/bin/g++ > CGAL01.out

the next steps the instructions say to do are not needed

  • the files are already in the correct location

Got the PgRouting? Source code

  • $ cmake -G"MSYS Makefiles" -DWITH_TSP=ON -DWITH_DD=ON . > PGROUTING01.out
  • can't find PostgreSQL or Boost, or GAUL, or CGAL .. alter txt files before calling?
  • edited CMakeCache.txt
    • Boost_include
    • CGAL_INCLUDE
    • CGAL_LIBRARIES
    • GAUL_LIBRARIES
    • POSTGRESQL_INCLUDE

ran cmake again, seemed to go ok.

Alter the .make files according to the instructions

run make on PgRouting?

  • $ make
  • core/src/CMakeFiles/routing.dir/build.make:229: *** multiple target patterns. Stop.
  • make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2
  • make: *** [all] Error 2

Error above.

If I don't alter the .make files after running it starts to compile and then errors in the code

  • [ 8%] Building C object core/src/CMakeFiles/routing.dir/dijkstra.obj

and prints out a lot of errors and ends with

  • make[2]: *** [core/src/CMakeFiles/routing.dir/dijkstra.obj] Error 1
  • make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2
  • make: *** [all] Error 2

Anyone have any idea why I'm getting compilation errors, or why it doesn't like me changing the .make files? And although we'd prefer to not build on windows the final product must work on a PostgreSQL installation on a windows machine.

  • Message #998

    I have reported this as a bug. I am getting this too. Were you able to resolve it though?