[pgrouting-dev] Issue with compiling 64-bit under mingw64
Paragon Corporation
lr at pcorp.us
Mon Apr 8 09:22:14 PDT 2013
I suspect the reason it worked fine for the mingw64-w32 is because I don't
think MINGW64 is defined for the mingw64-w32 chain so was skipping that
section anyway.
Remember this ticket you helped me with:
http://trac.osgeo.org/postgis/ticket/1668
I had started off using __MINGW64__ and had to change to
__MINGW64_VERSION_MAJOR because the MINGW64 is only defined for the 64-bit
chain.
http://trac.osgeo.org/postgis/changeset/11218
Hope that helps,
Regina
-----Original Message-----
From: pgrouting-dev-bounces at lists.osgeo.org
[mailto:pgrouting-dev-bounces at lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Monday, April 08, 2013 9:18 AM
To: pgrouting-dev at lists.osgeo.org
Subject: Re: [pgrouting-dev] Issue with compiling 64-bit under mingw64
On 4/8/2013 4:06 AM, Paragon Corporation wrote:
> Yeh it passes all tests on 64-bit
>
> So I guess just need to figure out what to do with the line part.
>
> #ifdef __MINGW64__
> #define ELOG_H
> #include <winsock2.h>
> #endif
Ok, so I guess the obvious question for me is does it work on 32 bit without
this. Maybe it is just old cruft that we don't need in either tree with the
current tools.
-Steve
> -----Original Message-----
> From: pgrouting-dev-bounces at lists.osgeo.org
> [mailto:pgrouting-dev-bounces at lists.osgeo.org] On Behalf Of Paragon
> Corporation
> Sent: Monday, April 08, 2013 4:01 AM
> To: 'pgRouting developers mailing list'
> Subject: Re: [pgrouting-dev] Issue with compiling 64-bit under mingw64
>
> Okay got it to compile
>
> 1) I had a dirty tree so restarted from scratch and then I started to
> get the error you got even without the -DWITH_TSP=ON
>
> 2) For 64-bit I guess we can't have this line
>
> #ifdef __MINGW64__
> #define ELOG_H
> #include <winsock2.h>
> #endif
>
> I took that out and then it compiled okay -- so maybe you should only
> check for the 32-bit case there (I forget what the flag is)
>
>
> I still need to run the regression, but its now generating the tsp dll
> for 64-bit with
>
> cmake -G "MSYS Makefiles" -DWITH_DD=ON ..
> make && make install
>
> Thanks,
> Regina
>
>
>
> -----Original Message-----
> From: pgrouting-dev-bounces at lists.osgeo.org
> [mailto:pgrouting-dev-bounces at lists.osgeo.org] On Behalf Of Paragon
> Corporation
> Sent: Monday, April 08, 2013 3:16 AM
> To: 'pgRouting developers mailing list'
> Subject: Re: [pgrouting-dev] Issue with compiling 64-bit under mingw64
>
> Okay just checked my ming32 and I was wrong,
>
> It still builds the librouting_tsp.dll without the -DWITH_TSP=ON
>
> If I take it out of my ming64, then no attempt at building the tsp dll
> seems to be done, but it compiles the others.
>
> I wonder if the issue is that a 32-bit lib is sneaking in somewhere.
> That's the occupational hazard of using 32-bit tools to build a 64-bit
library.
>
> When it comes across a 32-bit with a name it thinks it needs, things
> get very confusing.
>
>
> Thanks,
> Regina
> -----Original Message-----
> From: pgrouting-dev-bounces at lists.osgeo.org
> [mailto:pgrouting-dev-bounces at lists.osgeo.org] On Behalf Of Paragon
> Corporation
> Sent: Monday, April 08, 2013 2:53 AM
> To: 'pgRouting developers mailing list'
> Subject: Re: [pgrouting-dev] Issue with compiling 64-bit under mingw64
>
> Not off hand. I can look again and rebuild. When I pulled that was
> the latest without jumping into 4.6 GCC. With 4.6 GCC I had major
> issues with dealing with C++ code (particularly Geos) with it randomly
> crashing so avoided it like the plague.
>
> I thought both my ming32 and ming64 are running the same prerelease
> versions though
>
> My ming64 compiles fine by taking out the
>
> -DWITH_TSP=ON
>
> But then it doesn't regress because the create extension seems to load
> tsp functions.
>
> I'll have to double-check my ming32, but as I recall if I take out the
> -DWITH_TSP it also fails the tests because its missing the tsp dll.
>
> Thanks,
> Regina
>
> -----Original Message-----
> From: pgrouting-dev-bounces at lists.osgeo.org
> [mailto:pgrouting-dev-bounces at lists.osgeo.org] On Behalf Of Stephen
> Woodbridge
> Sent: Sunday, April 07, 2013 8:51 PM
> To: pgrouting-dev at lists.osgeo.org
> Subject: Re: [pgrouting-dev] Issue with compiling 64-bit under mingw64
>
> Regina,
>
> I just noticed that:
>
> woodbri at imaptools /C/ming64/projects/pgrouting/build/src/tsp/src
> $ gcc --version
> gcc.exe (GCC) 4.5.4 20111030 (prerelease) [svn/rev.180676 -
> mingw-w64/oz] Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There
> is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
>
> our version of the gcc is a prerelease, do you know if there is a new
> version that might be better? I looked at the sourceforge but it has a
> mess of versions and I think it better is we stay in sync with one
another.
>
> -Steve
>
> On 4/7/2013 8:19 PM, Stephen Woodbridge wrote:
>> 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/s
>> h
>> ooting_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/D
>> e
>> pendInfo.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/dijkst
>> r
>> a.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.
>> c
>> make
>> --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
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
More information about the pgrouting-dev
mailing list