CoreyKaylor / Lightning.NET

.NET library for LMDB key-value store
Other
397 stars 82 forks source link

Build updates for 0.9.29 and net7.0 #157

Closed CoreyKaylor closed 1 year ago

CoreyKaylor commented 1 year ago

Removed netcoreapp3.1 and net5.0 from the projects and added net7.0.

Introduced script to make it simpler to produce new binaries for lmdb across almost all currently supported platforms.

All binaries are now built off the tag LMDB_0.9.29, with the exception of the auto resize dll's, they are built from the equivalent commit on the master branch that supports removing the MDB_FIXEDMAP preprocessor directive.

Cleaned up some project warnings.

CoreyKaylor commented 1 year ago

I'm getting a little bit confused as to why the linux tests are failing. I'm am kind of able to reproduce locally on docker for Mac, however I'm running an M1 processor and docker is copying the Arm64 binary into the bin directory but gives the same error. I'm going to try and reproduce on another machine, but it would be nice to get a second pair of eyes. I suspect that as a nuget package this would work fine on dotnet core and above, but the targets file needed for .NET Framework and the test project is where the problem is likely occurring.

@sebastienros any thoughts on this? Anybody else?

CoreyKaylor commented 1 year ago

Details of the native binaries produced from the script in this pull request in the docker steps. file linux-arm/native/liblmdb.so
linux-arm/native/liblmdb.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, with debug_info, not stripped file linux-arm64/native/liblmdb.so linux-arm64/native/liblmdb.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, with debug_info, not stripped file linux-x64/native/liblmdb.so
linux-x64/native/liblmdb.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped

CoreyKaylor commented 1 year ago

Clearly I did something to mess up the --platform options on the Dockerfile. Fortunately, the GCC image already supports multiple platforms and works fine. Once I used the official GCC container, I was able to get the tests to pass locally on my own docker container for dotnet.

Overall I think this puts us in a better place for the binaries and simplifies the CI quite a bit.