Assistance with Linking Errors when Enabling OpenSSL in open62541

19 views
Skip to first unread message

Mohammad Rahil

unread,
Aug 25, 2025, 8:55:16 AM (12 days ago) Aug 25
to open62541
Hi all,

I’m encountering linking errors while compiling with the option UA_ENABLE_ENCRYPTION=OPENSSL.

Below are some examples of the errors:

/tmp/ccNo62eO.ltrans4.ltrans.o: In function `UA_Policy_Basic128Rsa15_New_Context': <artificial>:(.text+0xb5): undefined reference to `EVP_PKEY_free' /tmp/ccNo62eO.ltrans4.ltrans.o: In function `UA_Policy_Basic128Rsa15_Clear_Context': <artificial>:(.text+0x128): undefined reference to `EVP_PKEY_free' <artificial>:(.text+0x138): undefined reference to `EVP_PKEY_free' /tmp/ccNo62eO.ltrans4.ltrans.o: In function `updateCertificateAndPrivateKey_sp_basic128rsa15': <artificial>:(.text+0x232): undefined reference to `EVP_PKEY_free' <artificial>:(.text+0x264): undefined reference to `EVP_PKEY_free' /tmp/ccNo62eO.ltrans4.ltrans.o: In function `UA_ChannelModule_Basic128Rsa15_Delete_Context': <artificial>:(.text+0x541): undefined reference to `X509_free'

Could someone please help me understand why these errors are occurring? Am I missing any specific steps or libraries during compilation?

Thanks and regards,
Rahil

Jacky Bek

unread,
Aug 25, 2025, 9:22:59 AM (12 days ago) Aug 25
to Rahil Mohammad, open62541
what is your ccmake configuration ?


Sent from my iPhone

On 25 Aug 2025, at 20:55, Mohammad Rahil <mohdr...@gmail.com> wrote:

Hi all,
--
You received this message because you are subscribed to the Google Groups "open62541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open62541+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open62541/249b83c5-4cdd-463b-a9d1-043726280efdn%40googlegroups.com.

Mohammad Rahil

unread,
Aug 25, 2025, 9:29:00 AM (12 days ago) Aug 25
to Jacky Bek, open62541
Hi Jacky,
Iam not configuring any additional features ,
So i'm not using "ccmake".
Am I missing something?

Regards,
Rahil

Jacky Bek

unread,
Aug 25, 2025, 9:43:29 AM (12 days ago) Aug 25
to Rahil Mohammad, open62541
are you using v1.4.13 ?
have you installed openssl ?
have you enabled the options in cmake ?

this is an example :

sudo cmake -S .. -DCMAKE_C_COMPILER=/usr/local/gcc14.2.0/bin/gcc14.2.0 -DCMAKE_C_COMPILER_AR=/usr/local/gcc14.2.0/bin/gcc-ar14.2.0 -DCMAKE_C_COMPILER_RANLIB=/usr/local/gcc14.2.0/bin/gcc-ranlib14.2.0 -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib64/libcrypto.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include -DOPENSSL_SSL_LIBRARY=/usr/local/ssl/lib64/libssl.so -DUA_ARCHITECTURE=posix -DUA_DEBUG_FILE_LINE_INFO=ON -DUA_ENABLE_AMALGAMATION=OFF -DBUILD_SHARED_LIBS=OFF -DUA_ENABLE_DA=ON -DUA_ENABLE_DATATYPES_ALL=ON -DUA_ENABLE_DEBUG_SANITIZER=ON -DUA_ENABLE_DIAGNOSTICS=ON -DUA_ENABLE_DISCOVERY=ON -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_ENABLE_DISCOVERY_SEMAPHORE=ON -DUA_ENABLE_ENCRYPTION=OPENSSL -DUA_ENABLE_ENCRYPTION_OPENSSL=ON -DUA_ENABLE_HISTORIZING=ON -DUA_ENABLE_JSON_ENCODING=ON -DUA_ENABLE_METHODCALLS=ON -DUA_ENABLE_MQTT=ON -DUA_ENABLE_NODEMANAGEMENT=ON -DUA_ENABLE_NODESETLOADER=OFF -DUA_ENABLE_NODESET_COMPILER_DESCRIPTIONS=ON -DUA_ENABLE_PARSING=ON -DUA_ENABLE_PUBSUB=ON -DUA_ENABLE_PUBSUB_ENCRYPTION=ON -DUA_ENABLE_PUBSUB_FILE_CONFIG=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON -DUA_ENABLE_PUBSUB_MONITORING=ON -DUA_ENABLE_SUBSCRIPTIONS=ON -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON -DUA_ENABLE_TYPEDESCRIPTION=ON -DUA_ENABLE_XML_ENCODING=ON -DUA_FORCE_WERROR=ON -DUA_LOGLEVEL=100 -DUA_NAMESPACE_ZERO=FULL

Sent from my iPhone

> On 25 Aug 2025, at 21:28, Mohammad Rahil <mohdr...@gmail.com> wrote:
>
> Hi Jacky,
Message has been deleted

Mohammad Rahil

unread,
Aug 30, 2025, 3:41:56 AM (7 days ago) Aug 30
to open62541
Hi Jacky,
Thanks for the solution , things are working now.

Regards,
Rahil
Reply all
Reply to author
Forward
0 new messages