Windows + Alire + (MSys2) + zLib

Hello!

Does anyone have experience with the current Windows - MSys2 - Alire - zLib combination?

I am porting an Ada project developed for Linux to Windows.
The program processes zLib-compressed LONGBLOB data stored in a MySQL database and exports it to various file formats.
I am using Dmitry Kazakov’s ODBC binding and the zlib-ada binding. The program works perfectly under Linux. Under Windows it crashes after the first 128kByte ODBC data chunk.
At first I suspected the Windows MySQL ODBC driver, but after a long debugging it turned out that I had to investigate zLib.
Long story short: on Windows the zLib initialization at the beginning of the main also crashes, on Linux everything is fine.
On Linux I have zLib 1.3.0, Windows have zLib 1.3.2.
THEORETICAL reason for the error: MSys2 installs zLib 1.3.2 which is not compatible with the current zlib-ada binding.
My biggest problem is that I can’t find zLib 1.3.0 on Windows + MSys2. So I can’t confirm my suspicion. I might try to build from source, but I don’t have much experience with MSys2.
The other option: upgrade zlib-ada to zlib 1.3.2.

Does anyone maintain this package?

Zlib-ada seems to be maintained in zlib source tree (in contrib/ada) with few but recent commits. See https://github.com/madler/zlib. I would first try the test.adb example from there.

Have you tried zipada ?

This is pure Ada. No C library needed.

Z_Compression is an all-Ada implementation of the zlib Deflate and Inflate algorithms, extracted from Zip-Ada. It is compiler and OS independent.

3 Likes

Thanks for the help and suggestions!
Finally, Z_Compression became the solution, and the project works perfectly on Windows too!