Skip to content

Fix parallel installation of libnvme v1 and v3#3525

Merged
igaw merged 2 commits into
linux-nvme:masterfrom
dwsuse:fix-lib-install
Jun 30, 2026
Merged

Fix parallel installation of libnvme v1 and v3#3525
igaw merged 2 commits into
linux-nvme:masterfrom
dwsuse:fix-lib-install

Conversation

@dwsuse

@dwsuse dwsuse commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Parallel installation fails because the headers and man pages collide:

  found conflict of libnvme-devel-1.16.2-2.1.x86_64 with libnvme3-devel-3.0.b.1-1.1.x86_64
  /usr/include/libnvme-mi.h
  /usr/include/libnvme.h
  /usr/share/man/man2/nbft_control.2.gz
  /usr/share/man/man2/nbft_control_flags.2.gz
  /usr/share/man/man2/nbft_desc_type.2.gz
  /usr/share/man/man2/nbft_discovery.2.gz
  /usr/share/man/man2/nbft_discovery_flags.2.gz
  /usr/share/man/man2/nbft_header.2.gz
  /usr/share/man/man2/nbft_heap_obj.2.gz
  /usr/share/man/man2/nbft_hfi.2.gz

Install the headers into a versioned directly and also add a postfix to the man pages, which seems to be the distro choice to handle the versioning.

https://en.opensuse.org/openSUSE:Packaging_conflicts

dwsuse added 2 commits June 30, 2026 14:12
Allow parallel installation of libnvme v1 and v3. Avoid installation
collisions by installing the headers into a versioned subdirectory.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Allow parallel installation of libnvme v1 and v3. Avoid installation
collisions by installing the document into a versioned subdirectory.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
@dwsuse dwsuse force-pushed the fix-lib-install branch from 95d3c57 to 0cb16d3 Compare June 30, 2026 12:38
@martin-belanger

Copy link
Copy Markdown

Another thing that may collide are the udev rules.

@dwsuse

dwsuse commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

yep, but it's just about libnvme, not nvme-cli

the use case here is, that distro are able to keep the v1 library around when updating to nvme-cli3. There are already project using libnvme, thus avoid flag day update scenario here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Meson build/install layout so libnvme v3 can be installed in parallel with libnvme v1 without file conflicts, by versioning the installed header and documentation paths/names.

Changes:

  • Install libnvme headers into a versioned include directory (<includedir>/<libnvme_api_name>/...) and adjust pkg-config include subdir metadata accordingly.
  • Add a -<libnvme_api_name> suffix to generated man page filenames to avoid collisions.
  • Install HTML docs under a versioned directory path.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
meson.build Adjusts non-standard-prefix include path to point at the versioned libnvme include directory.
libnvme/src/meson.build Installs headers under a versioned include directory and updates pkg-config generation to match.
libnvme/doc/meson.build Versions man page output filenames and HTML documentation install path to avoid cross-version collisions.
Comments suppressed due to low confidence (1)

meson.build:506

  • This non-standard-prefix include path now assumes headers are installed under //<libnvme_api_name>. That matches the new install layout, but it will break building nvme-cli against an older pre-installed libnvme3 that still installs headers directly under /. Adding a simple directory-existence fallback would keep compatibility while still preferring the versioned directory when present.
if not want_libnvme and not std_prefix
    libnvme_hdr_location = prefixdir / get_option('includedir') / libnvme_api_name
    message(
        'Using non-standard libnvme headers location: ',
        libnvme_hdr_location
    )

    # Allow compiler to find headers in non-standard location
    add_project_arguments('-I' + libnvme_hdr_location, language : 'c')

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libnvme/doc/meson.build
@igaw igaw merged commit cd2b34a into linux-nvme:master Jun 30, 2026
32 of 33 checks passed
@dwsuse dwsuse deleted the fix-lib-install branch June 30, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants