Subject: | build errors using Strawberry 5.24 |
Hello Ari,
This is related to https://rt.cpan.org/Ticket/Display.html?id=116577
I get to the point of building Geo::GDAL with Strawberry Perl 5.24 and get the first error below.
The build notes I have (which worked on perl 5.16 with gdal-1.10) say to comment out the "#include <iostream>" lines across the swig/perl/*.cpp files, but then I hit issues with macro expansion (see second log output).
Any ideas?
Thanks,
Shawn.
##### Initial error
dmake -S -f Makefile_Geo__GDAL
cp lib/Geo/GDAL.pm blib\lib\Geo/GDAL.pm
cp lib/Geo/GDAL/Const.pm blib\lib\Geo/GDAL/Const.pm
cp lib/Geo/OSR.pm blib\lib\Geo/OSR.pm
cp lib/Geo/OGR.pm blib\lib\Geo/OGR.pm
Running Mkbootstrap for GDAL ()
"C:\berrybrew\5.24.0_64_PDL\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "GDAL.bs"
"C:\berrybrew\5.24.0_64_PDL\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- GDAL.bs blib\arch\auto\Geo\GDAL\GDAL.bs 644
gcc -c -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/port -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/gcore -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/alg -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/ogr -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/ogr/ogrsf_frmts -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/frmts/vrt -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/apps -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"2.0101\" -DXS_VERSION=\"2.0101\" "-IC:\berrybrew\5.24.0_64_PDL\perl\lib\CORE" gdal_wrap.cpp
In file included from gdal_wrap.cpp:744:0:
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:45: error: expected ')' before '*' token
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:45: error: expected ')' before '*' token
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:45: error: expected ')' before '*' token
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:45: error: expected ')' before '*' token
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:29: error: expected ';' at end of member declaration
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:46: error: expected unqualified-id before ')' token
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:45: error: expected ';' at end of member declaration
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3528:46: error: expected unqualified-id before ')' token
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
In file included from C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/perl.h:3856:0,
from gdal_wrap.cpp:744:
C:/berrybrew/5.24.0_64_PDL/c/x86_64-w64-mingw32/include/c++/streambuf: In member function 'std::basic_streambuf<_CharT, _Traits>* std::basic_streambuf<_CharT, _Traits>::pubsetbuf(std::basic_streambuf<_CharT, _Traits>::char_type*, std::streamsize)':
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/iperlsys.h:249:2: error: expected unqualified-id before '(' token
(*PL_StdIO->pSetBuf)(PL_StdIO, (f), (b))
^
In file included from gdal_wrap.cpp:745:0:
gdal_wrap.cpp: In function 'void VSIStdoutUnsetRedirection()':
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/XSUB.h:592:21: error: 'PerlSIO_fwrite' was not declared in this scope
# define fwrite PerlSIO_fwrite
^
gdal_wrap.cpp:2161:30: note: in expansion of macro 'fwrite'
VSIStdoutSetRedirection( fwrite, stdout );
^
dmake: Error code 129, while making 'gdal_wrap.o'
dmake: Error code 255, while making 'build'
##### Error after commenting out iostream lines
dmake -S -f Makefile_Geo__GDAL
"C:\berrybrew\5.24.0_64_PDL\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- GDAL.bs blib\arch\auto\Geo\GDAL\GDAL.bs 644
gcc -c -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/port -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/gcore -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/alg -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/ogr -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/ogr/ogrsf_frmts -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/frmts/vrt -Ic:/gdal-2.1.1_mk2/gdal-2.1.1/apps -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"2.0101\" -DXS_VERSION=\"2.0101\" "-IC:\berrybrew\5.24.0_64_PDL\perl\lib\CORE" gdal_wrap.cpp
In file included from gdal_wrap.cpp:745:0:
gdal_wrap.cpp: In function 'void VSIStdoutUnsetRedirection()':
C:\berrybrew\5.24.0_64_PDL\perl\lib\CORE/XSUB.h:592:21: error: 'PerlSIO_fwrite' was not declared in this scope
# define fwrite PerlSIO_fwrite
^
gdal_wrap.cpp:2161:30: note: in expansion of macro 'fwrite'
VSIStdoutSetRedirection( fwrite, stdout );
^
dmake: Error code 129, while making 'gdal_wrap.o'
dmake: Error code 255, while making 'build'