Clang fails to communicate RUNPATH?

  • Open
  • quality assurance status badge
Details
One participant
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 12 Apr 11:36 +0200
(address . bug-guix@gnu.org)
ea7bdbf65e1bb57f5a1b976d4da17c4612d85d57.camel@ist.tugraz.at
Hi Guix,

I've noticed a strange error when attempting to build my software
against clang-toolchain. I've attached a minimally breaking example,
but the gist of it is that RUNPATH validation fails as shown below.

starting phase `validate-runpath'
validating RUNPATH of 1 binaries in
"/gnu/store/sd1zjjf13mi448qbqaphhcvf9ap5jxji-why-hello-0/bin"...
/gnu/store/sd1zjjf13mi448qbqaphhcvf9ap5jxji-why-hello-0/bin/hello:
error: depends on 'libfmt.so.9', which cannot be found in RUNPATH
 ("/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib")

Is this expected? I know that the -for-system have historically
disregarded the existence of clang-toolchain and hence led to issues,
but I think this is something else…

Cheers
(use-modules (gnu packages pretty-print) (gnu packages pkg-config) (guix packages) (guix gexp) (guix transformations) (guix build-system meson) ((guix licenses) #:select (gpl3+)) ((guix git-download) #:select (git-file-name)) (srfi srfi-26)) (define why-hello (package (name "why-hello") (version "0") (source (file-union (git-file-name name version) `(("hello.cpp" ,(plain-file "hello.cpp" "\ #include <fmt/format.h> int main() { fmt::print (\"{}\\n\", \"Hello, world\"); return 0; } ")) ("meson.build" ,(plain-file "meson.build" "\ project('hello', 'cpp', default_options: ['cpp_std=c++20']) executable('hello', files('hello.cpp'), install: true, dependencies: [dependency('fmt')]) "))))) (build-system meson-build-system) (inputs (list fmt)) (native-inputs (list pkg-config)) (home-page (and=> (current-filename) (cute string-append "file://" <>))) (synopsis "Hello world") (description "This package provides a simple program that builds with GCC/G++ normally, but fails miserably when the clang-toolchain is used.") (license gpl3+))) (define why-hello-clang ((options->transformation '((with-c-toolchain . "why-hello=clang-toolchain"))) why-hello)) why-hello-clang
?