Bug #93172 Packaging dependencies between mysql-connector-c++-jdbc and mysql-workbench
Submitted: 13 Nov 2018 9:01 Modified: 6 Dec 2018 19:06
Reporter: Frederic Descamps Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.13 OS:Fedora (29)
Assigned to: CPU Architecture:Any

[13 Nov 2018 9:01] Frederic Descamps
Description:
There is a conflict between these two packages in Fedora 29. mysql-connector-c++-jdbc is needed for mysql-connector-c++-devel

How to repeat:
If you have mysql-workbench already installed, try to install mysql-connector-c++-devel:

$ sudo dnf install mysql-connector-c++-devel
Last metadata expiration check: 0:00:09 ago on Mon 12 Nov 2018 21:44:56 CET.
Dependencies resolved.
==========================================================================================================
 Package                         Arch         Version              Repository                        Size
==========================================================================================================
Installing:
 mysql-connector-c++-devel       x86_64       8.0.13-1.fc29        mysql-connectors-community       2.9 M
Installing dependencies:
 mysql-connector-c++-jdbc        x86_64       8.0.13-1.fc29        mysql-connectors-community       1.1 M

Transaction Summary
==========================================================================================================
Install  2 Packages

Total download size: 4.0 M
Installed size: 32 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64.rpm                  741 kB/s | 1.1 MB     00:01   
(2/2): mysql-connector-c++-devel-8.0.13-1.fc29.x86_64.rpm                 1.8 MB/s | 2.9 MB     00:01   
----------------------------------------------------------------------------------------------------------
Total                                                                     2.4 MB/s | 4.0 MB     00:01    
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4 from install of mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64 conflicts with file from package mysql-workbench-community-8.0.13-1.fc29.x86_64

Error Summary

And if mysql-connector-c++-devel is already installed:

$ sudo dnf install mysql-workbench
Last metadata expiration check: 0:06:49 ago on Tue 13 Nov 2018 09:42:14 CET.
Dependencies resolved.
==============================================================================================================
 Package                           Arch           Version                 Repository                     Size
==============================================================================================================
Installing:
 mysql-workbench-community         x86_64         8.0.13-1.fc29           mysql-tools-community          30 M

Transaction Summary
==============================================================================================================
Install  1 Package

Total download size: 30 M
Installed size: 174 M
Is this ok [y/N]: y
Downloading Packages:
mysql-workbench-community-8.0.13-1.fc29.x86_64.rpm                            7.2 MB/s |  30 MB     00:04    
--------------------------------------------------------------------------------------------------------------
Total                                                                         7.2 MB/s |  30 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4 from install of mysql-workbench-community-8.0.13-1.fc29.x86_64 conflicts with file from package mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64

Error Summary
-------------

And if both are installed at the same time:

$ sudo dnf install mysql-workbench mysql-connector-c++-jdbc
Last metadata expiration check: 0:15:21 ago on Tue 13 Nov 2018 09:42:14 CET.
Dependencies resolved.
==============================================================================================================
 Package                          Arch          Version               Repository                         Size
==============================================================================================================
Installing:
 mysql-connector-c++-jdbc         x86_64        8.0.13-1.fc29         mysql-connectors-community        1.1 M
 mysql-workbench-community        x86_64        8.0.13-1.fc29         mysql-tools-community              30 M

Transaction Summary
==============================================================================================================
Install  2 Packages

Total size: 31 M
Total download size: 1.1 M
Installed size: 181 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] mysql-workbench-community-8.0.13-1.fc29.x86_64.rpm: Already downloaded                             
(2/2): mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64.rpm                      951 kB/s | 1.1 MB     00:01    
--------------------------------------------------------------------------------------------------------------
Total                                                                         949 kB/s | 1.1 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4 conflicts between attempted installs of mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64 and mysql-workbench-community-8.0.13-1.fc29.x86_64

Error Summary
-------------

Suggested fix:
I think the .build-id directory should be removed form the package:

/usr/lib/.build-id
/usr/lib/.build-id/3d
/usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4
[13 Nov 2018 9:31] Terje Røsten
It's not possible to remove /usr/lib/.build-id directory, that is a side effect of the rpmbuild build process.

The problem here is that Workbench ships files that really belongs to C/C++:

$ ll /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4
lrwxrwxrwx 1 root root 65 okt.   8 16:00 /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4 -> ../../../../usr/lib64/mysql-workbench/libmysqlcppconn.so.7.8.0.13

Note the location of /usr/lib64/mysql-workbench/ directory, while this file really belongs to  mysql-connector-c++-jdbc and should be in
/usr/lib64:

$ rpm -qvpl mysql-connector-c++-jdbc-8.0.13-1.fc29.x86_64.rpm
lrwxrwxrwx    1 root    root                       49 sep. 30 08:45 /usr/lib/.build-id/3d/5ed2d38d46e408c9b9e71762333f6c73a19df4 -> ../../../../usr/lib64/libmysqlcppconn.so.7.8.0.13
lrwxrwxrwx    1 root    root                       27 sep. 30 08:45 /usr/lib64/libmysqlcppconn.so.7 -> libmysqlcppconn.so.7.8.0.13
-rwxr-xr-x    1 root    root                  6728000 sep. 30 08:45 /usr/lib64/libmysqlcppconn.so.7.8.0.13

Workbench should link statically against libmysqlcppconn.so.7 or let mysql-connector-c++-jdbc provide the file,
(dep will be automatically created by rpmbuild).
[13 Nov 2018 9:35] Frederic Descamps
Oh yes, I just realized all these .build-id files, I wasn't really aware of that ;)

I think workbench should then have mysql-connector-c++-jdbc as dependency.

Cheers,
[14 Nov 2018 4:45] MySQL Verification Team
Bug #93176 marked as duplicate of this one
[6 Dec 2018 19:06] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.14 release, and here's the changelog entry:

A conflicting dependency was removed that prevented the
mysql-connector-c++-devel package installation when MySQL Workbench was
installed first.

Thank you for the bug report.