Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-271

Cmake RPM layout works only for x86_64

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 3.0.2
    • 3.0.9
    • None
    • None
    • Fedora - all

    Description

      Hello,

      I am trying to pack the new CONC/C into Fedora, but I hit an issue with "-DINSTALL_LAYOUT=RPM"
      It both uses wrong paths for non 64-bit arches and does not recognize other 64-bit arches than x86_64.

      Here's the patch I use for my purpose: (attachement)

      I'd suggest to recognize if the CPU is 64-bit, rather than architecture name.

      Attachments

        Activity

          mschorm Michal Schorm added a comment -

          Solved by 3.0.3 release, thanks!

          mschorm Michal Schorm added a comment - Solved by 3.0.3 release, thanks!
          danblack Daniel Black added a comment - - edited

          As I came across solving MDEV-14340, CMAKE_INSTALL_LIBDIR already handles the difference between deb/rpms and 64bit vs 32bit arches and the full solution is rather extensive: https://github.com/Kitware/CMake/blob/master/Modules/GNUInstallDirs.cmake#L178..L257

          Suggest something like:

          SET(INSTALL_LIBDIR_DEFAULT "${CMAKE_INSTALL_LIBDIR}/mariadb")
          

          CMAKE_INSTALL_LIBDIR was added in CMake-2.8.5.

          edit: small against using CMAKE_INSTALL_LIBDIR - its based on cmake detecting debian and adjusting the paths rather than the presence of DEB or RPM cmake definitions.

          danblack Daniel Black added a comment - - edited As I came across solving MDEV-14340 , CMAKE_INSTALL_LIBDIR already handles the difference between deb/rpms and 64bit vs 32bit arches and the full solution is rather extensive: https://github.com/Kitware/CMake/blob/master/Modules/GNUInstallDirs.cmake#L178..L257 Suggest something like: SET(INSTALL_LIBDIR_DEFAULT "${CMAKE_INSTALL_LIBDIR}/mariadb") CMAKE_INSTALL_LIBDIR was added in CMake-2.8.5. edit: small against using CMAKE_INSTALL_LIBDIR - its based on cmake detecting debian and adjusting the paths rather than the presence of DEB or RPM cmake definitions.
          mschorm Michal Schorm added a comment -

          Hmm, strange.

          Can someone please double check, the 843c492 commit made it to the main branch ? ( I suppose master or 3.1)
          I can see the commit in the repository in 3.1 branch, but its effect is not seen in the current HEAD.

          I stumbled upon this issue with recently added cmake directive for packageconfig location, which wasn't properly processed on 64-bit arches other than x86_64.

          Maybe I overlooked it, beacuse I started to specify libdir and plugindir locations, so the statement was effectively ignored on my side.
          I would still worth to apply the commit.

          Also the exampke Daniel showed us seems like a great final solution.

          mschorm Michal Schorm added a comment - Hmm, strange. Can someone please double check, the 843c492 commit made it to the main branch ? ( I suppose master or 3.1) I can see the commit in the repository in 3.1 branch, but its effect is not seen in the current HEAD. I stumbled upon this issue with recently added cmake directive for packageconfig location, which wasn't properly processed on 64-bit arches other than x86_64. Maybe I overlooked it, beacuse I started to specify libdir and plugindir locations, so the statement was effectively ignored on my side. I would still worth to apply the commit. – Also the exampke Daniel showed us seems like a great final solution.
          georg Georg Richter added a comment -

          Yes, you're right - the commit got lost in 2017 by a bad merge from a server branch of MariaDB Connector/C.

          georg Georg Richter added a comment - Yes, you're right - the commit got lost in 2017 by a bad merge from a server branch of MariaDB Connector/C.

          People

            georg Georg Richter
            mschorm Michal Schorm
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.