[Bug 256426] databases/mysql57-client: fails to build with LibreSSL

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 05 Jun 2021 09:07:35 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256426

            Bug ID: 256426
           Summary: databases/mysql57-client: fails to build with LibreSSL
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: joneum_at_FreeBSD.org
          Reporter: felix_at_palmen-it.de
          Assignee: joneum_at_FreeBSD.org
             Flags: maintainer-feedback?(joneum_at_FreeBSD.org)

Created attachment 225568
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=225568&action=edit
Force NDEBUG defined in every compilation unit

Building mysql 5.7.34 fails to build with LibreSSL with the following linker
errors:

---
[ 67%] Linking CXX executable mysqlshow
cd /wrkdirs/usr/ports/databases/mysql57-client/work/.build/client &&
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/mysqlshow.dir/link.txt
--verbose=1
/usr/local/bin/clang++90 -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -O2
-pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
 -DNDEBUG -isystem /usr/local/include -Wall -Wextra -Wformat-security -Wvla
-Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion
-Wno-unused-private-field -ffunction-sections -fdata-sections -O2 -pipe
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing 
-DNDEBUG -isystem /usr/local/include  -Wl,-rpath,/usr/local/lib
-fstack-protector-strong CMakeFiles/mysqlshow.dir/mysqlshow.c.o -o mysqlshow 
-Wl,-rpath,/usr/local/lib: -pthread
../archive_output_directory/libmysqlclient.a -pthread -lz -lm -lrt -lexecinfo
/usr/local/lib/libssl.so /usr/local/lib/libcrypto.so -lz -lm -lrt -lexecinfo
/usr/local/lib/libssl.so /usr/local/lib/libcrypto.so 
ld: error: undefined symbol: SSL_COMP_get_id
>>> referenced by viossl.c
>>>               viossl.c.o:(ssl_do) in archive ../archive_output_directory/libmysqlclient.a

ld: error: undefined symbol: SSL_COMP_get0_name
>>> referenced by viossl.c
>>>               viossl.c.o:(ssl_do) in archive ../archive_output_directory/libmysqlclient.a
--- client/CMakeFiles/mysqlimport.dir/all ---
ld: error: undefined symbol: SSL_COMP_get_id
>>> referenced by viossl.c
>>>               viossl.c.o:(ssl_do) in archive ../archive_output_directory/libmysqlclient.a

ld: error: undefined symbol: SSL_COMP_get0_name
>>> referenced by viossl.c
>>>               viossl.c.o:(ssl_do) in archive ../archive_output_directory/libmysqlclient.a
--- client/CMakeFiles/mysqlshow.dir/all ---
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
*** [client/mysqlshow] Error code 1
---

Attached patch (making sure NDEBUG is defined in every compilation unit) solves
the build problem for me.

As a side note, it still builds when the viosslfactories.c patches are removed,
but I'm unsure about the consequences.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Sat Jun 05 2021 - 09:07:35 UTC

Original text of this message