When I compile libnvds_kafka_proto.so from the source, the resulting shared library cannot be opened.
The error message is:
/opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
unable to open shared library
Hardware Platform: GPU, x86_64
DeepStream Version: 5.1-21.02
NVIDIA GPU Driver Version: 460.39
Reproduction steps:
# Run Deepstream container on x86_64.
$ docker run --gpus all -it --rm --network host -e CUDA_VER=11.1 nvcr.io/nvidia/deepstream:5.1-21.02-devel
# test_kafka_proto_sync works correctly before I attempt to rebuild libnvds_kafka_proto.so
$ cd /opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor
$ make -f Makefile.test
$ ./test_kafka_proto_sync
Refer to nvds log file for log output
Adapter protocol=KAFKA , version=2.0
connection signature queried=
send [0] completed
...
Disconnecting in 3 secs
# Rebuild libnvds_kafka_proto.so.
$ cd /opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor
$ make
# Note the large difference in file size between the original and new file.
$ ls -l /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so libnvds_kafka_proto.so
-rwxr-xr-x 1 root root 345184 Feb 16 09:54 /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so
-rwxr-xr-x 1 root root 122152 Feb 27 04:15 libnvds_kafka_proto.so
$ cp libnvds_kafka_proto.so /opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so
$ ldconfig
# Now test_kafka_proto_sync fails.
$ ./test_kafka_proto_sync
Refer to nvds log file for log output
/opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
unable to open shared library
# I have also tried to install the dependencies as described in the README.
# The problem remained the same.
cd
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
./configure --enable-ssl
make
make install
cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream/lib/
ldconfig
apt-get install libglib2.0 libglib2.0-dev
apt-get install libjansson4 libjansson-dev