You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed we solved by building the native library in an Alpine VM. Here are the commands if anyone is interested:
apk update
apk add build-base gcc git cmake
git clone https://github.com/libplctag/libplctag.git
cd libplctag
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
Please note that:
The output libplctag.so that you will find in the output directory is just a 0 byte symbolic link. You will need to find the file it is pointing to (for example libplctag.so.2.5) and rename it to libplctag.so, then include it in your .NET solution with the "Copy always" action set.
To avoid the unwanted overwriting of the file at the program startup, the following line of code is required in your app (before any use of the libplctag library), as explained HERE
I'm struggling to make this work inside an Alpine-based .NET docker image, due to the dependency on
glibc
. Here's what I tried:This works (it's Debian)
This doesn't work,
glibc
is missing in AlpineI tried to add
gcompact
as per THIS but doesn't work (segmentation fault as soon as the lib is invoked in MyApp)I tried also sgerrand/alpine-pkg-glibc:
but it doesn't work, I get THIS issue.
Has anyone managed to make this work in an Alpine image? I read that it's not recommended to use
glibc
in Alpine due to the presence ofmusl
.The text was updated successfully, but these errors were encountered: