Bug 391885 - Compilation error using LibreSSL rather than OpenSSL
Summary: Compilation error using LibreSSL rather than OpenSSL
Status: RESOLVED DOWNSTREAM
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-15 11:44 UTC by Bart Ribbers
Modified: 2019-09-11 08:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
CMake error log (1.54 KB, text/x-log)
2018-03-15 11:44 UTC, Bart Ribbers
Details
CMake output log (48.87 KB, text/x-log)
2018-03-15 11:55 UTC, Bart Ribbers
Details
CMake terminal output (141.86 KB, text/plain)
2018-03-15 12:03 UTC, Bart Ribbers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Ribbers 2018-03-15 11:44:54 UTC
Created attachment 111411 [details]
CMake error log

When trying to build Falkon 3.0.0, I get a linking error.

```
[ 52%] Linking CXX shared library ../../bin/libFalkonPrivate.so
/usr/lib/libQt5Network.so.5.9.3: warning: warning: EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup
collect2: error: ld returned 1 exit status
```

Viewing CMakeError.log it seems it's a detection of glibc gone wrong. Note that this system uses musl rather than glibc.

```
/home/pmos/build/src/falkon-3.0.0/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/pmos/build/src/falkon-3.0.0/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: '__GLIBC__' undeclared (first use in this function)
   return ((int*)(&__GLIBC__))[argc];
                   ^~~~~~~~~
```
Comment 1 David Rosca 2018-03-15 11:47:50 UTC
Please post full output, or at least last 200 lines.
Comment 2 Bart Ribbers 2018-03-15 11:55:02 UTC
Created attachment 111412 [details]
CMake output log

Note that CMake reports the system is Gentoo, this only is for the kernel. I'm actually building this in a Alpine Linux chroot.
Comment 3 David Rosca 2018-03-15 11:58:21 UTC
I meant output you see in terminal, not what CMake saves in log files.

But it fails due to LibreSSL, probably because EVP_CipherFinal is not defined? It will be evident from linker output.
Comment 4 Bart Ribbers 2018-03-15 12:03:47 UTC
Created attachment 111413 [details]
CMake terminal output

Ah sorry, my mistake. I find the terminal output quite useless really, it has no indication why it failed. But here it is.
Comment 5 David Rosca 2018-03-15 12:10:10 UTC
Yes, it's LibreSSL incompatibility in this case. You should use OpenSSL instead.
Comment 6 Bart Ribbers 2018-03-15 12:54:12 UTC
That won't be as easy sadly. It would mean I'd have to replace LibreSSL for OpenSSL in the *entire* dependency chain, including all of Qt5. And that's not up to me to decide :(
Comment 7 David Rosca 2018-03-15 13:11:54 UTC
Then there is also possibility that Qt was built using OpenSSL and you are trying to build Falkon with LibreSSL, or the other way around.
The linking error comes from libQt5Network.so.5.9.3, not Falkon.
Comment 8 David Rosca 2018-03-17 12:57:21 UTC
Actually this is just linker warning, and linker warnings are treated as errors by default in KF5. You can workaround it by changing linker flags to disable treating warnings as errors.
Comment 9 Bart Ribbers 2019-09-11 08:40:28 UTC
We switched to OpenSSL, so this bug is not relevant anymore.