Title: Add support for Alpine and other musl-based Linux distributions · Issue #331 · ClearFoundry/ClearScript · GitHub
Open Graph Title: Add support for Alpine and other musl-based Linux distributions · Issue #331 · ClearFoundry/ClearScript
X Title: Add support for Alpine and other musl-based Linux distributions · Issue #331 · ClearFoundry/ClearScript
Description: Hi, We've recently discovered an issue while using ClearScript version 7.2.0. When trying to use ClearScript in an Alpine Docker Image, the following error occurs: Unhandled exception. System.TypeLoadException: Cannot load ClearScript V8...
Open Graph Description: Hi, We've recently discovered an issue while using ClearScript version 7.2.0. When trying to use ClearScript in an Alpine Docker Image, the following error occurs: Unhandled exception. System.TypeL...
X Description: Hi, We've recently discovered an issue while using ClearScript version 7.2.0. When trying to use ClearScript in an Alpine Docker Image, the following error occurs: Unhandled exception. System.T...
Opengraph URL: https://github.com/ClearFoundry/ClearScript/issues/331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for Alpine and other musl-based Linux distributions","articleBody":"Hi,\r\n\r\n We've recently discovered an issue while using ClearScript version 7.2.0. \r\n \r\n When trying to use ClearScript in an Alpine Docker Image, the following error occurs:\r\n \r\n \r\n ```\r\n Unhandled exception. System.TypeLoadException: Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.linux-x64.so:\r\n/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: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so)\r\n```\r\n\r\nAdding the glibc compatability layer to try and solve this causes the following error:\r\n \r\n ```\r\n terminate called after throwing an instance of 'std::system_error'\r\n what(): No error information\r\n ```\r\n \r\n Going back to version 7.0.0 with the glibc compatability layer works in an Alpine image without issues. Maybe this was caused by the following change in 7.1?:\r\n\r\n`Switched to static linking of C/C++ libraries to broaden Linux support `\r\n\r\n\r\nSteps to reproduce\r\n\r\nCreate simple C# project using ClearScript 7.2.0\r\n\r\n```\r\nstatic void Main(string[] args)\r\n{\r\n\tvar engine = new V8ScriptEngine();\r\n\tengine.AddHostType(\"Console\", typeof(Console));\r\n\tengine.Evaluate(\"Console.WriteLine('Hello from JS')\");\r\n}\r\n``` \r\n\r\nBuild/Publish project (`dotnet build \u0026\u0026 dotnet publish`)\r\n\r\nBuild Docker image with:\r\n - Alpine base (such as `mcr.microsoft.com/dotnet/aspnet:5.0-alpine`)\r\n - Alpine's glibc compatability layer (`RUN apk add gcompat`)\r\n - Copy dotnet publish output and set the entrypoint to simple app\r\n \r\nRun the Docker image and output should be the error shown above\r\n \r\n ","author":{"url":"https://github.com/SeanMsi","@type":"Person","name":"SeanMsi"},"datePublished":"2021-12-07T21:18:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/331/ClearScript/issues/331"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:940a2758-e306-2c80-c92b-67c21c196225 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D906:8BCE9:E7BCBD:140BD16:696A3D5B |
| html-safe-nonce | 1dc4d4f5f145e223a557557260eb25573daa99ed7cd91b7d847eaa582812cfd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTA2OjhCQ0U5OkU3QkNCRDoxNDBCRDE2OjY5NkEzRDVCIiwidmlzaXRvcl9pZCI6IjIyNzIwMjE2MjA5OTUwMTM5NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d12162a8585756770476b2540a7c447dd092f78cf1f08d028e2f4fff7e22dd30 |
| hovercard-subject-tag | issue:1073762653 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ClearFoundry/ClearScript/331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a3e6309f8632d222c5016c08d5a4d4cec2ef4c93a371fb832c2f0839bffae32/ClearFoundry/ClearScript/issues/331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a3e6309f8632d222c5016c08d5a4d4cec2ef4c93a371fb832c2f0839bffae32/ClearFoundry/ClearScript/issues/331 |
| og:image:alt | Hi, We've recently discovered an issue while using ClearScript version 7.2.0. When trying to use ClearScript in an Alpine Docker Image, the following error occurs: Unhandled exception. System.TypeL... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SeanMsi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| go-import | github.com/ClearFoundry/ClearScript git https://github.com/ClearFoundry/ClearScript.git |
| octolytics-dimension-user_id | 232231756 |
| octolytics-dimension-user_login | ClearFoundry |
| octolytics-dimension-repository_id | 90258367 |
| octolytics-dimension-repository_nwo | ClearFoundry/ClearScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 90258367 |
| octolytics-dimension-repository_network_root_nwo | ClearFoundry/ClearScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width