Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22459

libcurl compile fail, OpenSSL could not be detected

$
0
0

I compiled openssl using static mode using command

export CC="gcc -O3 -fomit-frame-pointer -fno-unwind-tables -fdata-sections -ffunction-sections -fno-math-errno -fPIC"; ./config no-err shared --libdir=lib --prefix=/home/user/openssl/windows-x64-shared --openssldir=/home/user/openssl/windows-x64-shared  -DOPENSSL_SMALL_FOOTPRINT && make -j8 && make -j8 install_sw

And then i tried to compile libcurl, with usage of my own OpenSSL library using command

LDFLAGS="-static" PKG_CONFIG="pkg-config --static" ./configure --prefix=/home/user/curl-org/windows-x64-static --with-openssl=/home/user/openssl/windows-x64-shared --disable-shared --enable-static && make -j8 curl_LDFLAGS=-all-static && make install

I used GCC from here:https://winlibs.com/#download-releaseGCC 14.2.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 18.1.8 + MinGW-w64 12.0.0 (MSVCRT)

OpenSSL version: 3.3.1CURL version: 8.8.0

During curl configure, it throws an error

configure: PKG_CONFIG_LIBDIR will be set to "/home/user/openssl/windows-x64-shared/lib/pkgconfig"checking for pkg-config... (cached) /usr/bin/pkg-configchecking for openssl options with pkg-config... foundconfigure: pkg-config: SSL_LIBS: "-lssl -lcrypto"configure: pkg-config: SSL_LDFLAGS: ""configure: pkg-config: SSL_CPPFLAGS: ""checking for HMAC_Update in -lcrypto... nochecking for HMAC_Init_ex in -lcrypto... nochecking OpenSSL linking with -ldl... nochecking OpenSSL linking with -ldl and -lpthread... nochecking for SSL_set_quic_use_legacy_codepoint... noconfigure: OpenSSL version does not speak QUIC APIconfigure: OPT_OPENSSL: /home/user/openssl/windows-x64-sharedconfigure: OPENSSL_ENABLED:configure: error: --with-openssl was given but OpenSSL could not be detected

What i did wrong? I want to use GCC MSVCRT due to portability reasons


Viewing all articles
Browse latest Browse all 22459

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>