Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1864113

Summary: mariadb: FTBFS in Fedora rawhide/f33
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: mariadbAssignee: Michal Schorm <mschorm>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: damien.ciabrini, gary.buhrmaster, hhorak, jjanco, jstanek, law, ljavorsk, mbayer, mkocka, mmuzila, mschorm, SpikeFedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-19 11:53:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1803234    
Attachments:
Description Flags
build.log
none
root.log
none
state.log
none
use legacy cmake build process patch
none
use-new-cmake-build-process patch none

Description Fedora Release Engineering 2020-08-03 18:00:55 UTC
mariadb failed to build from source in Fedora rawhide/f33

https://koji.fedoraproject.org/koji/taskinfo?taskID=47997593


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Please fix mariadb at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
mariadb will be orphaned. Before branching of Fedora 34,
mariadb will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Fedora Release Engineering 2020-08-03 18:00:58 UTC
Created attachment 1705796 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2020-08-03 18:01:00 UTC
Created attachment 1705797 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2020-08-03 18:01:01 UTC
Created attachment 1705798 [details]
state.log

Comment 4 Jeff Law 2020-08-05 20:09:22 UTC
This is an LTO issue.  I'll take for analysis.

Comment 5 Jeff Law 2020-08-05 20:29:47 UTC
So I've disabled LTO until some upstream GCC fixed land.

However, mariadb is still going to fail to build AFAICT.  It fails at %install time with:

+ for header in mysql/server/my_config.h mysql/server/private/config.h
+ /usr/libexec/multilib-fix --buildroot /builddir/build/BUILDROOT/mariadb-10.4.13-6.fc33.x86_64 --file /usr/include/mysql/server/my_config.h
 # can't find '/builddir/build/BUILDROOT/mariadb-10.4.13-6.fc33.x86_64/usr/include/mysql/server/my_config.h'
Usage: multilib-fix [OPTIONS]


So returning the BZ to the default owner for further analysis/work.

Comment 6 Ben Cotton 2020-08-11 14:16:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 7 Gary Buhrmaster 2020-08-11 17:39:50 UTC
The missing header failure is due to the cmake macro changes in F33.

The proposal owner(s) for that change have stated that they are going through and addressing the issues caused by those changes package by package.  I have no idea when they might get to mariadb.

The easiest/fastest solution may be to to add in definition that will use the legacy cmake build process.  I'll attach the trivial patch.

The, in theory, most correct way is to adapt to the new macros.  I'll attach the proposed change patch (it hits a lot more lines due to complexity of the mariadb build).

In both cases I have build-tested only in a mock environment which includes the running of certain tests, but I have not installed, or run, the resulting builds.

Comment 8 Gary Buhrmaster 2020-08-11 17:41:01 UTC
Created attachment 1711103 [details]
use legacy cmake build process patch

Comment 9 Gary Buhrmaster 2020-08-11 17:41:35 UTC
Created attachment 1711104 [details]
use-new-cmake-build-process patch

Comment 10 Michal Schorm 2020-08-13 10:57:00 UTC
Thank you Gary for your patches !

I agree with the CMake change, and I will go update mariadb package in a way that all (active) Fedora releases with MariaDB 10.4 will use the new behaviour.

I'll start based on your patch.
In the meanwhile, I made a simmilar work on the community-mysql package:
https://src.fedoraproject.org/rpms/community-mysql/c/218698f77bb3c2f7b165bccba27b9bec4cf73ccf?branch=master

I will use the vpath macros instead:
https://docs.fedoraproject.org/en-US/packaging-guidelines/vpath/

since the "%{__cmake_builddir}" is a private macro and shouldn't be used, ever - as per current packaging guidelines.
I've already proposed change of the guidelines for the cases where it is *absolutely necessary* (but that won't be this case, IMHO) :
https://pagure.io/packaging-committee/pull-request/1012

I will get to patching mariadb package in the following week.

Comment 11 Michal Schorm 2020-08-19 11:53:52 UTC
Fixed, passing build:
  https://koji.fedoraproject.org/koji/taskinfo?taskID=49536782