GetActivationModeA not found in LexActivator

Platform: .NET 6.0
Environment: Docker (x86-64)
Container: Alpine Linux
NuGet: Cryptlex.LexActivator @ 3.19.1

We’re running a .NET 6.0 application published self-contained using linux-musl-x64 runtime, and catching an exception when calling GetActivationMode:

System.EntryPointNotFoundException: Unable to find an entry point named 'GetActivationModeA' in shared library 'LexActivator'.
   at Cryptlex.LexActivatorNative.GetActivationModeA
   at Cryptlex.LexActivator.GetActivationMode()

Same application works fine when running on Windows 10/11, we don’t currently run the application bare metal on any Linux platform other than in a container.

Is there a specific shared library version we should be using?

Dumping exports appears to confirm that entry point does not exist in the shared library in our distribution:

# apk add gcc
# nm -D libLexActivator.so

000000000001fb90 T ActivateLicense
000000000001dc50 T ActivateLicenseOffline
000000000002c6e0 T ActivateLocalTrial
000000000002aed0 T ActivateTrial
000000000002b160 T ActivateTrialOffline
000000000001d5a0 T CheckForReleaseUpdate
0000000000024770 T DeactivateLicense
0000000000029a40 T DecrementActivationMeterAttributeUses
000000000002cbb0 T ExtendLocalTrial
000000000002aa60 T GenerateOfflineActivationRequest
0000000000024d80 T GenerateOfflineDeactivationRequest
000000000001e2d0 T GenerateOfflineTrialActivationRequest
00000000000238f0 T GetActivationMetadata
0000000000024210 T GetActivationMeterAttributeUses
0000000000023d00 T GetActivationMode
000000000001e6a0 T GetFloatingServerFloatingClients
000000000001ea20 T GetFloatingServerMeterAttributes
000000000001e860 T GetFloatingServerRsaKey
000000000001d4b0 T GetLibraryVersion
0000000000022a20 T GetLicenseAllowedActivations
00000000000254c0 T GetLicenseAllowedFloatingClients
0000000000022c00 T GetLicenseExpiryDate
000000000001d270 T GetLicenseKey
00000000000255b0 T GetLicenseLeaseDuration
00000000000256a0 T GetLicenseLeasingStrategy
0000000000022cf0 T GetLicenseMaintenanceExpiryDate
0000000000022410 T GetLicenseMetadata
0000000000026120 T GetLicenseMetadataList
0000000000022730 T GetLicenseMeterAttribute
0000000000025890 T GetLicenseMeterAttributes
0000000000022b10 T GetLicenseTotalActivations
0000000000023700 T GetLicenseType
00000000000231c0 T GetLicenseUserCompany
0000000000022de0 T GetLicenseUserEmail
00000000000233b0 T GetLicenseUserMetadata
0000000000022fd0 T GetLicenseUserName
000000000002cb70 T GetLocalTrialExpiryDate
000000000001e600 T GetProductId
000000000002be30 T GetProductMetadata
0000000000021bb0 T GetProductVersionDisplayName
0000000000021ee0 T GetProductVersionFeatureFlag
0000000000027a50 T GetProductVersionFeatureFlags
00000000000219a0 T GetProductVersionName
0000000000024680 T GetServerSyncGracePeriodExpiryDate
000000000002c250 T GetTrialActivationMetadata
000000000002c570 T GetTrialExpiryDate
000000000002c5b0 T GetTrialId
0000000000029730 T IncrementActivationMeterAttributeUses
00000000000252d0 T IsLicenseGenuine
00000000000208a0 T IsLicenseValid
000000000002c830 T IsLocalTrialGenuine
000000000002b560 T IsTrialGenuine
000000000001e4d0 T Reset
0000000000029d50 T ResetActivationMeterAttributeUses
000000000001ebf0 T SaveFloatingServerFloatingClients
000000000001edd0 T SaveFloatingServerMeterAttributes
000000000001efb0 T SaveFloatingServerRsaKey
000000000001c6b0 T SetActivationLeaseDuration
000000000001f190 T SetActivationMetadata
000000000001c870 T SetAppVersion
000000000001d060 T SetCryptlexHost
000000000001bc60 T SetCustomDeviceFingerprint
000000000001ba40 T SetDataDirectory
000000000001c4f0 T SetLicenseCallback
000000000001be70 T SetLicenseKey
000000000001c130 T SetLicenseUserCredential
000000000001cda0 T SetNetworkProxy
000000000002a820 T SetOfflineActivationRequestMeterAttributeUses
000000000001ebe0 T SetOnPremiseFloatingLicenseType
000000000001b2f0 T SetProductData
000000000001b010 T SetProductFile
000000000001b650 T SetProductId
000000000001cad0 T SetReleaseVersion
000000000002a080 T SetTrialActivationMetadata

We did notice that the C# source does have a switch for non-Windows that dynamically links against GetActivationModeA instead of GetActivationMode. This seems to be a bug given that the distributed shared library for the linux-musl-x64 runtime doesn’t have any of those entry points.

Here is some more diagnostic information on the shared library that gets deployed along with our application:

# apk add file
# file libLexActivator.so

libLexActivator.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

# ldd libLexActivator.so

        /lib/ld-musl-x86_64.so.1 (0x7fe031aec000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x7fe03173d000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fe031565000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fe03154c000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fe031aec000)
        libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x7fe031527000)
        libssl.so.1.1 => /lib/libssl.so.1.1 (0x7fe0314a6000)
        libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7fe031224000)
        libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x7fe031218000)
        libz.so.1 => /lib/libz.so.1 (0x7fe0311fe000)
        libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x7fe0311db000)

Hi,

We have released a new version, please upgrade to the latest version for the fix.

@adnan-kamili Unfortunately the latest version (3.19.4) does not resolve the issue. I have a minimal example that reproduces the behavior we are seeing (Alpine Linux / linux-musl-x64) but I cannot seem to upload on the forum. Is there a file transfer service you prefer or an e-mail address I can send the example to?

Yes, an entrypoint was missing for this function. we have added the entry point. Please use 3.19.5. That should solve your problem.

This specific issue has been resolved, and we will continue testing. Thank you for the prompt response and solution(s)!