building perl swig with MingW

3 messages Options
Embed this post
Permalink
guillaume huby

building perl swig with MingW

Reply Threaded More More options
Print post
Permalink
Hello,

I experience some troubles building perl bindings on MingW.
Here is my config :

Windows XP;
MingW 5.1.6 + MSys;
Gdal1.6.2 sources from website;
ActivePerl 5.10;

I successfully built gdal library using MingW. Then I build perl bindings :

perl Makefile.pl -> everything looks fine;
dmake -> no error message;
dmake test -> error message :
<PerlPath>\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/gdal....
#   Failed test 'use Geo::GDAL;'
#   at t/gdal.t line 2.
#     Tried to use 'Geo::GDAL'.
#     Error:  Can't load '<Gdal_source_path>\swig\perl\blib\arch/auto/Geo/OGR/OGR.dll' for module Geo::OGR: load_file: Access to this memory location is not valid at <PerlPath>/lib/DynaLoader.pm line 202.
#  at <Gdal_source_path>\swig\perl\blib\lib/Geo/OGR.pm line 12
# Compilation failed in require at <Gdal_source_path>\swig\perl\blib\lib/Geo/GDAL.pm line 571.
# BEGIN failed--compilation aborted at t/gdal.t line 2.
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
Name "swig_runtime_data::type_pointer3" used only once: possible typo at <PerlPath>/lib/DynaLoader.pm line 225.
Undefined subroutine &Geo::GDAL::GetDriver called at t/gdal.t line 57.
# Looks like you failed 1 test of 1.

The "<Gdal_source_path>\swig\perl\blib\arch/auto/Geo/OGR/OGR.dll" file successfully pass dependency walker test.

Does anyone has an idea of what went wrong ? Did I missed something somewhere ?

Thanks for replies !

Regards,
Guillaume.

_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Ari Jolma-2

Re: building perl swig with MingW

Reply Threaded More More options
Print post
Permalink
guillaume huby kirjoitti:
> Hello,
>
> I experience some troubles building perl bindings on MingW.
> Here is my config :
>
> Windows XP;
> MingW 5.1.6 + MSys;
> Gdal1.6.2 sources from website;
> ActivePerl 5.10;

The problem is that ActivePerl is compiled with VC and you can't mix
MinGW,which uses gcc, with that.

Compiling Perl with MinGW is not difficult, however, and there are
binary distributions too.

Sorry for being so slow to answer.

Cheers,

Ari

_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
guillaume huby

Re: building perl swig with MingW

Reply Threaded More More options
Print post
Permalink
Dear Ari,

On Wed, Oct 28, 2009 at 3:53 PM, Ari Jolma <[hidden email]> wrote:
guillaume huby kirjoitti:

Hello,

I experience some troubles building perl bindings on MingW.
Here is my config :

Windows XP;
MingW 5.1.6 + MSys;
Gdal1.6.2 sources from website;
ActivePerl 5.10;

The problem is that ActivePerl is compiled with VC and you can't mix MinGW,which uses gcc, with that.

Compiling Perl with MinGW is not difficult, however, and there are binary distributions too.


Thank you for your reply !

As a first turn around, I used the compiled files of Geo::Gdal of GeoInformatica in my ActivePerl directories. It is not very clean but it works well !

I did not found time to compile perl with MinGW yet, but I hope to be able to try soon.

Cheers,
Guillaume.

_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev