Giter Club home page Giter Club logo

Comments (6)

bagder avatar bagder commented on June 1, 2024 1

Which BoringSSL version is this? Note that quiche is not compatible with their latest versions atm: cloudflare/quiche#1761

from curl.

pkropachev avatar pkropachev commented on June 1, 2024

Ah. I use BoringSSL from master branch. Let me check with version of BoringSSL from Quiche.

from curl.

pkropachev avatar pkropachev commented on June 1, 2024

Daniel, you're right. All is ok in case using BoringSSL version used by Quiche (commit f1c7534 in deps). Perhaps it also works with more newer versions of BorringSSL, but not with the current master branch.

In my case steps look like the following.

BoringSSL (commit f1c7534):

cd boringssl/src
cmake -Bbuild \
    -DCMAKE_C_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" \
    -DCMAKE_CXX_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo .. 
cmake --build build --config RelWithDebInfo -- -j8
mkdir lib
ln -s ../build/libssl.a ./lib/
ln -s ../build/libcrypto.a ./lib/

Quiche (0.21.0):

cd quiche
QUICHE_BSSL_PATH=$PWD/../boringssl/src cargo build --package quiche --release --features ffi,pkg-config-meta,qlog

CMake configuration for libcurl looks correct now:

cd curl
cmake -Bbuild \
    -DOPENSSL_ROOT_DIR=$PWD/../boringssl/src
    -DUSE_QUICHE=ON \
    -DQUICHE_LIBRARY=$PWD/../quiche/target/release/libquiche.a \
    -DQUICHE_INCLUDE_DIR=$PWD/../quiche/quiche/include
cmake --build build -- -j8
...
-- Found OpenSSL: /home/pk/projects/sandbox/ssl/boringssl/src/lib/libcrypto.a (found version "")
-- Looking for OPENSSL_IS_BORINGSSL
-- Looking for OPENSSL_IS_BORINGSSL - found
-- Looking for OPENSSL_IS_AWSLC
-- Looking for OPENSSL_IS_AWSLC - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Looking for SSL_set0_wbio
-- Looking for SSL_set0_wbio - found
-- Looking for SSL_CTX_set_srp_username
-- Looking for SSL_CTX_set_srp_username - not found
-- Checking for one of the modules 'quiche'
-- Found QUICHE: /home/pk/projects/sandbox/ssl/quiche/target/release/libquiche.a
-- Looking for SSL_CTX_set_quic_method
-- Looking for SSL_CTX_set_quic_method - found
...

libcurl is built correct, but in the same time I faced with problem during linking curl tool.

...
[ 76%] Linking C shared library libcurl.so
...
[100%] Building C object src/CMakeFiles/curl.dir/__/lib/warnless.c.o
[100%] Linking C executable curl
/usr/bin/ld: ../lib/libcurl.so.4.8.0: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/curl.dir/build.make:898: src/curl] Error 1
make[1]: *** [CMakeFiles/Makefile2:709: src/CMakeFiles/curl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Any suggestions what can be wrong?

from curl.

bagder avatar bagder commented on June 1, 2024

/usr/bin/ld: ../lib/libcurl.so.4.8.0: undefined reference to `dlsym'

Sounds like you might need to tell it to use -ldl ?

from curl.

pkropachev avatar pkropachev commented on June 1, 2024

Yep, in my case the problem was solved by adding CMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed -ldl" for cmake.

cd curl
cmake -Bbuild \
    -DOPENSSL_ROOT_DIR=$PWD/../boringssl/src \
    -DUSE_QUICHE=ON \
    -DQUICHE_LIBRARY=$PWD/../quiche/target/release/libquiche.a \
    -DQUICHE_INCLUDE_DIR=$PWD/../quiche/quiche/include \
    -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed -ldl"
cmake --build build -- -j8

from curl.

pkropachev avatar pkropachev commented on June 1, 2024

Regarding the cloudflare/quiche#1761 issue.

I built curl with BoringSSL from master branch by adding -lstdc++.

cd curl
cmake -Bbuild \
    -DOPENSSL_ROOT_DIR=$PWD/../boringssl \
    -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed -ldl -lstdc++"
cmake --build build --target libcurl_shared curl -- -j8

from curl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.