When running ClearScript V8 on Linux .Net official docker mcr.microsoft.com/dotnet/runtime:5.0.1-buster-slim-amd64 provided version of libstdc++.so.6 is older than 3.4.26 so it fails to load. It would be nice to compile it with older version so it is supported.
Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.linux-x64.so:
/app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so: Unable to load shared library '/app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so: cannot open shared object file: No such file or directory
/app/ClearScriptV8.linux-x64.so: Unable to load shared library '/app/ClearScriptV8.linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /app/ClearScriptV8.linux-x64.so)
ClearScriptV8.linux-x64.so: Unable to load shared library 'ClearScriptV8.linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: ClearScriptV8.linux-x64.so: cannot open shared object file: No such file or directory
Hi @Bobris,
Thanks for reporting this. We'll look into ways of providing broader Linux coverage in the next release, possibly via linking more libraries statically.
Cheers!
Just find out that libstdc++.so.6 is needed by every dotnet application. So it would be wastefull to statically link it from ClearScriptV8.linux-x64.so as it is mean to be used only from dotnet applications.
If somebody had same problem, I compiled ClearScript.V8 on Debian Buster available here:
https://github.com/bobril/bbcore/blob/e415f9a2a26629f3b9058dd3c56a1383d0c13209/bb/ClearScriptV8.linux-x64.so
Hi @Bobris,
We've found that statically linking libgcc and libstdc++ makes ClearScriptV8 loadable on systems going back at least as far as Debian Stretch / Ubuntu 16.04 Xenial. The cost is an increase in the .so size of slightly under 5 MB.
The alternative, as we understand it, is to use an older version of the toolchain to build ClearScriptV8. The downside there is the loss of recent toolchain fixes.
Currently we're leaning toward the first option. Opinions?
Thanks!
For my usecases increase of 5MB is not problem and to have same support like .Net 5.0 is enough. I upgrade often, but waiting for stable releases. BTW Support for Apple M1 with .Net 6.0 would be great.
We've posted ClearScript 7.1.
Most helpful comment
For my usecases increase of 5MB is not problem and to have same support like .Net 5.0 is enough. I upgrade often, but waiting for stable releases. BTW Support for Apple M1 with .Net 6.0 would be great.