[pgrouting-dev] Problems linking on mingw64 between boost, cgal and threads
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Mar 12 08:34:32 PDT 2013
Hi Sanak,
I'm still have an issue with this. Hopefully I followed your changes
correctly:
In my msys.bat shell I added the to the path: /c/ming64/mingw64/bin/, I
have /c/ming64/ and /c/ming32/ trees setup so I can build on either.
start cmd
gcc -v # is found and run
bootstrap.bat gcc # fails
bootstrap.bat mingw # fails
exit
$ cat tools/build/bjam.log
###
### Using 'msvc' toolset.
###
c:\ming64\projects\boost_1_46_1\tools\build\v2\engine\src>if exist
bootstrap rd /S /Q bootstrap
c:\ming64\projects\boost_1_46_1\tools\build\v2\engine\src>md bootstrap
c:\ming64\projects\boost_1_46_1\tools\build\v2\engine\src>cl /nologo /GZ
/Zi /MLd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG kernel32.lib
advapi32.lib user32.lib /Febootstrap\jam0 command.c compile.c debug.c
execnt.c expand.c filent.c glob.c hash.c hdrmacro.c headers.c jam.c
jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c
parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c
variable.c modules.c strings.c filesys.c builtins.c md5.c pwd.c class.c
w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c
modules/property-set.c modules/sequence.c modules/order.c
I looked at tools/build/v2/engine/src/build.bat but I'm not very
familiar with windows bat files.
-Steve
On 3/12/2013 9:15 AM, sanak wrote:
> Hi Stephen,
> I updated MinGW32/64 build instruction to my "mingw" branch,
> and checked that MinGW64-bit build successed. (but not tested)
> https://github.com/sanak/pgrouting4w/commit/2a660524b53bcd80005e52917af5b32b31749559
> so, retry from boost build about ISSUE1. (Thanks Pieter!)
> Regards,
> 2013/3/12 Stephen Woodbridge <woodbri at swoodbridge.com
> <mailto:woodbri at swoodbridge.com>>
>
> Hi all,
>
> I'm stuck at the moment trying to link the pgrouting driving
> directions module using mingw 64 bit. See the issues below. So if
> anyone has any thoughts on this it would be appreciated. I will
> check the current state of the files into my branch in the morning
> here (GMT-5) if you are setup to reproduce this. It is too late to
> do it with a clear head tonight. I'll also move it back to Linux and
> try again there as I have changed a lot of files.
>
> Thanks,
> -Steve
>
> I have followed Sanak's directions from:
> https://github.com/sanak/__pgrouting4w/blob/master/BUILD.__mingw64
> <https://github.com/sanak/pgrouting4w/blob/master/BUILD.mingw64>
>
> ISSUE 1:
>
> I first installed boost_1_51.zip but ran into problems compiling so
> installed boost_1_46_1.zip as he suggested. I was able to bootstrap
> 1_51 and get a bjam.exe without a problem. But I could not get
> 1_46_1 to bootstrap :(
>
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation. All rights reserved.
>
> c:\ming64\projects\boost_1_46___1>bootstrap.bat mingw
> Building Boost.Jam build engine
> 'cl' is not recognized as an internal or external command,
> operable program or batch file.
>
> Failed to build Boost.Jam build engine.
> Please consult bjam.log for furter diagnostics.
>
> You can try to obtain a prebuilt binary from
>
> http://sf.net/project/__showfiles.php?group_id=7586&__package_id=72941
> <http://sf.net/project/showfiles.php?group_id=7586&package_id=72941>
>
> Also, you can file an issue at http://svn.boost.org
> Please attach bjam.log in that case.
>
> c:\ming64\projects\boost_1_46___1>
>
> So I built 1_46_1 using the bjam.exe that I built in 1_51 and it
> seems to have worked ok, but maybe that is part of the problem.
>
> ISSUE 2:
>
> Is the follow mess from the linker
>
> Scanning dependencies of target routing_dd
> [ 80%] Building C object
> core/driving_distance/src/__CMakeFiles/routing_dd.dir/__alpha.c.obj
> [ 86%] Building CXX object
> core/driving_distance/src/__CMakeFiles/routing_dd.dir/__alpha_drivedist.cpp.obj
> In file included from
> c:/ming64/projects/pgx64/pg92/__include/postgresql/server/pg___config_os.h:37:0,
> from
> c:/ming64/projects/pgx64/pg92/__include/postgresql/server/c.h:__87,
> from
> c:/ming64/projects/pgx64/pg92/__include/postgresql/server/__postgres.h:47,
> from
> c:/ming64/projects/pgrouting/__core/driving_distance/src/__alpha.h:27,
> from
> c:/ming64/projects/pgrouting/__core/driving_distance/src/__alpha_drivedist.cpp:46:
> c:\ming64\mingw64\bin\../lib/__gcc/x86_64-w64-mingw32/4.5.4/.__./../../../x86_64-w64-mingw32/__include/winsock2.h:13:2:
> warning: #warning Please include winsock2.h before windows.h
> [ 93%] Building CXX object
> core/driving_distance/src/__CMakeFiles/routing_dd.dir/__boost_drivedist.cpp.obj
> [100%] Building C object
> core/driving_distance/src/__CMakeFiles/routing_dd.dir/__drivedist.c.obj
> Linking CXX shared library ../../../lib/librouting_dd.dll
> Creating library file: ../../../lib/librouting_dd.__dll.a
> c:/ming64/msys/local/lib/__libboost_thread-mgw45-mt-1_46___1.a(thread.o):
> duplicate section
> `.data$_ZTVN5boost16exception___detail10clone_implINS0___19error_info_injectorISt9bad___allocEEEE[vtable
> for
> boost::exception_detail::__clone_impl<boost::exception___detail::error_info_injector<__std::bad_alloc>
> >]' has different size
> c:/ming64/msys/local/lib/__libCGAL.a(all_files.cpp.obj):__all_files.cpp:(.text+0xf898):
> undefined reference to `boost::system::generic___category()'
> c:/ming64/msys/local/lib/__libCGAL.a(all_files.cpp.obj):__all_files.cpp:(.text+0xf8a4):
> undefined reference to `boost::system::generic___category()'
> c:/ming64/msys/local/lib/__libCGAL.a(all_files.cpp.obj):__all_files.cpp:(.text+0xf8b0):
> undefined reference to `boost::system::system___category()'
> collect2: ld returned 1 exit status
> make[2]: *** [lib/librouting_dd.dll] Error 1
> make[1]: ***
> [core/driving_distance/src/__CMakeFiles/routing_dd.dir/all] Error 2
> make: *** [all] Error 2
> _________________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org <mailto:pgrouting-dev at lists.osgeo.org>
> http://lists.osgeo.org/__mailman/listinfo/pgrouting-dev
> <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