Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671722 - dev-db/mysql-5.7.24 fails to build with USE=-server
Summary: dev-db/mysql-5.7.24 fails to build with USE=-server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 675878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-22 22:06 UTC by Sven Wegener
Modified: 2019-01-28 11:27 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-db:mysql-5.7.24:20181122-220133.log (dev-db:mysql-5.7.24:20181122-220133.log,650.45 KB, text/x-log)
2018-11-22 22:06 UTC, Sven Wegener
Details
Fixes build with USE=-server (mysql-5.7.24-client-only-fix.patch,702 bytes, patch)
2018-12-02 22:53 UTC, Peter Große
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Wegener gentoo-dev 2018-11-22 22:06:56 UTC
Created attachment 555992 [details]
dev-db:mysql-5.7.24:20181122-220133.log

[ 80%] Linking CXX executable mysqlbinlog
cd /var/tmp/portage/dev-db/mysql-5.7.24/work/mysql-5.7.24_build/client && /usr/bin/cmake -E cmake_link_script CMakeFiles/mysqlbinlog.dir/link.txt --verbose=1
/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0/x86_64-pc-linux-gnu-g++  -O2 -pipe -felide-constructors -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wimplicit-fallthrough=2 -Woverloaded-virtual -Wno-unused-parameter -DNDEBUG -DDBUG_OFF  -Wl,-O1 -Wl,--as-needed CMakeFiles/mysqlbinlog.dir/mysqlbinlog.cc.o  -o mysqlbinlog -lpthread ../archive_output_directory/libmysqlclient.a ../libbinlogevents/lib/libbinlogevents.a -lssl -lcrypto -ldl ../archive_output_directory/libmysys.a ../archive_output_directory/libdbug.a ../archive_output_directory/libmysys.a ../archive_output_directory/libdbug.a -lz -lm -lrt -latomic ../archive_output_directory/libstrings.a -lpthread 
../archive_output_directory/libmysqlclient.a(mf_iocache2.c.o): In function `my_b_fill':
mf_iocache2.c:(.text+0x1b0): undefined reference to `mysql_file_seek'
mf_iocache2.c:(.text+0x1db): undefined reference to `mysql_file_read'
../archive_output_directory/libmysqlclient.a(mf_iocache2.c.o): In function `my_b_filelength':
mf_iocache2.c:(.text+0x3c9): undefined reference to `mysql_file_seek'
collect2: error: ld returned 1 exit status
make[2]: *** [client/CMakeFiles/mysqlbinlog.dir/build.make:105: client/mysqlbinlog] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-db/mysql-5.7.24/work/mysql-5.7.24_build'
make[1]: *** [CMakeFiles/Makefile2:1641: client/CMakeFiles/mysqlbinlog.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2018-11-27 13:28:59 UTC
This is probably not going to be fixed: We are removing USE=client-libs and once this is gone, we don't need USE=server anymore. In other words: We don't support USE=-server anymore...
Comment 2 Peter Große 2018-12-02 22:21:09 UTC
> (In reply to Thomas Deutschmann from comment #1)
> This is probably not going to be fixed: We are removing USE=client-libs and
> once this is gone, we don't need USE=server anymore. In other words: We
> don't support USE=-server anymore...

But this ebuild marked as stable still has this USE flag?! So either support it or remove that USE flag?! Or ignore it, so at least building works again?!

I'm confused.
Comment 3 Peter Große 2018-12-02 22:53:59 UTC
Created attachment 556974 [details, diff]
Fixes build with USE=-server

Found a patch fixing the build
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-03 02:51:25 UTC
(In reply to Peter Große from comment #2)
> But this ebuild marked as stable still has this USE flag?! So either support
> it or remove that USE flag?! Or ignore it, so at least building works again?!

In the past we had USE=server and USE=client-libs. They are somehow counterparts. Since February 2018 (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91a40d40c493c2c209f9f91f3909f4164d69b08f) we have a mask for USE=client-libs in place -- USE=client-libs is going away.

Once USE=client-libs is removed, we will also remove USE=server (which will be equal to enforced USE=server).

So please tell us why you are installing dev-db/mysql[-server]: Without USE=client-libs (which is masked) and without USE=server, this package should be useless. So you are either already ignoring our mask or... in any case it is unsupported. :)
Comment 5 Peter Große 2018-12-03 10:21:08 UTC
(In reply to Thomas Deutschmann from comment #4)
> So please tell us why you are installing dev-db/mysql[-server]: Without
> USE=client-libs (which is masked) and without USE=server, this package
> should be useless. 

It provides tools like mysql or mysqldump, which I use on remote servers without having a server running locally. Do you consider this as useless?

> So you are either already ignoring our mask or... in any
> case it is unsupported. :)

I'm not ignoring your mask. I don't have any custom settings regarding mysql apart from the USE=-server flag.

To be frankly, I don't care if it's unsupported. The USE flag is still there and if I'm able to switch it off, my build should not break. During deprecation you can handle this by ignoring it within the ebuild or something like that, or at least give the user a hint via einfo that this is unsupported.

It breaks my build on a stable system and I'm just annoyed by that.
Please consider doing something about this.
Comment 6 Krzysztof Tomczyk 2018-12-12 10:36:12 UTC
(In reply to Thomas Deutschmann from comment #4)
> (In reply to Peter Große from comment #2)
> > But this ebuild marked as stable still has this USE flag?! So either support
> > it or remove that USE flag?! Or ignore it, so at least building works again?!
> 
> In the past we had USE=server and USE=client-libs. They are somehow
> counterparts. Since February 2018
> (https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=91a40d40c493c2c209f9f91f3909f4164d69b08f) we have a mask for
> USE=client-libs in place -- USE=client-libs is going away.
> 
> Once USE=client-libs is removed, we will also remove USE=server (which will
> be equal to enforced USE=server).
> 
> So please tell us why you are installing dev-db/mysql[-server]: Without
> USE=client-libs (which is masked) and without USE=server, this package
> should be useless. So you are either already ignoring our mask or... in any
> case it is unsupported. :)

One thing is related to compilation time it's just quicker without server, second - in my case it broke system which stores data on remote mysql server and need only client libraries. It (that removal) is totaly in opposite to what gentoo is (its idea). If we start remove that basic flags (which is needed for probably many reasons) maybe we should cancel this project becasue the difference between debian packages and gentoo ebuild starts to disappear. Why should I compile package with everything client and server if I had the same within a seconds installed by deb package. I'm against these change. Please revert this move and restore -server possibility in this package
Comment 7 Peter Große 2018-12-12 23:14:24 UTC
As a workaround I moved to using dev-db/mariadb -server. The latest stable compiles and works fine for me.
Comment 8 Krzysztof Tomczyk 2018-12-13 11:34:09 UTC
(In reply to Peter Große from comment #7)
> As a workaround I moved to using dev-db/mariadb -server. The latest stable
> compiles and works fine for me.

it's even worse than I thought - even debian got package called libmysql, where we heading with these change? To monolithic system? Lets compile everything what possible at once why should one use any use flags?
Comment 9 Tom Dexter 2018-12-31 02:08:13 UTC
I just ran into this failure today and discovered this bug.

Tell me you're not serious about requiring a full server install whether it's needed or not. I can assure that everyone with, for example, a MythTV frontend system uses mysql with -server. Even binary distributions at least have separate client and server packages.

Frankly I don't understand anything about the client-libs USE. I was never even aware of that before, but have always had -server on my MythTV frontend.

That's been available basically forever. Is this that difficult to support. What's motivating this?
Comment 10 Tom Dexter 2018-12-31 14:33:29 UTC
I can verify that the attached patch allows this to compile successfully.

I think I understand this situation a bit better now. I take it that, since the mysql client library stuff (such as libmysqlclient.so) are now provided by dev-db/mysql-connector-c (by way of virtual/libmysqlclient-18), mysql with -server does nothing but provide cli programs like mysql etc.

I started looking into the possibility of removing the virtual/mysql requirement from mythtv. The real mysql requirements there, especially for a frontend only system, are by way of things like dev-qt/qtsql, which only require virtual/libmysqlclient-18.

Unfortunately however there are apparently still other packages, for example dev-python/mysql-python (which happens to be required for the mythtv python bindings), that are requiring virtual/mysql instead of virtual/libmysqlclient-18, which is probably all they need. Currently things like that would force a full mysql server install without the server USE flag.
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-31 14:45:12 UTC
This was all announced starting with "2015-07-28-mysql-packaging-changes" and future announcements:

The server packages are no longer providing client libs. Client libs are now provided by dedicated packages like dev-db/mysql-connector-c or dev-db/mariadb-connector-c. Therefore installilng server packages without USE=server doesn't make sense anymore and is unsupported.

Yes, transition is still on the way, see https://bugs.gentoo.org/buglist.cgi?list_id=4136088&query_format=advanced&resolution=---&short_desc=validate%20mysql&short_desc_type=allwordssubstr ... so there are a lot of packages who aren't updated yet.
Comment 12 Tom Dexter 2019-01-01 15:45:40 UTC
I see. Thanks for the clarification. I noticed that that mass filing didn't mention the virtual/libmysqlclient package at all. I see a number of packages have already been changed to depend on that...for example dev-qt/qtsql. I noticed however that one I mentioned above...dev-python/mysql-python, has a version mysql-python-1.2.5-r2 that's been changed to depend directly on dev-db/mysql-connector-c. Wouldn't the virtual/libmysqlclient be the correct dependency in most cases?
Comment 13 Thomas Deutschmann (RETIRED) gentoo-dev 2019-01-26 19:09:14 UTC
*** Bug 675878 has been marked as a duplicate of this bug. ***
Comment 14 Larry the Git Cow gentoo-dev 2019-01-26 19:21:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=596d171d828ced4a268af307f42c64fa5bac993e

commit 596d171d828ced4a268af307f42c64fa5bac993e
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-01-26 19:19:24 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-01-26 19:19:24 +0000

    Add 20018_all_mysql-5.7.25-fix-build-without-server.patch
    
    Bug: https://bugs.gentoo.org/671722
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 20018_all_mysql-5.7.25-fix-build-without-server.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 15 Larry the Git Cow gentoo-dev 2019-01-26 19:23:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfef360c35d4e9d197837d3d57258fca41adf785

commit dfef360c35d4e9d197837d3d57258fca41adf785
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-01-26 19:23:31 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-01-26 19:23:49 +0000

    dev-db/mysql: bump to v5.7.25
    
    Closes: https://bugs.gentoo.org/671722
    Package-Manager: Portage-2.3.58, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.7.25.ebuild | 946 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 948 insertions(+)
Comment 16 Sophie Hamilton 2019-01-27 00:30:42 UTC
Thank you for the patch. Will there be a way in the future to install the client binaries (/usr/bin/mysql, /usr/bin/mysqldump) without installing the server? I don't mean just the client libraries here, but the binaries too.
Comment 17 Krzysztof Tomczyk 2019-01-28 11:27:00 UTC
So confusing change, until that change it was simple that if you want only libraries enable client use flag, but after this change you'll be forced - as in other distros to google how to install only mysql libraries or what's the name of package - which creates many confusions and a lot of problems related to updates needed in all portage packages using mysql library - lot of unneeded mess and trouble creating change which for me is hard to defend.