linker error in libsrtp2.a: multiple definition of 'bit_string'
Brought to you by:
csoutheren,
rjongbloed
When compiling version 3.20 of opal the linker complains about multiple use of the bit_string function:
ar cr libsrtp2.a srtp/srtp.o srtp/ekt.o crypto/cipher/cipher.o crypto/cipher/null_cipher.o crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o crypto/hash/null_auth.o crypto/hash/auth.o crypto/hash/hmac_ossl.o crypto/math/datatypes.o crypto/math/stat.o crypto/kernel/crypto_kernel.o crypto/kernel/alloc.o crypto/kernel/key.o crypto/kernel/err.o crypto/replay/rdb.o crypto/replay/rdbx.o crypto/replay/ut_sim.o
ranlib libsrtp2.a
gcc -DHAVE_CONFIG_H -Icrypto/include -I./include -I./crypto/include -fPIC -Wall -pedantic -Wstrict-prototypes -O4 -fexpensive-optimizations -funroll-loops -L. -o crypto/test/cipher_driver crypto/test/cipher_driver.c test/getopt_s.c libsrtp2.a -lcrypto -ldl -pthread -lsrtp2
gcc -DHAVE_CONFIG_H -Icrypto/include -I./include -I./crypto/include -fPIC -Wall -pedantic -Wstrict-prototypes -O4 -fexpensive-optimizations -funroll-loops -I./test -L. -o crypto/test/datatypes_driver crypto/test/datatypes_driver.c test/util.c libsrtp2.a -lcrypto -ldl -pthread -lsrtp2
/usr/bin/ld: libsrtp2.a(datatypes.o):(.bss+0x0): multiple definition of `bit_string'; /tmp/ccD2q4VB.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:215: crypto/test/datatypes_driver] Error 1
make[2]: *** [/home/user/Source/opal/make/toplevel.mak:515: /home/user/Source/opal/src/rtp/libsrtp/libsrtp2.a] Error 2
make[2]: *** Deleting file '/home/user/Source/opal/src/rtp/libsrtp/libsrtp2.a'
make[1]: *** [/usr/share/ptlib/make/post.mak:115: optshared] Error 2
make[1]: Leaving directory '/home/user/Source/opal'
make: *** [/usr/share/ptlib/make/autoconf.mak:179: build_top_level] Error 2
Full screenlog attached.
After disabling srtp with ./configure --disable-srtp the compiler complains about strncpy():
Finally disabling bfcp also let make walk through the end.