最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

linux - C Application build failing - usrbinld: optlibrdkafkaliblibrdkafka.a(rdkafka_ssl.o): undefined reference to symbol &

programmeradmin3浏览0评论

I have C application. We use several packages, like- mq, oracle, etc. to build our application. When I build my application on linux sever, it's building fine. I have 2 changes- Change 1: We build application on Linux RHEL8 server and it's building fine. Change 2: We have done some changes for kafka and we are using librdkafka static files. Application is building fine on Linux server.

Now, We have implemented Gitlab CICD to build our application. We have created our own Docker custom image to build application. Gitlab CICD is building application fine without kafka changes (above change 1) but when I added kafka change (above change 2), build is failing. I have added step in Dockerfile to copy kafka package in docker image.

Error-

/usr/bin/ld: /opt/librdkafka/lib/librdkafka.a(rdkafka_ssl.o): undefined reference to symbol 'EVP_PKEY_new@@OPENSSL_1_1_0' //usr/lib64/libcrypto.so.1.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

As per error, sso linker is an issue. I don't understand why build is working fine on Linux server and failing with docker custom image. I did print /usr/lib64 in docker custom image and I can see libcrypto.so.1.1 is there.

my Dockerfile is-

FROM ..... RUN dnf install -y cmake cmake-data cmake-filesystem cmake-rpm-macros libcurl-devel openssl-devel systemd-devel wget zlib-devel java-1.8.0-openjdk-devel git xz tar rpm-build curl jq python3 python3-pip llvm-toolset gcc-gfortran

RUN python3 -m pip install --upgrade pip

RUN pip3 install ansible ansible-tower-cli awscli RUN dnf install -y openssl RUN pip3 install bison RUN dnf install -y unzip

Adding IBM MQ library

COPY mq /opt/mq/

Setting Mq environment path

ENV MQHOME=/opt/mq

Adding Oracle library

COPY oracle /opt/ora/

Setting oracle Environment

ENV ORACLE_HOME=/opt/ora

Adding Kafka library

COPY librdkafka /opt/librdkafka

Setting kafka Environment

ENV LD_LIBRARY_PATH=/opt/librdkafka/lib

Thanks

I did try my different trial and errors but no luck.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论