[Bug 2084316] [NEW] FTBFS due to unreadable /proc/self/map_files

Daniel Richard G. 2084316 at bugs.launchpad.net
Sat Oct 12 03:44:20 UTC 2024


Public bug reported:

This concerns llvm-toolchain-18 version 1:18.1.8-11 in Ubuntu oracular.

A build of this package in a container environment fails with

[...]
dh_install --fail-missing 
dh_install: warning: Please use dh_missing --list-missing/--fail-missing instead
dh_install: warning: This feature will be removed in compat 12.
dh_install: warning: Cannot find (any matches for) "/usr/lib/llvm-18/lib/libbolt_rt_hugify.a" (tried in ., debian/tmp)

dh_install: warning: libbolt-18-dev missing files: /usr/lib/llvm-18/lib/libbolt_rt_hugify.a
dh_install: warning: Cannot find (any matches for) "/usr/lib/llvm-18/lib/libbolt_rt_instr.a" (tried in ., debian/tmp)

dh_install: warning: libbolt-18-dev missing files: /usr/lib/llvm-18/lib/libbolt_rt_instr.a
dh_install: error: missing files, aborting
make[1]: *** [debian/rules:1461: override_dh_install] Error 25
make[1]: Leaving directory '/external/tmp/llvm-toolchain-18-18.1.8'
make: *** [debian/rules:597: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
Command exited with non-zero status 2


The libraries at issue are not built due to the following check in bolt/CMakeLists.txt:

if (BOLT_ENABLE_RUNTIME)
  # Some systems prevent reading /proc/self/map_files
  execute_process(COMMAND ls /proc/self/map_files
    RESULT_VARIABLE LS OUTPUT_QUIET ERROR_QUIET)
  if (LS)
    set(BOLT_ENABLE_RUNTIME OFF)
    message(WARNING
      "BOLT runtime is disabled as /proc/self/map_files is unreadable.")
  endif()
endif()


That proc file is not accessible in the container environment:

$ ls -l /proc/self/map_files
ls: reading directory '/proc/self/map_files': Operation not permitted


However, the access does not appear to be necessary. Commenting out the set() statement allows the build to complete successfully. This modification should be included in the package's patches.

** Affects: llvm-toolchain-18 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: oracular

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to llvm-toolchain-18 in Ubuntu.
https://bugs.launchpad.net/bugs/2084316

Title:
  FTBFS due to unreadable /proc/self/map_files

Status in llvm-toolchain-18 package in Ubuntu:
  New

Bug description:
  This concerns llvm-toolchain-18 version 1:18.1.8-11 in Ubuntu
  oracular.

  A build of this package in a container environment fails with

  [...]
  dh_install --fail-missing 
  dh_install: warning: Please use dh_missing --list-missing/--fail-missing instead
  dh_install: warning: This feature will be removed in compat 12.
  dh_install: warning: Cannot find (any matches for) "/usr/lib/llvm-18/lib/libbolt_rt_hugify.a" (tried in ., debian/tmp)

  dh_install: warning: libbolt-18-dev missing files: /usr/lib/llvm-18/lib/libbolt_rt_hugify.a
  dh_install: warning: Cannot find (any matches for) "/usr/lib/llvm-18/lib/libbolt_rt_instr.a" (tried in ., debian/tmp)

  dh_install: warning: libbolt-18-dev missing files: /usr/lib/llvm-18/lib/libbolt_rt_instr.a
  dh_install: error: missing files, aborting
  make[1]: *** [debian/rules:1461: override_dh_install] Error 25
  make[1]: Leaving directory '/external/tmp/llvm-toolchain-18-18.1.8'
  make: *** [debian/rules:597: binary] Error 2
  dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
  Command exited with non-zero status 2

  
  The libraries at issue are not built due to the following check in bolt/CMakeLists.txt:

  if (BOLT_ENABLE_RUNTIME)
    # Some systems prevent reading /proc/self/map_files
    execute_process(COMMAND ls /proc/self/map_files
      RESULT_VARIABLE LS OUTPUT_QUIET ERROR_QUIET)
    if (LS)
      set(BOLT_ENABLE_RUNTIME OFF)
      message(WARNING
        "BOLT runtime is disabled as /proc/self/map_files is unreadable.")
    endif()
  endif()

  
  That proc file is not accessible in the container environment:

  $ ls -l /proc/self/map_files
  ls: reading directory '/proc/self/map_files': Operation not permitted

  
  However, the access does not appear to be necessary. Commenting out the set() statement allows the build to complete successfully. This modification should be included in the package's patches.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-18/+bug/2084316/+subscriptions




More information about the foundations-bugs mailing list