SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found
Added by Martin Honnen over 2 years ago
It seems SaxonCS 11.4 doesn't work on Ubuntu 22.04 with .NET 6 from the command line, I always get "No usable version of libssl was found". It seems Ubuntu 22.04 comes with some newer version of OpenSSL that .NET 6 uses but that the .NET 5 compiled SaxonCS 11.4 perhaps doesn't find or can't use, not quite sure about the cause of the problem.
Replies (20)
Please register to reply
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
With Ubuntu 20.04, .NET 6 and SaxonCS 11.4 it all seems to work fine to run SaxonCS from the command line.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
Did a bit of more research: https://github.com/dotnet/core/issues/7038#issuecomment-1110377345 says: "For folks dependent on .NET Core 3.1 or .NET 5, we caution against upgrading to Ubuntu 22.04. We recommend moving your development environment and apps to .NET 6 first." and "Newer distro versions include OpenSSL 3 and not OpenSSL 1.x. .NET 6 is the first .NET version to support OpenSSL3. You need to use .NET 6+ if you want to use a distro version that only offers OpenSSL 3, such as Ubuntu 22.04.".
So it seems one more reason to have a .NET 6 based release of SaxonCS, given that .NET 5 is out of support.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Michael Kay over 2 years ago
We've generally tried to avoid changing product dependencies in an incompatible way in a maintenance release, but perhaps this will have to be an exception.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
Saxonica Developer Community notifications@plan.io writes:
We've generally tried to avoid changing product dependencies in an
incompatible way in a maintenance release, but perhaps this will have
to be an exception.
The alternative would be to publish both .NET 5 and .NET 6 versions, but
that increases the complexity of the build and release process so I’m
not hugely enthusiastic about it. But it might be better than making a
breaking change for .NET 5 users.
AFAICT, Microsoft doesn’t make it easy to have both .NET 5 and .NET 6
installed at the same time, so it’s a fairly significant build and
release problem.
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
Saxonica Developer Community notifications@plan.io writes:
So it seems one more reason to have a .NET 6 based release of SaxonCS,
given that .NET 5 is out of support.
Indeed. We have the twin constraints of not wanting to make incompatible
changes in a maintance release for users who have started using Saxon
11.x on .NET 5 on the one hand and the fact that .NET 5 is EOL and .NET
6 is the LTS release on the other.
Today, I refactored the build scripts so that I could create and publish
a new release “SaxonCS-b6” built with .NET 6. I built it with .NET
6.0.302 on Linux and when I try to use it on Ubuntu 22.04, I’m seeing
exactly the same “No usable version of libssl was found” that I see with
the 11.4 release built with .NET 5.
I don’t see any problems with ldd and installing .NET 6 SDK on the
Ubuntu machine didn’t help. (I think I’m glad about that part, you
shouldn’t have to have the SDK installed to use the app!)
Clues most welcome, but I’ll keep digging tomorrow.
Be seeing you,
norm
--
Norman Tovey-Walsh ndw@nwalsh.com
https://nwalsh.com/
Never contend with a man who has nothing to lose.--Gracián
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
I have one Ubuntu 22.04 LTS installation here where SaxonCS 11.4 (11.4.1) and .NET 6 does work:
.NET 6.0.7 OS version Unix 5.10.102.1 64 bit OS True 64 bit Process True
SaxonCS.dll processor architecture MSIL
XmlResolver.dll processor architecture MSIL
Saxon SAXON-CS-EE 11.4 from Saxonica 11.4
Saxon test: 2022-08-08T21:55:32.326+02:00
I will try tomorrow on that other system whether I can spot a difference.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
The other system where I also manage to run SaxonCS 11.4.1 (with my .NET 6 wrapper) says:
.NET 6.0.7 OS version Unix 5.10.102.1 64 bit OS True 64 bit Process True
SaxonCS.dll processor architecture MSIL
XmlResolver.dll processor architecture MSIL
Saxon SAXON-CS-EE 11.4 from Saxonica 11.4
Saxon test: 2022-08-09T07:19:49.193+02:00
Running the SaxonCS from the Linux installation of the SaxonCS 11.4 from Saxonica.com doesn't work, that gives the "No usable version of libssl was found".
But as far as I am concerned, if I manage to run the existing 11.4.1 NuGet package with my .NET 6 wrapper or with a custom .NET 6 app on Ubuntu 22.04 then I don't need to ask/push for a 11 SaxonCS release targetting .NET 6.
That all doesn't explain at all why your 'new release “SaxonCS-b6” built with .NET 6' doesn't run on Ubuntu 22.04., I am afraid.
For what it's worth, my .NET 6 command line wrapper does nothing more but (e.g. for XQuery) than Saxon.Cmd.Command.Main(args.Prepend("query").ToArray());
but together with a line <PackAsTool>true</PackAsTool>
in the project file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<PackAsTool>true</PackAsTool>
<ToolCommandName>saxonxquery</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SaxonCS" Version="11.4.1" />
</ItemGroup>
</Project>
you can then build a dotnet tool installable easily with dotnet tool install --global --add-source ./SaxonXQuery/nupkg SaxonXQuery
.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
That all doesn't explain at all why your 'new release “SaxonCS-b6”
built with .NET 6' doesn't run on Ubuntu 22.04., I am afraid.
According to strace, the .NET 5 and .NET 6 builds are attempting and
failing to open exactly the same SSL shared libraries:
/lib/libssl.so.1.0.0
/lib/libssl.so.1.0.2
/lib/libssl.so.1.1
/lib/libssl.so.10
/lib/libssl.so.11
/lib/libssl.so.111
/lib/libssl.so.8
/lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libssl.so.1.0.2
/lib/x86_64-linux-gnu/libssl.so.1.1
/lib/x86_64-linux-gnu/libssl.so.10
/lib/x86_64-linux-gnu/libssl.so.11
/lib/x86_64-linux-gnu/libssl.so.111
/lib/x86_64-linux-gnu/libssl.so.8
/usr/lib/libssl.so.1.0.0
/usr/lib/libssl.so.1.0.2
/usr/lib/libssl.so.1.1
/usr/lib/libssl.so.10
/usr/lib/libssl.so.11
/usr/lib/libssl.so.111
/usr/lib/libssl.so.8
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/usr/lib/x86_64-linux-gnu/libssl.so.10
/usr/lib/x86_64-linux-gnu/libssl.so.10
/usr/lib/x86_64-linux-gnu/libssl.so.11
/usr/lib/x86_64-linux-gnu/libssl.so.11
/usr/lib/x86_64-linux-gnu/libssl.so.111
/usr/lib/x86_64-linux-gnu/libssl.so.111
/usr/lib/x86_64-linux-gnu/libssl.so.8
/usr/lib/x86_64-linux-gnu/libssl.so.8
That sure looks like the SSL 1.x libraries to me. So either my build
machine is configured incorrectly, or I failed to build with .NET 6
or…something else.
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
According to strace, the .NET 5 and .NET 6 builds are attempting and
failing to open exactly the same SSL shared libraries:
Curiously (if that’s the right word), if I build SaxonCS on the Ubuntu
22.04 machine with .NET 6 (and on which no version of .NET 5 has ever
been installed), I get the same result.
Very unclear what is going on.
Be seeing you,
norm
--
Norman Tovey-Walsh ndw@nwalsh.com
https://nwalsh.com/
Unprovided with original learning, unformed in the habits of thinking,
unskilled in the arts of composition, I resolved to write a
book.--Edward Gibbon
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
I don't know much about strace but I run my SaxonCS 11.4.1 XQuery wrapper with e.g. strace -o somefile.txt saxonxquery -qs:"current-dateTime()"
on Ubuntu 22.04 where only .NET 6 is installed and then searched that output file for SSL:
/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.7/libSystem.Security.Cryptography.Native.OpenSsl.so
/lib/x86_64-linux-gnu/libssl.so.3
/usr/lib/ssl/openssl.cnf
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
Meanwhile when I run strace -o testsaxoncs.txt SaxonCS-11.4/SaxonCS query -qs:"current-dateTime()"
I get a list similar to the one you say for that failure e.g. with stuff like /lib/x86_64-linux-gnu/libssl.so.1.1
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
- /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.7/libSystem.Security.Cryptography.Native.OpenSsl.so
Ah. I wonder if I’ve failed to install some .NET cryptography toolkit?
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
I think the normal .NET 6 runtime installation installs that.
What do you see for dotnet --info
?
I get for the runtimes
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
Saxonica Developer Community notifications@plan.io writes:
I think the normal .NET 6 runtime installation installs that.
What do you see for dotnet --info?
I get for the runtimes
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.7
[/usr/share/dotnet/shared/Microsoft.NETCore.App]
Yeah, that’s what I get too. For completeness:
ndw@saxonica-ubuntu:/tmp/x/SaxonCS-b6-11.4$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.302
Commit: c857713418
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: ubuntu.22.04-x64
Base Path: /usr/share/dotnet/sdk/6.0.302/
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977
.NET SDKs installed:
6.0.302 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
For host it seems kind of odd to me that you have 6.0.8, I get 6.0.7 there:
Host:
Version: 6.0.7
Architecture: x64
Commit: 0ec02c8c96
i.e. the same version number as for the runtimes. But I have no idea whether that matters.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
Saxonica Developer Community notifications@plan.io writes:
For host it seems kind of odd to me that you have 6.0.8, I get 6.0.7
there:
$ dpkg --list|grep dotn
ii dotnet-apphost-pack-6.0 6.0.8-1 amd64 Microsoft.NETCore.App.Host 6.0.8
ii dotnet-host 6.0.8-1 amd64 Microsoft .NET Host - 6.0.8
ii dotnet-hostfxr-6.0 6.0.8-1 amd64 Microsoft .NET Host FX Resolver - 6.0.8
ii dotnet-runtime-6.0 6.0.7-1 amd64 Microsoft.NETCore.App.Runtime 6.0.7
ii dotnet-runtime-deps-6.0 6.0.8-1 amd64 dotnet-runtime-deps-debian 6.0.8
ii dotnet-sdk-6.0 6.0.302-1 amd64 Microsoft .NET SDK 6.0.302
ii dotnet-targeting-pack-6.0 6.0.8-1 amd64 Microsoft.NETCore.App.Ref 6.0.8
It does seem a little odd that I have 6.0.7-1 of the app runtime. But
that’s what gets installed from the Microsoft packages repository. :-(
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
PEBKAC.
Although I installed and built with the .NET 6 toolchain, I failed to
change the targetFramework to net6.0. :-(
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
I think I’ve fixed this now. I’ve uploaded SaxonCS-b6 11.4.1 to
NuGet.org which is a release of SaxonCS 11.4 built as a .NET 6
application.
It’s still being indexed etc. by NuGet.org but should be available
shortly.
I’m uploading the .ZIP files for the platform releases as I type.
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Martin Honnen over 2 years ago
Congrats, Norm, the Nuget package looks good, just run my test console .NET 6 app on Windows and Linux.
Now I only need to find a way to organize the evening between Windows/MS patch day and SaxonCS got the .NET 6 blues updates.
RE: SaxonCS 11.4 not working on Linux Ubuntu 22.04 with .NET 6: No usable version of libssl was found - Added by Norm Tovey-Walsh over 2 years ago
Now I only need to find a way to organize the evening between
Windows/MS patch day and SaxonCS got the .NET 6 blues updates.
If you get a line on the rumored “get more hours in a day” patch to the
Universe binary, please do send me a pointer! :-)
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
Please register to reply