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

build: configure fails on kernel without InfiniBand by default

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • 3
    • 9223372036854775807

      [Claude] Building Lustre against a kernel without InfiniBand (CONFIG_INFINIBAND not set, e.g. many aarch64 VM kernels) fails at configure unless --with-o2ib=no is given:

      configure: error: cannot compile with OpenIB gen2 headers
      

      In config/lustre-lnet.m4 the -with-o2ib default is with_o2ib="yes", so the default cannot be told apart from an explicit -with-o2ib=yes. The in-kernel o2ib check only tests that rdma/rdma_cm.h, rdma/ib_cm.h and rdma/ib_verbs.h exist, and those headers are present in every kernel tree whether or not IB is configured. The following "OpenIB gen2 support" compile test then fails on rdma_destroy_id(), and because ENABLEO2IB="yes" it is a hard error rather than disabling o2iblnd.

      Proposed fix:

      • make the default auto-detect, separate from an explicit --with-o2ib=yes;
      • only consider in-kernel o2iblnd buildable if the kernel has CONFIG_INFINIBAND and CONFIG_INFINIBAND_ADDR_TRANS (rdma_cm), otherwise warn and build without it, as already done when the headers are missing;
      • keep the hard error for an explicit -with-o2ib=yes or -with-o2ib=<path>.

      Seen with ltvm, which now passes --with-o2ib=yes by default (lustre-test-vms PR #29), on rocky8/9/10 and Ubuntu 26.04 aarch64 kernels. Related: patch https://review.whamcloud.com/69451 ("LU-20872 build: Honor o2ib configuration in packaging") also changes the o2ib detection.

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: