Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build on Ubuntu 24.04 #507

Open
ar-ag opened this issue Jul 4, 2024 · 1 comment
Open

Failing to build on Ubuntu 24.04 #507

ar-ag opened this issue Jul 4, 2024 · 1 comment

Comments

@ar-ag
Copy link

ar-ag commented Jul 4, 2024

I have installed the latest version of BoringSSL and of lsquic

After successfully building BoringSSL, i tried building lsquic

cmake -DBORINGSSL_DIR=$BORINGSSL .

above command ran successfully, however running make command generated the following error

[ 33%] Linking C executable http_server
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_asn1.cc.o):(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o): in function `bssl::(anonymous namespace)::ECKeyShare::~ECKeyShare()':
/home/ar-ag/projects/QUICforge/boringssl/ssl/ssl_key_share.cc:42:(.text+0x2039): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o): in function `bssl::(anonymous namespace)::X25519KeyShare::~X25519KeyShare()':
/home/ar-ag/projects/QUICforge/boringssl/ssl/ssl_key_share.cc:139:(.text+0x211f): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o): in function `bssl::(anonymous namespace)::X25519Kyber768KeyShare::~X25519Kyber768KeyShare()':
/home/ar-ag/projects/QUICforge/boringssl/ssl/ssl_key_share.cc:195:(.text+0x2205): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o): in function `bssl::SSLKeyShare::~SSLKeyShare()':
/home/ar-ag/projects/QUICforge/boringssl/ssl/internal.h:1114:(.text._ZN4bssl11SSLKeyShareD0Ev[_ZN4bssl11SSLKeyShareD5Ev]+0x29): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o):(.data.rel.ro+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o):(.data.rel.ro+0x18): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o):(.data.rel.ro+0x30): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld: /home/ar-ag/projects/QUICforge/boringssl/ssl/libssl.a(ssl_key_share.cc.o):(.data.rel.ro._ZTIN4bssl11SSLKeyShareE[_ZTIN4bssl11SSLKeyShareE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/CMakeFiles/http_server.dir/build.make:150: bin/http_server] Error 1
make[1]: *** [CMakeFiles/Makefile2:289: bin/CMakeFiles/http_server.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@olokelo
Copy link

olokelo commented Jul 21, 2024

Hello,

Not sure if that helps but I was building Nginx with BoringSSL support and also encountered the issue.
In my case adding -lssl -lcrypto -lstdc++ to --with-ld-opt parameter when building Nginx seems to resolve the issue.

So my configure command now looks something like this

./configure ... --with-openssl="$BUILDROOT/boringssl" --with-cc-opt="-I${BUILDROOT}/boringssl/include" --with-ld-opt="-L${BUILDROOT}/boringssl/build/ssl -L${BUILDROOT}/boringssl/build/crypto -lssl -lcrypto -lstdc++"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants