Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19226

Failed to build Lustre RPMs with server support enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • Lustre 2.16.1
    • 3
    • 9223372036854775807

    Description

      While attempting to build Lustre RPMs with server support enabled (--enable-server), the build fails with the following error:

      ```
      ...
      Type 'make' to build Lustre.
      + grep -q 'define[[:space:]]*HAVE_SERVER_SUPPORT' config.h
      + echo 'Error: Server Support configured but not found'
      Error: Server Support configured but not found
      + false
      error: Bad exit status from /tmp/rpmbuild-lustre-root-QXs90DcT/TMP/rpm-tmp.MFDE8Q (%build)
      ...

      RPM build errors:
      Bad exit status from /tmp/rpmbuild-lustre-root-QXs90DcT/TMP/rpm-tmp.MFDE8Q (%build)
      make: *** [autoMakefile:1367: rpms] Error 1
      ```

      This issue was observed at commit id: 48301dd9625b536861d21f2d3b7646cf61cda470.

      My Build Steps:
      To reproduce the issue, I followed these steps:
      1. Cloned the Lustre release repository:
      git clone git://git.whamcloud.com/fs/lustre-release.git
      2. Changed into the repository directory:
      cd lustre-release
      3. Generated the build scripts:
      ./autogen.sh
      4. Configured the build system with server support enabled:
      ./configure --enable-server
      5. Attempted to build RPM packages:
      make rpms

      During the RPM build process, the error "Server Support configured but not found" is triggered, resulting in a failed build.

      Proposed Fix:
      I have prepared a patch that modifies the lustre.spec.in file to correctly handle the server support configuration. The key change is to ensure that the --enable-server option is passed when the with_servers variable is set:

      ```

      • % {!?with_servers:--disable-server}

        \
        + %{?with_servers:--enable-server}%

        {!?with_servers:--disable-server}

        \
        ```
        Additionally, I have checked the code history and found no recent changes related to the --enable-server logic. Therefore, I am not certain that this fix represents the best practice or the optimal solution for this issue.

      Attachments

        1. fix.patch
          0.8 kB
          Chen Linxuan
        2. poc.sh
          0.7 kB
          Chen Linxuan

        Activity

          People

            wc-triage WC Triage
            chenlx163 Chen Linxuan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: