martedì 4 aprile 2017

Mono 4.x.x e UnixODBC: ExecuteReader() throws an EntryPointNotFoundException: System.EntryPointNotFoundException: LocalAlloc

We have updated linux dist from Ubuntu 14.04 (Trusty) to Ubuntu 16.04 (Xenial).

A program that uses ODBC (UnixODBC) to  connect to a DB2 database stop working.

What happens:

ExecuteReader() throws an EntryPointNotFoundExcpetion: System.EntryPointNotFoundException: LocalAlloc.

It seems there is no corrsponding implementation for LocalAlloc (https://bugzilla.xamarin.com/show_bug.cgi?id=37368).

We found a workaround to fix the problem.

We copied the System.Data.dll lib from old ubuntu 14.04 into release folder of our application in the new ubuntu 16.04, so the program uses this rather than that registered in the GAC.

Now the program runs properly until the issue will be resolved by mono comunity.