[MDEV-32741] Problem building mariadb 11.1 branch Created: 2023-11-09  Updated: 2023-11-27

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.11, 11.0, 11.1, 11.2

Type: Bug Priority: Critical
Reporter: Thomas Pasch Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I encounter the following when I try to build mariadb on/with docker. I use my own Dockerfile for the task: https://github.com/aanno/linux-config/blob/master/build-with-docker/Containerfile.mariadb.fedora39 . (And I use https://github.com/aanno/linux-config/blob/master/build-with-docker/podman-build.sh as build 'driver'.)

+ cp /opt/owntone/make-it-longer/mariadb-server/include/welcome_copyright_notice.h /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/src/debug/MariaDB-/src_0/include
+ cp /opt/owntone/make-it-longer/mariadb-server/extra/mariabackup/xbstream_read.cc /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/src/debug/MariaDB-/src_0/extra/mariabackup
+ /usr/bin/find-debuginfo -j12 --strict-build-id -m -i --build-id-seed 11.1.3-1.fc39 --unique-debug-suffix -11.1.3-1.fc39.x86_64 --unique-debug-src-base MariaDB-backup-11.1.3-1.fc39.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/BUILD/
gdb-add-index: Failed to find a useable GDB binary
gdb-add-index: Failed to find a useable GDB binary
dwz: Too few files for multifile optimization
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
+ /usr/lib/rpm/brp-remove-la-files
+ env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j12
+ /usr/lib/rpm/redhat/brp-python-hardlink
error: File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mariabackup.1\*
error: File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mariadb-backup.1\*
error: File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mbstream.1\*
    File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mariabackup.1\*
    File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mariadb-backup.1\*
    File not found: /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/mbstream.1\*
 ***
CPackRPM:Debug:    - /opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/rpmbuildMariaDB-backup.out
CPackRPM:Debug: *** Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1278201600
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.duhACG
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.rwP05T
find-debuginfo: starting
Extracting debug info from 2 files
DWARF-compressing 2 files
sepdebugcrcfix: Updated 2 CRC32s, 0 CRC32s did match.
Creating .debug symlinks for symlinks to ELF files
find-debuginfo: done
Processing files: MariaDB-backup-11.1.3-1.fc39.x86_64
 
RPM build errors:
 ***
CMake Error at /usr/share/cmake/Modules/Internal/CPack/CPackRPM.cmake:1897 (message):
  RPM package was not generated!

This is interesting as the files exist but as *.gz:

$ ls opt/owntone/make-it-longer/mariadb-build/_CPack_Packages/Linux/RPM/mariadb-11.1.3-linux-x86_64/backup/usr/share/man/man1/
mariabackup.1.gz  mariadb-backup.1.gz  mbstream.1.gz



 Comments   
Comment by Sergei Golubchik [ 2023-11-15 ]

reported an upstream bug https://gitlab.kitware.com/cmake/cmake/-/issues/25421

Comment by Sergei Golubchik [ 2023-11-15 ]

when I used my sudo powers to edit

/usr/share/cmake/Modules/Internal/CPack/CPackRPM.cmake

-    string(APPEND INSTALL_FILES "${DIRECTIVE}\"${F}\"\n")
+    string(APPEND INSTALL_FILES "${DIRECTIVE}${F}\n")

then the build succeeded. Obviously, I did it just to test my hypothesis, it's not what we recommend users to do

Comment by Thomas Pasch [ 2023-11-25 ]

Hm, if I patch cmake, I could build rpms on f39:

$ ls
MariaDB-backup-11.1.4-1.fc39.x86_64.rpm            MariaDB-devel-11.1.4-1.fc39.x86_64.rpm
MariaDB-backup-debuginfo-11.1.4-1.fc39.x86_64.rpm  MariaDB-devel-debuginfo-11.1.4-1.fc39.x86_64.rpm
MariaDB-client-compat-11.1.4-1.fc39.noarch.rpm     MariaDB-server-compat-11.1.4-1.fc39.noarch.rpm
MariaDB-common-11.1.4-1.fc39.x86_64.rpm            MariaDB-test-11.1.4-1.fc39.x86_64.rpm
MariaDB-common-debuginfo-11.1.4-1.fc39.x86_64.rpm  MariaDB-test-debuginfo-11.1.4-1.fc39.x86_64.rpm

I wonder if the build is still incomplete, because I'm missing MariaDB-client.rpm and MariaDB-server.rpm here. Trying to install MariaDB-server-compat-11.1.4-1.fc39.noarch.rpm leads to

# dnf install ./MariaDB-server-compat-11.1.4-1.fc39.noarch.rpm 
keybase                                                                                     892  B/s | 3.3 kB     00:03    
Fehler: 
 Problem: package MariaDB-server-compat-11.1.4-1.fc39.noarch from @commandline requires MariaDB-server >= 11.0.0, but none of the providers can be installed
  - package MariaDB-server-11.1.1-1.el9.x86_64 from mariadb requires galera-4, but none of the providers can be installed
  - package MariaDB-server-11.1.2-1.el9.x86_64 from mariadb requires galera-4, but none of the providers can be installed
  - package MariaDB-server-11.1.3-1.el9.x86_64 from mariadb requires galera-4, but none of the providers can be installed
  - widersprüchliche Anforderungen
  - nothing provides libboost_program_options.so.1.75.0()(64bit) needed by galera-4-26.4.14-1.el9.x86_64 from mariadb
  - nothing provides libboost_program_options.so.1.75.0()(64bit) needed by galera-4-26.4.16-1.el9.x86_64 from mariadb

Well, let me put it this way: The primary reason I've try to build MariaDB on my own is that I want to install the server on f39 (as no official RPMS for f39 are provided).

What am I missing here? Is it possible to build MariaDB-server-11.1.4-1.fc39.x86_64.rpm (and - if needed - galera-4-whatever.rpm) on my own?

Comment by Sergei Golubchik [ 2023-11-27 ]

I've tried to build, it seems there's a second quoting place in CPackRPM.cmake

-     string(APPEND CPACK_RPM_USER_INSTALL_FILES "${F_PREFIX}\"${F_PATH}\"\n")
+     string(APPEND CPACK_RPM_USER_INSTALL_FILES "${F_PREFIX}${F_PATH}\n")

when I fixed this one too, all packages were built fine.

Generated at Thu Feb 08 10:33:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.