Bug 228234 - databases/mysql80-server fails to install
Summary: databases/mysql80-server fails to install
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mahdi Mokhtari
URL: https://dev.mysql.com/doc/refman/8.0/...
: 228810 (view as bug list)
Depends on:
Reported: 2018-05-14 05:25 UTC by Gatolabo
Modified: 2019-09-16 10:22 UTC (History)
7 users (show)

See Also:

Changes -DWITH_ZLIB= from "system" to "bundled" (323 bytes, patch)
2018-11-04 20:10 UTC, pr
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gatolabo 2018-05-14 05:25:12 UTC
--->  Installing the new version via the port
===>  Installing for mysql80-server-8.0.11
===>   Registering installation for mysql80-server-8.0.11
pkg-static: Unable to access file /usr/ports/databases/mysql80-server/work/stage/usr/local/bin/zlib_decompress:No such file or directory
*** Error code 74

make[2]: stopped in /usr/ports/databases/mysql80-server
*** Error code 1

make[1]: stopped in /usr/ports/databases/mysql80-server
*** Error code 1


What is the "bin/zlib_decompress" line in the pkg-plist?
Comment 1 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-05-14 09:23:34 UTC
(In reply to Gatolabo from comment #0)
Thanks for reporting the issue...

The error seems to be because that Zlib is detected on system (of course FreeBSD has it in the base :D) but the ssl you have (libressl?) doesn't seem to provide such compression in the command...
I'm working to workaround the issue in build...
Comment 2 Curtis Villamizar 2018-06-28 13:14:52 UTC
*** Bug 228810 has been marked as a duplicate of this bug. ***
Comment 3 Curtis Villamizar 2018-06-29 13:30:42 UTC
Is there any harm in us users locally commenting out or removing the offending pkg-list line as a temporary workaround (I'll find out since I did that but a heads up would be nice).
Comment 4 igor.polovykh 2018-07-08 06:46:30 UTC
OS: 11.1-RELEASE-p11 FreeBSD 11.1-RELEASE-p11 #82 r313908+97edf7a88e9(releng/11.1): Sat Jun 30 13:03:20 MSK 2018 

I get the same error when i try to install mysql8.
pkg-static: Unable to access file /usr/ports/databases/mysql80-server/work/stage/usr/local/bin/zlib_decompress:No such file or directory

when i compile openssl from /usr/ports/security/openssl
 [x] ZLIB     zlib compression support  

what is wrong?

How can I build mysql server?
why zlib_decompress STOPS installation of mysql server?
Comment 5 igor.polovykh 2018-07-08 18:43:34 UTC
when i try to build manually mysql from unpacked dist files in work directory I see wrong dependency from boost_1_66_0 instead of boost_1_67_0. 

-- BOOST_INCLUDE_DIR /usr/local/include
-- Could not find (the correct version of) boost.
-- MySQL currently requires boost_1_66_0

CMake Error at cmake/boost.cmake:100 (MESSAGE):
  You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>

  This CMake script will look for boost in <directory>.  If it is not there,
  it will download and unpack it (in that directory) for you.

  If you are inside a firewall, you may need to use an https proxy:

  export https_proxy=http://example.com:80

Call Stack (most recent call first):
  cmake/boost.cmake:288 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:671 (INCLUDE)
Comment 6 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-08-14 14:50:59 UTC
I updated MySQL80 ports recently, I'd appreciate if you could tell me error gets reproduced in a clean-env (like a jail newly created) again?
Comment 7 Kalten 2018-08-15 01:28:08 UTC

(In reply to Mahdi Mokhtari from comment #6)
> I updated MySQL80 ports recently, I'd appreciate if you could tell me error
> gets reproduced in a clean-env (like a jail newly created) again?

I have cleaned poudrieres caches, deleted all built packages in its
directories, etc., fetch the ports-tree at r477207 and built
databases/mysql80-server again.

(BTW: to not change the PORTREVISION when submitting multiple (four)
versions with the same PORTVERSION==8.0.12 does not seem to be a good
idea, in my view. https://www.freshports.org/databases/mysql80-server)


> ---Begin OPTIONS List---
> ===> The following configuration options are available for mysql80-server-8.0.12:
> ====> Permissible Storage Engines (to compile statically into the server)
>      ARCHIVE=off: Compile "Archive Storage" statically in server
>      BLACKHOLE=off: Compile "Blackhole Storage" statically in server
>      EXAMPLE=off: Compile "Example Storage" statically in server
>      FEDERATED=off: Compile "Federated Storage" statically in server
>      INNOBASE=on: Compile "InnoDB Storage" statically in server
>      PARTITION=off: Compile "Partitioning support Storage" statically in server
>      PERFSCHEMA=off: Compile "Performance Schema Storage" statically in server
> ====> Default features knobs
>      PERFSCHM=on: Enable "Performance Schema" by default (High RAM usage)
> ===> Use 'make config' to modify these settings
> ---End OPTIONS List---

> DEFAULT_VERSIONS=linux=c7 mysql=8.0 php=7.2 ruby=2.5 ssl=openssl samba=4.8

...8<--- log
> -- Installing: /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/share/mysql/magic
> -- Installing: /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/share/mysql/mysql.server
> /bin/mkdir -p /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/etc/mysql
> install  -m 0644 /wrkdirs/usr/ports/databases/mysql80-server/work/my.cnf.sample /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/etc/mysql/my.cnf.sample
> /bin/mkdir -p /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/etc/mysql/keyring
> /bin/mkdir -p /wrkdirs/usr/ports/databases/mysql80-server/work/stage/var/db/mysql_secure
> /bin/mkdir -p /wrkdirs/usr/ports/databases/mysql80-server/work/stage/var/db/mysql_tmpdir
> ====> Compressing man pages (compress-man)
> ===> Staging rc.d startup script(s)
> ===>   Installing ldconfig configuration file
> ===========================================================================
> =======================<phase: package        >============================
> ===>  Building package for mysql80-server-8.0.12
> pkg-static: Unable to access file /wrkdirs/usr/ports/databases/mysql80-server/work/stage/usr/local/bin/zlib_decompress:No such file or directory
> *** Error code 1

I am sorry—the problem did not go away.

Comment 8 Kalten 2018-08-15 01:37:51 UTC
(In reply to Kalten from comment #7)
I should have sent the OPTIONS List for security/openssl too—sorry.

> ---Begin OPTIONS List---
> ===> The following configuration options are available for openssl-1.0.2p_1,1:
>      DOCS=on: Build and/or install documentation
>      EC=on: Optimize NIST elliptic curves
>      MAN3=on: Install API manpages (section 3)
>      PADLOCK=off: VIA Padlock support
>      RFC3779=on: RFC3779 support (BGP)
>      SHARED=on: Build shared libs
>      THREADS=on: Threading support
>      ZLIB=on: zlib compression support
> ====> Cipher Suite support
>      RC5=off: RC5 cipher (patented)
> ====> Hash Function Support
>      MD2=on: MD2 hash (obsolete)
> ====> Optimizations
>      ASM=on: Optimized Assembler code
>      SSE2=on: Runtime SSE2 detection
> ====> Protocol Support
>      SCTP=on: SCTP protocol support
>      SSL2=on: SSLv2 protocol support
>      SSL3=on: SSLv3 protocol support
> ===> Use 'make config' to modify these settings
> ---End OPTIONS List---

Comment 9 pr 2018-11-04 20:10:48 UTC
Created attachment 198949 [details]
Changes -DWITH_ZLIB= from "system" to "bundled"
Comment 10 pr 2018-11-04 20:11:21 UTC
The zlib_decompress/plist problem arises because current Makefile prevents zlib_decompress from being compiled.
Makefile reads:
-DWITH_ZLIB=system \

And then configure correctly identifies that zlib stuff needs to be compiled:
-- The openssl command does support zlib

But fails to set the corresponding variable (OPENSSL_EXECUTABLE_HAS_ZLIB), so cmake does not compile it:
# work/mysql-8.0.12/utilities/CMakeLists.txt
  MYSQL_ADD_EXECUTABLE(zlib_decompress zlib_decompress.cc)
  TARGET_LINK_LIBRARIES(zlib_decompress ${ZLIB_LIBRARY} mysys)

As a temporary workaround I propose to force compilation of zlib stuff by setting -DWITH_ZLIB=bundled in Makefile which, in turn, configures BUILD_BUNDLED_ZLIB that triggers compilation, as per attached patch.

Deeper debugging shall understand why OPENSSL_EXECUTABLE_HAS_ZLIB is not being set at configure time.

NOTE 1: I think this bug affects more people.
NOTE 2: This is not a duplicate of 228810.
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-11-04 21:58:06 UTC
Comment 12 Rob Belics 2019-09-01 01:12:27 UTC
(In reply to pr from comment #10)

You are correct as it now affects me trying to install it.
Comment 13 SimpleRezo 2019-09-16 10:22:13 UTC
On a fresh FreeBSD 12 installation, with openssl ports installed (with ZLIB support), the issue is present.