curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Compiling curl 8.0.1 with OpenSSL 3.1.0 - ../lib/.libs/libcurl.so: undefined reference to ...

From: Jeffrey Walton via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 16 Apr 2023 14:34:41 -0400

On Sun, Apr 16, 2023 at 2:27 PM Henrik Holst
<henrik.holst_at_millistream.com> wrote:
>
> https://www.openssl.org/docs/man3.0/man7/OPENSSL_NO_DEPRECATED.html
>
> It should IMHO be just -DOPENSSL_NO_DEPRECATED

Yeah, I was thinking that, too.

And Rahul may (probably?) need OPENSSL_API_COMPAT=30000, if I am
parsing https://www.openssl.org/docs/man3.0/man7/openssl_user_macros.html
correctly.

Jeff

> Den sön 16 apr. 2023 kl 20:23 skrev Jeffrey Walton via curl-library <curl-library_at_lists.haxx.se>:
>>
>> On Sun, Apr 16, 2023 at 2:06 PM Rahul Sabnis via curl-library
>> <curl-library_at_lists.haxx.se> wrote:
>> >>
>> >> It sounds like you are not compiling against OpenSSL 3.0. You are
>> >> compiling against an older OpenSSL that provides the symbol
>> >> EVP_PKEY_id, and not the newer OpenSSL that provides the symbol
>> >> EVP_PKEY_get_id (with EVP_PKEY_id supplied as a #define).
>> >
>> >
>> > I set the environment below so that it uses the OpenSSL which I want. I compiled and installed OpenSSL 3.1.0 under /home/builder/openssl
>> > export CPPFLAGS="-Dlinux26 -I/home/builder/openssl/include/openssl -DOPENSSL_NO_DEPRECATED_3_0"
>> > export LDFLAGS="-Wl,-R/home/builder/openssl/lib64 -L/home/builder/openssl/lib64"
>> > export LDLIBS="-lssl -lcrypto"
>> >
>> >> Please zip cURL's config.log, and attach it to the thread.
>> >
>> > Attached zipped config.log
>>
>> The problems seem to start sooner that compile and link. Configure is choking:
>>
>> <SNIP>
>> configure:26443: checking for HMAC_Init_ex in -lcrypto
>> configure:26466: gcc -std=gnu11 -o conftest -fPIC
>> -Werror-implicit-function-declaration -O2 -Wno-system-headers
>> -Dlinux26 -I/home/builder/openssl/include/openssl
>> -DOPENSSL_NO_DEPRECATED_3_0 -Wl,-R/home/builder/openssl/lib64
>> -L/home/builder/openssl/lib64 conftest.c -lcrypto >&5
>> /tmp/cc0YufCo.o: In function `main':
>> conftest.c:(.text.startup+0x7): undefined reference to `HMAC_Init_ex'
>> collect2: error: ld returned 1 exit status
>> configure:26466: $? = 1
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME "curl"
>> | #define PACKAGE_TARNAME "curl"
>> | #define PACKAGE_VERSION "-"
>> | #define PACKAGE_STRING "curl -"
>> | #define PACKAGE_BUGREPORT "a suitable curl mailing list:
>> https://curl.se/mail/"
>> | #define PACKAGE_URL ""
>> | #define HAVE_STDIO_H 1
>> | #define HAVE_STDLIB_H 1
>> | #define HAVE_STRING_H 1
>> | #define HAVE_INTTYPES_H 1
>> | #define HAVE_STDINT_H 1
>> | #define HAVE_STRINGS_H 1
>> | #define HAVE_SYS_STAT_H 1
>> | #define HAVE_SYS_TYPES_H 1
>> | #define HAVE_UNISTD_H 1
>> | #define STDC_HEADERS 1
>> | #define PACKAGE "curl"
>> | #define VERSION "-"
>> | #define OS "x86_64-pc-linux-gnu"
>> | #define HAVE_DLFCN_H 1
>> | #define LT_OBJDIR ".libs/"
>> | #define CURL_DISABLE_LDAP 1
>> | #define CURL_DISABLE_LDAPS 1
>> | #define CURL_DISABLE_RTSP 1
>> | #define HAVE_SYS_TYPES_H 1
>> | #define HAVE_SYS_TIME_H 1
>> | #define HAVE_CLOCK_GETTIME_MONOTONIC 1
>> | #define ENABLE_IPV6 1
>> | #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
>> | #define HAVE_WRITABLE_ARGV 1
>> | /* end confdefs.h. */
>> |
>> |
>> | #ifdef __cplusplus
>> | extern "C"
>> | #endif
>> | char HMAC_Init_ex ();
>> | int main (void)
>> | {
>> | return HMAC_Init_ex ();
>> | ;
>> | return 0;
>> | }
>> configure:26476: result: no
>> </SNIP>
>>
>> Looking at https://www.openssl.org/docs/man3.0/man7/openssl_user_macros.html,
>> I don't see a DOPENSSL_NO_DEPRECATED_3_0.
>>
>> Are you sure that is correct?
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-04-16