unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
To: 70349@debbugs.gnu.org
Subject: bug#70349: Clang fails to communicate RUNPATH?
Date: Fri, 12 Apr 2024 11:36:50 +0200	[thread overview]
Message-ID: <ea7bdbf65e1bb57f5a1b976d4da17c4612d85d57.camel@ist.tugraz.at> (raw)

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

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

[-- Attachment #2: why-hello.scm --]
[-- Type: text/x-scheme, Size: 1446 bytes --]

(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

                 reply	other threads:[~2024-04-12  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea7bdbf65e1bb57f5a1b976d4da17c4612d85d57.camel@ist.tugraz.at \
    --to=liliana.prikler@ist.tugraz.at \
    --cc=70349@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).