Bug 228234 - databases/mysql80-server fails to install
Summary: databases/mysql80-server fails to install
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL: https://dev.mysql.com/doc/refman/8.0/...
Keywords:
: 228810 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-14 05:25 UTC by Gatolabo
Modified: 2020-03-16 10:30 UTC (History)
9 users (show)

See Also:
koobs: maintainer-feedback? (joneum)


Attachments
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

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

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

Stop.

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
-- LOCAL_BOOST_DIR
-- LOCAL_BOOST_ZIP
-- 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?
Thanks.
Comment 7 Kalten 2018-08-15 01:28:08 UTC
Greetings!

(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)

FreeBSD 11.2-RELEASE

> ---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
--->8...

I am sorry—the problem did not go away.

Regards,
 Kalten
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---

ru,
 Kalten
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
IF (BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
  MYSQL_ADD_EXECUTABLE(zlib_decompress zlib_decompress.cc)
  TARGET_LINK_LIBRARIES(zlib_decompress ${ZLIB_LIBRARY} mysys)
ENDIF()

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
https://dev.mysql.com/doc/refman/8.0/en/zlib-decompress.html
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.
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-25 03:06:58 UTC
^Triage: Assign to new maintainer (ports r523992)
Comment 15 Harald Langner 2020-03-01 19:41:14 UTC
Hello,
I have tried to change the Makefile with '-DWITH_ZLIB="bundled"' on the line:

CMAKE_ARGS+=	-DWITHOUT_SERVER=1 -DINSTALL_SUPPORTFILESDIR=0 -DWITH_ZLIB="bundled" 

and again with the make command
/usr/ports/databases/mysql80-client# make -DWITH_ZLIB="bundled"

but the error still remain:
====> Compressing man pages (compress-man)
===>   Installing ldconfig configuration file
===>  Installing for mysql80-client-8.0.19_1
===>  Checking if mysql80-client is already installed
===>   Registering installation for mysql80-client-8.0.19_1
pkg-static: Unable to access file /usr/ports/databases/mysql80-client/work/stageusr/local/bin/zlib_decompress:No such file or directory
*** Error code 74

It seams there is missed al slash in .../stageusr/...

But also in 
/usr/ports/databases/mysql80-client/work/stage/usr/local/bin/
there is no file "zlib_decompress"

What can I do now?
Comment 16 Harald Langner 2020-03-01 20:45:12 UTC
(In reply to Harald Langner from comment #15)
I have changed this 
    -DWITH_ZLIB=bundled
in 
/usr/ports/databases/mysql80-server/Makefile too:
Makefile:
 ...
CMAKE_ARGS+=	-DINSTALL_LAYOUT=FREEBSD \
		-DINSTALL_LDCONFIGDIR="${LOCALBASE}/libdata/ldconfig" \
		-DINSTALL_PKGCONFIGDIR="${LOCALBASE}/libdata/pkgconfig" \
...
		-DWITH_BOOST="${WRKSRC}/boost" \
...
		-DWITH_SYSTEM_LIBS=1 \
		-DWITH_EDITLINE=system \
		-DWITH_LIBEVENT=system \
		-DWITH_LZ4=system \
		-DWITH_ICU=system \
		-DWITH_CURL=system \
		-DWITH_ZLIB=bundled \
		-DWITH_ZSTD=system \
		-DWITH_PROTOBUF=system \
		-DWITH_SSL=${OPENSSLBASE} \
		-DBUILD_BUNDLED_ZLIB=0 \
		-DBUILD_BUNDLED_LZ4=0 \

#HL saved	-DWITH_ZLIB=system \

go back to /usr/ports/databases/mysql80-client
#make clean
#make build
#make reinstall  

and it fixed the problem. 
#mysql -V
mysql  Ver 8.0.19 for FreeBSD12.1 on amd64 (Source distribution)

But in /usr/ports/databases/mysql80-client/work/stage/usr/local/bin/
is again no file "zlib_decompress"

Hope that help anyone.
Comment 17 Jochen Neumeister freebsd_committer freebsd_triage 2020-03-04 19:10:11 UTC
(In reply to SimpleRezo from comment #13)


to recreate the problem: Which ports did you build with which options? Which FreeBSD version?

I need more input here please :)
Comment 18 Andrey Cherkashin 2020-03-10 00:58:51 UTC
Here is shar archive of literally all options used and my make.conf.
https://gist.github.com/andoriyu/ea4a0edc645c7d1834553e50cb39e5d5

To reproduce just do a testport on `nimble` set for `databases/mysql80-client` origin
Comment 19 Andrey Cherkashin 2020-03-10 01:01:20 UTC
Oh and it's 12.1-RELEASE-p2 for me
Comment 20 Jochen Neumeister freebsd_committer freebsd_triage 2020-03-10 13:47:05 UTC
9500 lines log are not helpful.
The question is simple: does building the mysql80-server (-client) port work?

I just have no idea what you mean by "nimble". Does it have anything to do with the bug in #1? This message is from 2018. 
Currently I can't reproduce the problem with zlib.
Comment 21 Andrey Cherkashin 2020-03-10 19:56:14 UTC
(In reply to Jochen Neumeister from comment #20)
Building neither client not server work. The same packaging error as OP.

Nimble is set in poudriere that ive attached options and make.conf.
Comment 22 pr 2020-03-12 10:24:34 UTC
(In reply to Jochen Neumeister from comment #20)
I confirm it does build now and the problem seems gone, in fact in the log you see:
[ 86%] Built target zlib_decompress

May be closed?
Comment 23 Andrey Cherkashin 2020-03-15 08:28:45 UTC
(In reply to pr from comment #22)
Just checked again. Not building for me. The same packaging error.
Comment 24 commit-hook freebsd_committer freebsd_triage 2020-03-16 10:30:14 UTC
A commit references this bug:

Author: joneum
Date: Mon Mar 16 10:29:34 UTC 2020
New revision: 528524
URL: https://svnweb.freebsd.org/changeset/ports/528524

Log:
  There is a problem, when mysql80 build with openssl and ZLIB = ON

  -- Installing: /usr/ports/databases/mysql80-client/work/stage/usr/local/man/man1/zlib_decompress.1
  ====> Compressing man pages (compress-man)
  ===>   Installing ldconfig configuration file
  ===>  Installing for mysql80-client-8.0.19_1
  ===>  Checking if mysql80-client is already installed
  ===>   Registering installation for mysql80-client-8.0.19_1 as automatic
  pkg-static: Unable to access file /usr/ports/databases/mysql80-client/work/stageusr/local/bin/zlib_decompress:No such file or directory
  *** Error code 74

  This fix the problem

  PR:		228234
  Sponsored by:	Netzkommune GmbH

Changes:
  head/databases/mysql80-client/pkg-plist