Created attachment 184515 [details] Full log Part of log: […] [ 58%] Linking CXX shared module authentication_ldap_sasl_client.so cd /usr/ports/databases/mysql57-client/work/.build/libmysql/authentication_ldap && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/authentication_ldap_sasl_client.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DDBUG_OFF -fPIC -Wl,-rpath,/usr/local/lib -fstack-protector -shared -o authentication_ldap_sasl_client.so CMakeFiles/authentication_ldap_sasl_client.dir/auth_ldap_sasl_client.cc.o CMakeFiles/authentication_ldap_sasl_client.dir/log_client.cc.o -pthread ../../libservices/libmysqlservices.a -lmysqld -lsasl2 -lsasl2 -pthread /usr/bin/ld: cannot find -lmysqld c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 […] # pkg version -v | grep mysql57 mysql57-client-5.7.18 < needs updating (index has 5.7.19) mysql57-server-5.7.18 < needs updating (index has 5.7.19) <uname> FreeBSD 11.1-RC3 amd64 <make.conf> DISABLE_VULNERABILITIES=YES CPUTYPE?=core2 OPTIONS_SET=CUPS WITHOUT_LPR=YES DEFAULT_VERSIONS+= apache=2.4 QT4_OPTIONS=CUPS NAS QGTKSTYLE LOCALIZED_LANG=ru MAKE_JOBS_UNSAFE=yes DEFAULT_VERSIONS+= mysql=5.7 .if ${.CURDIR:M*/ports/devel/ccache} NO_CCACHE=yes .endif DEFAULT_VERSIONS+= ssl=openssl .if ${.CURDIR:M*/emulators/linux-c6} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/graphics/linux-c6-glx-utils} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/x11-toolkits/linux-c6-qt47-x11} OPTIONS_SET=NVIDIA_GL .endif DEFAULT_VERSIONS+= pgsql=9.6
Hi. Could you please test it (building mysql57-client) with other tools [like poudriere]. I was unable to reproduce the problem. Tested on all FreeBSD 10, 11 and 12...
Created attachment 184522 [details] poudriere log
Created attachment 184523 [details] make log (In reply to Mahdi Mokhtari from comment #1) 1. With poudriere build without error (log in the attachment) 2. If build in the port — some error (log in the attachment) 3. The difference in the build parameters: portupgrade: -- Looking for include file sasl/sasl.h -- Looking for include file sasl/sasl.h – found poudriere: -- Looking for include file sasl/sasl.h -- Looking for include file sasl/sasl.h - not found error: [ 58%] Linking CXX shared module authentication_ldap_sasl_client.so
Note - I am running into the exact same issue on a 11.0 box. I can't update or do an install from source of the 5.7.19 version after removing 5.7.18. It fails at the same '-lmysqld' line. I assume that this is because I have one or more ldap/SASL libraries installed that trigger this issue.
Same problem with 11.0 - --- libmysql/authentication_ldap/CMakeFiles/authentication_ldap_sasl_client.dir/all --- /usr/bin/ld: cannot find -lsasl2 c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [libmysql/authentication_ldap/authentication_ldap_sasl_client.so] Error code 1
I've created a patch and tested it. Now it's on review.
Created attachment 184548 [details] Patch to fix SASL link error and add option This is the patch, in case you want to test it too.
(In reply to Mahdi Mokhtari from comment #7) With SASLCLIENT=on – “mysql57-client” build without error, but if SASLCLIENT=off – still error ... […] [ 58%] Linking CXX shared module authentication_ldap_sasl_client.so cd /usr/ports/databases/mysql57-client/work/.build/libmysql/authentication_ldap && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/authentication_ldap_sasl_client.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DDBUG_OFF -L%%FREEBSD_LOCAL_LIB%% -Wl,-rpath,/usr/local/lib -fstack-protector -shared -o authentication_ldap_sasl_client.so CMakeFiles/authentication_ldap_sasl_client.dir/auth_ldap_sasl_client.cc.o CMakeFiles/authentication_ldap_sasl_client.dir/log_client.cc.o -pthread ../../libservices/libmysqlservices.a -lsasl2 -pthread /usr/bin/ld: cannot find -lsasl2 c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Is it correct?
Created attachment 184559 [details] Better patch to fix sasl with mysql57 You're right. Thanks :) The better patch is attached. As I tested, it works on both select/deselect cases on all 10, 11 and 12-CURRENT.
(In reply to Mahdi Mokhtari from comment #9) 1. For “mysql57-client” patch work is fine. 2. For “mysql57-server” - still problem: [ 84%] Linking CXX shared module authentication_ldap_sasl_client.so cd /usr/ports/databases/mysql57-server/work/.build/libmysql/authentication_ldap && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/authentication_ldap_sasl_client.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -O2 -pipe -march=core2 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DDBUG_OFF -fPIC -Wl,-rpath,/usr/local/lib -fstack-protector -shared -o authentication_ldap_sasl_client.so CMakeFiles/authentication_ldap_sasl_client.dir/auth_ldap_sasl_client.cc.o CMakeFiles/authentication_ldap_sasl_client.dir/log_client.cc.o -pthread ../../libservices/libmysqlservices.a -lsasl2 -lsasl2 -pthread -lrt /usr/bin/ld: cannot find -lsasl2 c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1
*** Bug 220918 has been marked as a duplicate of this bug. ***
Created attachment 184596 [details] Newer patch that fixes problem This patch should also fix the case you encountered with mysql-server
(In reply to Mahdi Mokhtari from comment #12) Now patch work is fine and you can committed to the ports tree. Thanks! PR can be closed.
(In reply to Vladimir Omelchuk from comment #13) Great! Thanks for testing it :-)
A commit references this bug: Author: mmokhi Date: Sun Jul 23 16:45:08 UTC 2017 New revision: 446496 URL: https://svnweb.freebsd.org/changeset/ports/446496 Log: databases/mysql57-{server client}: Fix broken SASL/LDAP integration on newest 5.7.19 upgrade -Add a SASL/LDAP option for mysql57-client -Fix plugin.cmake for "FreeBSD != Linux" case For new plugin, MySQL build assumes everything is MacOS or Windows or Linux. This breaks upgrades when you have SASL/LDAP client-library installed. Because it "Decides" that you "Want" SASL/LDAP support and tries to build it. PR: 220865 Submitted by: mmokhi Reported by: Vladimir Omelchuk <admin@vladiom.com.ua> Reviewed by: mat, feld (mentors) Approved by: feld (mentor) MFH: 2017Q3 Differential Revision: https://reviews.freebsd.org/D11667 Changes: head/databases/mysql57-client/Makefile head/databases/mysql57-client/files/patch-cmake_plugin.cmake head/databases/mysql57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt head/databases/mysql57-client/pkg-plist head/databases/mysql57-server/Makefile head/databases/mysql57-server/files/patch-cmake_plugin.cmake head/databases/mysql57-server/files/patch-libmysql_authentication__ldap_CMakeLists.txt
A commit references this bug: Author: mmokhi Date: Sun Jul 23 16:52:45 UTC 2017 New revision: 446497 URL: https://svnweb.freebsd.org/changeset/ports/446497 Log: MFH: r446496 databases/mysql57-{server client}: Fix broken SASL/LDAP integration on newest 5.7.19 upgrade -Add a SASL/LDAP option for mysql57-client -Fix plugin.cmake for "FreeBSD != Linux" case For new plugin, MySQL build assumes everything is MacOS or Windows or Linux. This breaks upgrades when you have SASL/LDAP client-library installed. Because it "Decides" that you "Want" SASL/LDAP support and tries to build it. PR: 220865 Submitted by: mmokhi Reported by: Vladimir Omelchuk <admin@vladiom.com.ua> Reviewed by: mat, feld (mentors) Approved by: feld (mentor) Differential Revision: https://reviews.freebsd.org/D11667 Approved by: ports-secteam (feld) Changes: _U branches/2017Q3/ branches/2017Q3/databases/mysql57-client/Makefile branches/2017Q3/databases/mysql57-client/files/patch-cmake_plugin.cmake branches/2017Q3/databases/mysql57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt branches/2017Q3/databases/mysql57-client/pkg-plist branches/2017Q3/databases/mysql57-server/Makefile branches/2017Q3/databases/mysql57-server/files/patch-cmake_plugin.cmake branches/2017Q3/databases/mysql57-server/files/patch-libmysql_authentication__ldap_CMakeLists.txt
Committed and also MFH'd with approval of feld@ Thanks :)
A commit references this bug: Author: feld Date: Fri Jan 12 17:53:31 UTC 2018 New revision: 458861 URL: https://svnweb.freebsd.org/changeset/ports/458861 Log: databases/percona57: Fix build with SASL If SASL is detected at build time it assumes you want SASL and also errors due to assuming we're Linux. This was already patched in our tree for MySQL. Also enable SASL support by default for the databases/percona57-client. This is expected to be the default by upstream now. Special thanks to mmokhi for figuring this out for us. PR: 220865 MFH: 2018Q1 Changes: head/databases/percona57-client/Makefile head/databases/percona57-client/files/patch-cmake_plugin.cmake head/databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt head/databases/percona57-client/pkg-plist head/databases/percona57-pam-for-mysql/pkg-plist head/databases/percona57-server/Makefile head/databases/percona57-server/files/patch-cmake_plugin.cmake head/databases/percona57-server/files/patch-libmysql_authentication__ldap_CMakeLists.txt head/databases/percona57-server/pkg-plist
A commit references this bug: Author: feld Date: Fri Jan 12 17:54:15 UTC 2018 New revision: 458862 URL: https://svnweb.freebsd.org/changeset/ports/458862 Log: MFH: r458861 databases/percona57: Fix build with SASL If SASL is detected at build time it assumes you want SASL and also errors due to assuming we're Linux. This was already patched in our tree for MySQL. Also enable SASL support by default for the databases/percona57-client. This is expected to be the default by upstream now. Special thanks to mmokhi for figuring this out for us. PR: 220865 Changes: _U branches/2018Q1/ branches/2018Q1/databases/percona57-client/Makefile branches/2018Q1/databases/percona57-client/files/patch-cmake_plugin.cmake branches/2018Q1/databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt branches/2018Q1/databases/percona57-client/pkg-plist branches/2018Q1/databases/percona57-pam-for-mysql/pkg-plist branches/2018Q1/databases/percona57-server/Makefile branches/2018Q1/databases/percona57-server/files/patch-cmake_plugin.cmake branches/2018Q1/databases/percona57-server/files/patch-libmysql_authentication__ldap_CMakeLists.txt branches/2018Q1/databases/percona57-server/pkg-plist