markrad_msft
Posts: 58
Joined: Thu May 07, 2015 7:46 pm

Problem Building Application that Includes Both libcurl.so and libssl.so

Fri Oct 20, 2017 12:37 am

I am trying to build an application on a Raspberry Pi 3 running Stretch. My application uses CMake to generate the build files. Within the CMake script I use the FindOpenSSL function to locate the OpenSSL shared libraries and header files. This all worked well until I upgraded to Stretch.

The problem is that my application also uses libcurl. With Stretch libcurl has a reference to libssl.so.1.0.2 but the only development package for OpenSSL is at 1.1.0. CMake looks for the header and finds the 1.1.0 version. It then generates references to libssl.so.1.1. At link time the following message is displayed:

Code: Select all

/usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/libcurl.so, may conflict with libssl.so.1.1
Basically libcurl is linking to libssl.so.1.0.2 and my code is linking to libssl.so1.1 thus generating the above warning. I can't downgrade the OpenSSL development package because Stretch only offers the version 1.1.0.

Anybody have an idea how I might circumvent this?
Mark Radbourne | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

User avatar
topguy
Posts: 4743
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Problem Building Application that Includes Both libcurl.so and libssl.so

Wed Oct 25, 2017 3:22 pm

There is a SSL 1.0 dev package in Debian Stretch at least.

https://packages.debian.org/stretch/libssl1.0-dev

Since it should be just header files you might just be able to download it and install instead of libssl-dev. ( https://packages.debian.org/stretch/libssl-dev )

But you can only have one installed since they both but files in /usr/include/openssl. So you have to remove the other one first.

I'am going to also check build dependencies for "libcurl3" when I get near my Pi.

markrad_msft
Posts: 58
Joined: Thu May 07, 2015 7:46 pm

Re: Problem Building Application that Includes Both libcurl.so and libssl.so

Thu Oct 26, 2017 12:31 am

Thanks for the input.

However, there doesn't appear to be any other version of libssl-dev in the Raspbian repositories. I only get the option of 1.1.0.
Mark Radbourne | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

User avatar
rpdom
Posts: 12737
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Problem Building Application that Includes Both libcurl.so and libssl.so

Thu Oct 26, 2017 5:32 am

markrad_msft wrote:
Thu Oct 26, 2017 12:31 am
Thanks for the input.

However, there doesn't appear to be any other version of libssl-dev in the Raspbian repositories. I only get the option of 1.1.0.
I see both libssl-dev (1.1.0f-3) and libssl1.0-dev (1.0.2l-2 0) available in Raspbian Stretch, but as previously mentioned you can't have both installed on the same system.

markrad_msft
Posts: 58
Joined: Thu May 07, 2015 7:46 pm

Re: Problem Building Application that Includes Both libcurl.so and libssl.so

Thu Oct 26, 2017 8:08 pm

You are correct. I was looking for different version of libssl-dev attempting to install it via sudo apt-get install libssl-dev=1.0 but now I see it is specifically named libssl1.0-dev which seems a little contrary to what I am used to. I'll give that version a try.

Thanks.
Mark Radbourne | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

markrad_msft
Posts: 58
Joined: Thu May 07, 2015 7:46 pm

Re: Problem Building Application that Includes Both libcurl.so and libssl.so [Resolved]

Thu Oct 26, 2017 8:39 pm

Thanks all.

If you are here because you are trying to build Azure IoT SDK for C and encountered this issue also see https://github.com/Azure/azure-iot-sdk-c/issues/265
Mark Radbourne | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 5 guests