[pgrouting-dev] Issue with compiling 64-bit under mingw64

Stephen Woodbridge woodbri at swoodbridge.com
Sun Apr 7 17:19:42 PDT 2013


Ok, I just got back and I have the same problem on 64bit now that I have 
a system to check it on.

-DWITH_TSP=ON  should not be included any more. I may have forgotten to 
take it out of makepgroutingw64.sh

After looking at the compile error on 64 bit for 6 hours, I'm either 
totally missing something obvious or this is looking like GNU compiler bug.

If you run the tools/makepgroutingw64.sh and then after it bombs:

cd build
make VERBOSE=1

and this will should you something like:

...
Scanning dependencies of target routing_tsp
[ 66%] Building C object src/tsp/src/CMakeFiles/routing_tsp.dir/tsp.c.obj
[ 73%] Building C object src/tsp/src/CMakeFiles/routing_tsp.dir/tsplib.c.obj
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'findEulerianPath':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: error: 'ERROR' 
undeclared (first use in this function)
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: note: each 
undeclared identifier is reported only once for each function it appears in
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'find_tsp_solution':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:446:18: error: 'FATAL' 
undeclared (first use in this function)
make[2]: *** [src/tsp/src/CMakeFiles/routing_tsp.dir/tsplib.c.obj] Error 1
make[1]: *** [src/tsp/src/CMakeFiles/routing_tsp.dir/all] Error 2
make: *** [all] Error 2

woodbri at imaptools /c/ming64/projects/pgrouting
$ cd build

woodbri at imaptools /c/ming64/projects/pgrouting/build
$ make VERBOSE=1
/C/ming64/msys/bin/cmake.exe -H/C/ming64/projects/pgrouting 
-B/C/ming64/projects/pgrouting/build --check-build-system 
CMakeFiles/Makefile.cmake 0
/C/ming64/msys/bin/cmake.exe -E cmake_progress_start 
/C/ming64/projects/pgrouting/build/CMakeFiles 
/C/ming64/projects/pgrouting/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/c/ming64/projects/pgrouting/build'
make -f src/shooting_star/src/CMakeFiles/shooting_star.dir/build.make 
src/shooting_star/src/CMakeFiles/shooting_star.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting 
/C/ming64/projects/pgrouting/src/shooting_star/src 
/C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/src/shooting_star/src 
/C/ming64/projects/pgrouting/build/src/shooting_star/src/CMakeFiles/shooting_star.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f src/shooting_star/src/CMakeFiles/shooting_star.dir/build.make 
src/shooting_star/src/CMakeFiles/shooting_star.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
make[2]: Nothing to be done for 
`src/shooting_star/src/CMakeFiles/shooting_star.dir/build'.
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles  11 12
[ 13%] Built target shooting_star
make -f src/trsp/src/CMakeFiles/trsp.dir/build.make 
src/trsp/src/CMakeFiles/trsp.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting /C/ming64/projects/pgrouting/src/trsp/src 
/C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/src/trsp/src 
/C/ming64/projects/pgrouting/build/src/trsp/src/CMakeFiles/trsp.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f src/trsp/src/CMakeFiles/trsp.dir/build.make 
src/trsp/src/CMakeFiles/trsp.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
make[2]: Nothing to be done for `src/trsp/src/CMakeFiles/trsp.dir/build'.
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles  13 14 15
[ 33%] Built target trsp
make -f src/astar/src/CMakeFiles/astar.dir/build.make 
src/astar/src/CMakeFiles/astar.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting /C/ming64/projects/pgrouting/src/astar/src 
/C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/src/astar/src 
/C/ming64/projects/pgrouting/build/src/astar/src/CMakeFiles/astar.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f src/astar/src/CMakeFiles/astar.dir/build.make 
src/astar/src/CMakeFiles/astar.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
make[2]: Nothing to be done for `src/astar/src/CMakeFiles/astar.dir/build'.
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles  1 2
[ 46%] Built target astar
make -f src/dijkstra/src/CMakeFiles/dijkstra.dir/build.make 
src/dijkstra/src/CMakeFiles/dijkstra.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting 
/C/ming64/projects/pgrouting/src/dijkstra/src 
/C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/src/dijkstra/src 
/C/ming64/projects/pgrouting/build/src/dijkstra/src/CMakeFiles/dijkstra.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f src/dijkstra/src/CMakeFiles/dijkstra.dir/build.make 
src/dijkstra/src/CMakeFiles/dijkstra.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
make[2]: Nothing to be done for 
`src/dijkstra/src/CMakeFiles/dijkstra.dir/build'.
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles  3 4
[ 60%] Built target dijkstra
make -f CMakeFiles/routing.dir/build.make CMakeFiles/routing.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting /C/ming64/projects/pgrouting 
/C/ming64/projects/pgrouting/build /C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/CMakeFiles/routing.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f CMakeFiles/routing.dir/build.make CMakeFiles/routing.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
make[2]: Nothing to be done for `CMakeFiles/routing.dir/build'.
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles
[ 60%] Built target routing
make -f src/tsp/src/CMakeFiles/routing_tsp.dir/build.make 
src/tsp/src/CMakeFiles/routing_tsp.dir/depend
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_depends "MSYS Makefiles" 
/C/ming64/projects/pgrouting /C/ming64/projects/pgrouting/src/tsp/src 
/C/ming64/projects/pgrouting/build 
/C/ming64/projects/pgrouting/build/src/tsp/src 
/C/ming64/projects/pgrouting/build/src/tsp/src/CMakeFiles/routing_tsp.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make -f src/tsp/src/CMakeFiles/routing_tsp.dir/build.make 
src/tsp/src/CMakeFiles/routing_tsp.dir/build
make[2]: Entering directory `/c/ming64/projects/pgrouting/build'
/C/ming64/msys/bin/cmake.exe -E cmake_progress_report 
/C/ming64/projects/pgrouting/build/CMakeFiles 10
[ 66%] Building C object src/tsp/src/CMakeFiles/routing_tsp.dir/tsplib.c.obj
cd /C/ming64/projects/pgrouting/build/src/tsp/src && 
/c/ming64/mingw64/bin/gcc.exe  -Drouting_tsp_EXPORTS -O2 -g 
-frounding-math @CMakeFiles/routing_tsp.dir/includes_C.rsp   -o 
CMakeFiles/routing_tsp.dir/tsplib.c.obj   -c 
/C/ming64/projects/pgrouting/src/tsp/src/tsplib.c
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'findEulerianPath':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: error: 'ERROR' 
undeclared (first use in this function)
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: note: each 
undeclared identifier is reported only once for each function it appears in
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'find_tsp_solution':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:446:18: error: 'FATAL' 
undeclared (first use in this function)
make[2]: *** [src/tsp/src/CMakeFiles/routing_tsp.dir/tsplib.c.obj] Error 1
make[2]: Leaving directory `/c/ming64/projects/pgrouting/build'
make[1]: *** [src/tsp/src/CMakeFiles/routing_tsp.dir/all] Error 2
make[1]: Leaving directory `/c/ming64/projects/pgrouting/build'
make: *** [all] Error 2

So if I look at the commands that are getting executed you will notice 
above on the gcc.exe there is:

   @CMakeFiles/routing_tsp.dir/includes_C.rsp

This appears to be a way to include command line options from a file. So 
I just copied the options from the file to the commandline in the next 
command:

woodbri at imaptools /c/ming64/projects/pgrouting/build
$ cd /C/ming64/projects/pgrouting/build/src/tsp/src

woodbri at imaptools /C/ming64/projects/pgrouting/build/src/tsp/src
$ /c/ming64/mingw64/bin/gcc.exe  -Drouting_tsp_EXPORTS -O2 -g 
-frounding-math 
-Ic:/ming64/projects/pgx64/pg92/include/postgresql/server 
-IC:/ming64/projects/pgrouting/src/astar/src 
-IC:/ming64/projects/pgrouting/src/dijkstra/src 
-IC:/ming64/projects/pgrouting/src/shooting_star/src 
-IC:/ming64/projects/pgrouting/src/tsp/src 
-IC:/ming64/projects/pgrouting/src/driving_distance/src 
-IC:/ming64/projects/pgrouting/src/trsp/src 
-Ic:/ming64/msys/local/include/boost-1_46_1 
-Ic:/ming64/projects/pgx64/pg92/include/postgresql/server/port/win32 -o 
CMakeFiles/routing_tsp.dir/tsplib.c.obj   -c 
/C/ming64/projects/pgrouting/src/tsp/src/tsplib.c
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'findEulerianPath':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: error: 'ERROR' 
undeclared (first use in this function)
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: note: each 
undeclared identifier is reported only once for each function it appears in
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'find_tsp_solution':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:446:18: error: 'FATAL' 
undeclared (first use in this function)

And tried to convert the "C:" to "/c" in this command:

woodbri at imaptools /C/ming64/projects/pgrouting/build/src/tsp/src
$ /c/ming64/mingw64/bin/gcc.exe  -Drouting_tsp_EXPORTS -O2 -g 
-frounding-math 
-I/c/ming64/projects/pgx64/pg92/include/postgresql/server 
-I/c/ming64/projects/pgrouting/src/astar/src 
-I/c/ming64/projects/pgrouting/src/dijkstra/src 
-I/c/ming64/projects/pgrouting/src/shooting_star/src 
-I/c/ming64/projects/pgrouting/src/tsp/src 
-I/c/ming64/projects/pgrouting/src/driving_distance/src 
-I/c/ming64/projects/pgrouting/src/trsp/src 
-I/c/ming64/msys/local/include/boost-1_46_1 
-I/c/ming64/projects/pgx64/pg92/include/postgresql/server/port/win32 -o 
CMakeFiles/routing_tsp.dir/tsplib.c.obj   -c 
/C/ming64/projects/pgrouting/src/tsp/src/tsplib.c
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'findEulerianPath':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: error: 'ERROR' 
undeclared (first use in this function)
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:183:14: note: each 
undeclared identifier is reported only once for each function it appears in
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c: In function 
'find_tsp_solution':
c:/ming64/projects/pgrouting/src/tsp/src/tsplib.c:446:18: error: 'FATAL' 
undeclared (first use in this function)

Lets check that the file exists, and it does. This file gets included 
from postgres.h

$ /bin/find.exe /c/ming64/projects/pgx64/pg92/ -name postgres.h -print
/c/ming64/projects/pgx64/pg92/include/postgresql/server/postgres.h

$ /bin/find.exe /c/ming64/projects/pgx64/pg92/ -name elog.h -print
/c/ming64/projects/pgx64/pg92/include/postgresql/server/utils/elog.h

So I'm left with:

1. it works on 32 bit
2. the -Idirectory is included in the gcc
3. the include files exist in the correct places
4. gcc does not appear to be loading them, but I do not know why

Anyone run into this problem before?
Anyone have any ideas?

-Steve


More information about the pgrouting-dev mailing list