Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14344

Cmake arguments Fedora RPM

    XMLWordPrintable

Details

    Description

      Hello,
      I'd love to go through our Cmake arguments in Fedora and listen to your feedback, because in several cases I'm not sure which to use and which values are correct, because the cmake files are hardly readable for me.

      Also, I have to use many macros to automatize the build.

      The first part:

      %cmake . \
               -DBUILD_CONFIG=mysql_release \
               -DFEATURE_SET="community" \
               -DINSTALL_LAYOUT=RPM \
               -DDAEMON_NAME="%{daemon_name}" \
               -DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \
               -DLOG_LOCATION="%{logfile}" \
               -DPID_FILE_DIR="%{pidfiledir}" \
               -DNICE_PROJECT_NAME="MariaDB" \
               -DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \
               -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
               -DINSTALL_SYSCONFDIR="%{_sysconfdir}" \
               -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \
               -DINSTALL_DOCDIR="share/doc/%{_pkgdocdirname}" \
               -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \
               -DINSTALL_INCLUDEDIR=include/mysql \
               -DINSTALL_INFODIR=share/info \
               -DINSTALL_LIBDIR="%{_lib}" \
               -DINSTALL_MANDIR=share/man \
               -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \
               -DINSTALL_MYSQLTESTDIR=share/mysql-test \
               -DINSTALL_PLUGINDIR="%{_lib}/%{pkg_name}/plugin" \
               -DINSTALL_SBINDIR=libexec \
               -DINSTALL_SCRIPTDIR=bin \
               -DINSTALL_SQLBENCHDIR=share \
               -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \
               -DMYSQL_DATADIR="%{dbdatadir}" \
               -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
               -DTMPDIR=/var/tmp \
      

      The first part should be straightforward. I have to provide a path or some text. Easy.

      Now comes the second part:

               -DENABLED_LOCAL_INFILE=ON \
               -DENABLE_DTRACE=ON \
               -DWITH_EMBEDDED_SERVER=%{?with_embedded:ON}%{!?with_embedded:OFF} \
               -DWITH_SSL=system \
               -DWITH_ZLIB=system \
               -DWITH_PCRE=%{?with_bundled_pcre:system}%{!?with_bundled_pcre:bundled} \
               -DWITH_JEMALLOC=system \
               -DWITH_LIBARCHIVE=ON \
               -DWITH_MARIABACKUP=%{?with_backup:ON}%{!?with_backup:NO} \
               -DWITH_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \
               -DWITH_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \
               -DWITH_OQGRAPH=%{?with_oqgraph:DYNAMIC}%{!?with_oqgraph:NO} \
               -DWITH_SPHINX=%{!?with_sphinx:DYNAMIC}%{?with_sphinx:NO} \
      %{?with_debug: -DCMAKE_BUILD_TYPE=Debug} \
      %{?_hardened_build: -DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now"}
       
      make %{?_smp_mflags} VERBOSE=1
      
      

      In this part I'm not sure, which values to use at all.
      ON / OFF ?
      ON / NO ?
      system / ... ?

      In cmake/plugin.cmake you say:

          # NO - not at all
          # YES - static if possible, otherwise dynamic if possible, otherwise abort
          # AUTO - static if possible, otherwise dynamic, if possible
          # STATIC - static if possible, otherwise not at all
          # DYNAMIC - dynamic if possible, otherwise not at all
      

      But I'm not sure if that apply only to plugins or which parts are labeled as plugins at the first place. (Is mariadbackup a plugin? It only contains binaries ... ; Are storage engines plugins? Which?)

      From the cmakes I got also a feeling that there are many ways to define such a thing, but only some of them are "the right way" to do it. In that case I'm here for such advice too.

      If you'd like to check your latest pushed SPECfile, here it is.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            mschorm Michal Schorm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.