Solved Upgrade Failed: MySQL56 -> MySQL57

I tried upgrading mysql today but got the below error:

Code:
===>   mysql57-client-5.7.21_1 depends on shared library: libedit.so.0 - found (/usr/local/lib/libedit.so.0)
===>  Configuring for mysql57-client-5.7.21_1
===>  Performing out-of-source build
/bin/mkdir -p /var/ports/basejail/usr/ports/databases/mysql57-client/work/.build
CMake Deprecation Warning at CMakeLists.txt:27 (CMAKE_POLICY):
  The OLD behavior for policy CMP0018 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:33 (CMAKE_POLICY):
  The OLD behavior for policy CMP0022 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:41 (CMAKE_POLICY):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Running cmake version 3.10.2
-- Configuring with MAX_INDEXES = 64U
-- CMAKE_GENERATOR: Unix Makefiles
-- SIZEOF_VOIDP 8
getconf: no such configuration parameter `LEVEL1_DCACHE_LINESIZE'
-- MySQL 5.7.21
-- Packaging as: mysql-5.7.21-FreeBSD11.1-x86_64
-- Local boost dir /var/ports/basejail/usr/ports/databases/mysql57-client/work/mysql-5.7.21/boost/boost_1_59_0
-- Found /var/ports/basejail/usr/ports/databases/mysql57-client/work/mysql-5.7.21/boost/boost_1_59_0/boost/version.hpp
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105900
-- BOOST_INCLUDE_DIR /var/ports/basejail/usr/ports/databases/mysql57-client/work/mysql-5.7.21/boost/boost_1_59_0
-- NUMA library missing or required version not available
-- suffixes <.a;.so>
-- OPENSSL_INCLUDE_DIR = /usr/local/include
-- OPENSSL_LIBRARY = /usr/local/lib/libssl.a
-- CRYPTO_LIBRARY = /usr/local/lib/libcrypto.a
-- OPENSSL_MAJOR_VERSION = 1
-- SSL_LIBRARIES = imported_openssl;imported_crypto
-- EDITLINE_INCLUDE_DIR /usr/local/include/editline
-- EDITLINE_LIBRARY /usr/local/lib/libedit.so
-- LZ4_INCLUDE_DIR /usr/local/include
-- LZ4_LIBRARY /usr/local/lib/liblz4.so
-- CURL_LIBRARY = /usr/local/lib/libcurl.so
-- Creating LDAP authentication SASL client library.
CMake Error at libmysql/authentication_ldap/CMakeLists.txt:29 (MESSAGE):
  Required LBER library is missing.
Call Stack (most recent call first):
  libmysql/authentication_ldap/CMakeLists.txt:44 (CROAK_AND_RETURN)


-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlclient
-- MERGE_CONVENIENCE_LIBRARIES LIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;/usr/lib/libz.so;imported_openssl;imported_crypto
-- Library mysqlclient depends on OSLIBS -pthread;/usr/lib/libz.so;m;rt;execinfo
-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlclient
-- MERGE_CONVENIENCE_LIBRARIES LIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;/usr/lib/libz.so;imported_openssl;imported_crypto
-- MERGE_CONVENIENCE_LIBRARIES MYLIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;imported_openssl;imported_crypto
-- The mysqlservices library is for server plugins only
CMake Deprecation Warning at scripts/CMakeLists.txt:320 (CMAKE_POLICY):
  The OLD behavior for policy CMP0007 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- INSTALL mysqlclient.pc /usr/local/libdata/pkgconfig
-- CMAKE_BUILD_TYPE: Release
-- COMPILE_DEFINITIONS: HAVE_CONFIG_H;HAVE_LIBEVENT2
-- CMAKE_C_FLAGS: -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS: -O2 -pipe -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
-- CMAKE_C_LINK_FLAGS:
-- CMAKE_CXX_LINK_FLAGS:
-- CMAKE_C_FLAGS_RELEASE: -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELEASE: -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -DDBUG_OFF
-- Configuring incomplete, errors occurred!
See also "/var/ports/basejail/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeOutput.log".
See also "/var/ports/basejail/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeError.log".
*** Error code 1

Stop.
make[3]: stopped in /basejail/usr/ports/databases/mysql57-client
*** Error code 1

Stop.
make[2]: stopped in /basejail/usr/ports/databases/mysql57-client
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/databases/mysql57-server
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/databases/mysql57-server



I updated ports, packages, etc & re-tried the installation but I could not get to install the package from ports. "Pkg install mysql57-server" works though. But again, I could not get the database running. "Mysql_upgrade" and other mysql commands would return error that mysql is not running.

Please advise.
 
But again, I could not get the database running
What are the errors you're getting? See /var/db/mysql/`hostname`.err. I've migrated various databases from 5.6 to 5.7 and I can remember some minor issues, I had to fix my.cnf for example to remove/adjust some deprecated options. But this is all mentioned in the error logs.
 
Thanks SirDice. I gave up on it and reverted back to MySQL56. I noticed PHP installation sometimes fail too.
PHP71, for instance, could be installed via ports alongside Apache24 but mod_php71 won't. And when you install all via pkg, Apache24 won't start. At the end of the day, PHP70 installation via ports went well. PHP72, on the other hand, breaks the application - throwing JSONserializable error.
 
As SirDice said, it would likely build on 11.3 with no error. The problem might be that a library (.so) or more might be incompatible with MySQL57 after your upgrade. In my case, I have just successed upgraded to 11.3 (from 11.2) and would tell you that curl won't build. That blocked so many other pkgs e.g. clamav. I needed to do ports update a few times (i.e. portsnap fetch update after freebsd-update fetch install)t for a patch on curl (v7.65.1_1) to be downloaded. So, I would recommend that you update your repo, ports, base, installed pkgs and perhaps kernel. Updating the installed pkgs have been seamless, though they were a few glitches.
 
I didn't do an upgrade. I did a fresh install of 11.3 and mysql 57-server was the first thing I tried to build from ports. It's actually the client that fails. After fully building a large php 7.3.7 custom build from source it still fails:

Code:
Run Build Command(s):/usr/local/bin/gmake cmTC_72051/fast
gmake[4]: Entering directory '/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeTmp'
/usr/local/bin/gmake -f CMakeFiles/cmTC_72051.dir/build.make CMakeFiles/cmTC_72051.dir/build
gmake[5]: Entering directory '/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_72051.dir/HAVE_LBER_H.c.o
/usr/bin/cc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMA
T_MACROS -D__STDC_LIMIT_MACROS -I/usr/local/include/editline  -O2 -pipe  -fstack-protector-strong -isystem /u
sr/local/include -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-aft
er-statement    -o CMakeFiles/cmTC_72051.dir/HAVE_LBER_H.c.o   -c /usr/ports/databases/mysql57-client/work/.b
uild/CMakeFiles/CheckIncludeFiles/HAVE_LBER_H.c
/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CheckIncludeFiles/HAVE_LBER_H.c:2:10: fatal error:
 'lber.h' file not found
#include <lber.h>
         ^~~~~~~~
1 error generated.
gmake[5]: *** [CMakeFiles/cmTC_72051.dir/build.make:66: CMakeFiles/cmTC_72051.dir/HAVE_LBER_H.c.o] Error 1
gmake[5]: Leaving directory '/usr/ports/databases/mysql57-client/work/.build/CMakeFiles/CMakeTmp'
gmake[4]: *** [Makefile:121: cmTC_72051/fast] Error 2
gmake[4]: Leaving directory '/usr/
 
Yes, I was advising too that you can use packages.

And building on a newly installed FreeBSD 11.3 does not guarantee success. One would expect you to get the latest patch for both the base/kernel and ports very regularly. That works for ports users and I would think so for pkg users too.
 
Using packages doesnt solve the problem that it doesnt build. I'm reporting that it doesnt build. If you don't care about making the port build, fine. I build critical things from source so if I need to fix 1 little thing I don't have to upgrade 300 systems to whatever freebsd decides is the package of the moment. I still have 9.1 servers with custom code and I can't upgrade 30 packages (which no longer have ports) to fix a bug in a php function.
 
"Proof of the pudding is in the eating", to be more accurate.

What does this prove? That it builds on your system? Bravo. 2 gold stars for you. I posted a log where it doesnt work. What good is ports if it only works some of the time? If it doesnt work on a fresh 11.3 install then there's a problem. I think its amusing that you're spending so much time trying to convince people that I'm wrong. It didnt build. So it's broken for me on a system that was fresh out of the bottle.

I built 5.7.26 from source without a hitch. I always have more problems with ports than I do with source. Mainly because source distribution are well tested; not just on the maintainers box.
 
If it doesnt work on a fresh 11.3 install then there's a problem.
A poudriere build run works from a clean slate, there is no "cleaner" way of building ports.

I always have more problems with ports than I do with source.
I'm willing to bet this is actually the source of your issues, the fact you are building things outside of the FreeBSD ports system. That alone can and will cause problems as everything you installed from source isn't registered with the system.
 
r
A poudriere build run works from a clean slate, there is no "cleaner" way of building ports.


I'm willing to bet this is actually the source of your issues, the fact you are building things outside of the FreeBSD ports system. That alone can and will cause problems as everything you installed from source isn't registered with the system.
You don't listen, do you? I said I built mysql FIRST after a fresh install. Yet you think that building stuff after it failed from source is the problem? Seriously?

So if you want to use a version that isn't the one in ports you're entirely screwed? I never have problems building stuff in linux from source and also using packages. The ports in FreeBSD are too dependent on the exact snapshot of the port.

I had to build another fresh disk for another reason and this time I used the ports that came with 11.3-RELEASE and mysql 5.7 built ok. Upgrading the ports after install is what broke things, apparently.

building everything from ports is not an option.
 
You got some questions to answer. They are still open.
No answer no help.

Last try: Show us the command/method used and the complete log of your build (on some pastebin).

I didn't ask for your help. I was simply reporting that I had the same problem as the OP 4 months later.
 
r

You don't listen, do you? I said I built mysql FIRST after a fresh install. Yet you think that building stuff after it failed from source is the problem? Seriously?

So if you want to use a version that isn't the one in ports you're entirely screwed? I never have problems building stuff in linux from source and also using packages. The ports in FreeBSD are too dependent on the exact snapshot of the port.

I had to build another fresh disk for another reason and this time I used the ports that came with 11.3-RELEASE and mysql 5.7 built ok. Upgrading the ports after install is what broke things, apparently.

building everything from ports is not an option.
I can relate with this. But you have been offered some help.
And you are correct, "building everything from ports is not an option".

Again, use 'pkg remove/delete mysql57' so that its dependencies are also removed/deleted then install via PKG with 'pkg install mysql57'.
 
Back
Top