Closed eaba closed 3 years ago
How does one set the path via Code or Configuration - am asking because of this:
- name: Test (Linux)
working-directory: ${{ runner.workspace }}/Lightning.NET
run: LD_LIBRARY_PATH=${{ runner.workspace}}/Lightning.NET/lmdb/libraries/liblmdb/:$LD_LIBRARY_PATH dotnet test -f netcoreapp3.1 --no-restore --verbosity normal
if: matrix.os == 'ubuntu-latest'
@eaba I've seen this issue, I'll take a look soon
I was able to get pass this with the following:
- script: make --directory=$(build.sourcesDirectory)/lmdb/libraries/liblmdb/
displayName: 'Build lmdb native lib'
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
- script: echo '##vso[task.setvariable variable=LD_LIBRARY_PATH]$(build.sourcesDirectory)/lmdb/libraries/liblmdb/'
displayName: Set LMDB Env Variable
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
I am getting this same error (below), running dotnet core 3.1 on Amazon Linux 2. I'm not following the above, how exactly can I fix this?
"Unable to load shared library 'lmdb' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblmdb: cannot open shared object file: No such file or directorySystem.DllNotFoundException: Unable to load shared library 'lmdb' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblmdb: cannot open shared object file: No such file or directory at LightningDB.Native.LmdbMethods.mdb_env_create(IntPtr& env) at LightningDB.Native.Lmdb.mdb_env_create(IntPtr& env) at LightningDB.LightningEnvironment..ctor(String path, EnvironmentConfiguration configuration)"
Thanks Simon
@eaba
- script: make --directory=$(build.sourcesDirectory)/lmdb/libraries/liblmdb/ displayName: 'Build lmdb native lib' condition: in( variables['Agent.OS'], 'Linux', 'Darwin' ) - script: echo '##vso[task.setvariable variable=LD_LIBRARY_PATH]$(build.sourcesDirectory)/lmdb/libraries/liblmdb/' displayName: Set LMDB Env Variable condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
I'm not quite following how you fixed this. Any ideas how I can fix this on Amazon Linux or Ubuntu? Do I need to set some environment config?
@eaba
- script: make --directory=$(build.sourcesDirectory)/lmdb/libraries/liblmdb/ displayName: 'Build lmdb native lib' condition: in( variables['Agent.OS'], 'Linux', 'Darwin' ) - script: echo '##vso[task.setvariable variable=LD_LIBRARY_PATH]$(build.sourcesDirectory)/lmdb/libraries/liblmdb/' displayName: Set LMDB Env Variable condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
I'm not quite following how you fixed this. Any ideas how I can fix this on Amazon Linux or Ubuntu? Do I need to set some environment config?
I did that in Azure pipeline template yaml. make --directory=$(build.sourcesDirectory)
- compiles the code.
echo '##vso[task.setvariable variable=LD_LIBRARY_PATH]$(build.sourcesDirectory)/lmdb/libraries/liblmdb/'
- sets the path environment variable for azure....
What I did was used in CI...if u are doing it manually then you will need to set the path environment variable and then run the make script
It might be the path of least resistance to include linux binaries in the nuget at this point. I didn't bother early on because there was a lot of churn, but thinking the dust has settled by now.
Anybody up for a PR?
The last time I checked, nuget had linux libraries included but somehow that is not being discovered on linux
Fixed by 057e8410e2c