[gdal-dev] GDAL 2.1.3 release candiate

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Jan 21 04:09:53 PST 2017


On 2017-01-21 1:53 AM, Even Rouault wrote:
> On vendredi 20 janvier 2017 16:07:17 CET Jeff McKenna wrote:
>
>> Hi Even,
>
>>
>
>> I tested on Windows with VS2012. All was fine (including plugins for
>
>> Python, Java, Oracle, ECW), but the CSharp build gave the following error:
>
>>
>
>> ---
>
>> ogr\OsrPINVOKE.cs(192,10): error CS0111: Type 'OSGeo.OGR.OsrPINVOKE'
>
>> already defines a member called 'OsrPINVOKE' with the same
>
>> parameter types
>
>> ogr\OsrPINVOKE.cs(188,10): (Location of symbol related to previous error)
>
>> NMAKE : fatal error U1077:
>
>> 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.EXE' : return code
> '0x1'
>
>> Stop.
>
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>
>> Studio 11.0\VC\BIN\nmake.EXE"' : return code '0x2'
>
>> Stop.
>
>> ---
>
>>
>
>> No issues with GDAL 2.1.2 in this environment.
>
>
>
> Jeff, are you 200% sure you are using exactly the same build environment
> ? And in particular the same SWIG version. I've reviewed the diff
> between the gdal-2.1.2.tar.gz and gdal-2.1.3RC1.tar.gz and there's no
> change that is csharp related. I get the same error as you on Linux if
> using SWIG 2 (and other errors if using SWIG 3. You created
> https://trac.osgeo.org/gdal/ticket/6465 about that). As far as I know,
> SWIG 1.3 (verified with SWIG 1.3.40) is the only version compatible of
> the (current state of) CSharp bindings. So you have to use different
> SWIG versions depending on the binding language...
>
>
>
> Tamas, do you have plans to do updates so we can build with recent SWIG
> versions ? I guess we should go straight to SWIG 3 right now.
>
>
>

Hi Even,

I had made sure of my correct SWIG 1.3.39 environment yesterday before 
reporting.  But, it was like (my gut feeling) the compiler was finding 
previously compiled SWIG-generated files (as I had noticed yesterday 
that the gdal213RC1.zip contained SWIG-generated files inside 
/swig/csharp/ogr/ from a SWIG 2.1.12 - which I don't have).

So today, thinking on this issue more, I tried to run an "nmake /f 
makefile.vc clean" from inside /swig (which removes all of the SWIG 
2.0.12 files that were included in the original archive) and I am able 
to compile the C# bindings with SWIG 1.3.39

Even: can you be sure to clean that SWIG directory before packaging?

Agreed, it would be nice to avoid all this juggling of SWIG versions for 
bindings, and make sure they all build with SWIG 3.x

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/






More information about the gdal-dev mailing list