Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831970 - sys-apps/fwupd-efi fails to compile with Clang: clang-13: error: unsupported option '-print-multi-os-directory'
Summary: sys-apps/fwupd-efi fails to compile with Clang: clang-13: error: unsupported ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Marek Szuba (RETIRED)
URL:
Whiteboard:
Keywords:
: 832105 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-24 12:20 UTC by Agostino Sarubbo
Modified: 2022-07-28 13:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,40.39 KB, text/plain)
2022-01-24 12:20 UTC, Agostino Sarubbo
Details
1-meson-log.txt (1-meson-log.txt,3.93 KB, text/plain)
2022-01-24 12:20 UTC, Agostino Sarubbo
Details
build log (build.log,6.03 KB, text/plain)
2022-07-28 11:01 UTC, Anton Gubarkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-01-24 12:20:13 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-apps/fwupd-efi-1.1 fails to compile.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses CLANG as a compiler and LLD as a linker
Comment 1 Agostino Sarubbo gentoo-dev 2022-01-24 12:20:15 UTC
Created attachment 763491 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-01-24 12:20:17 UTC
Created attachment 763492 [details]
1-meson-log.txt

1-meson-log.txt
Comment 3 Agostino Sarubbo gentoo-dev 2022-01-24 12:20:18 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


Program genpeimg found: NO
efi/meson.build:55:6: ERROR: Problem encountered: Cannot find elf_x86_64_efi.lds
Comment 4 Marek Szuba (RETIRED) archtester gentoo-dev 2022-07-27 13:18:44 UTC
*** Bug 832105 has been marked as a duplicate of this bug. ***
Comment 5 Marek Szuba (RETIRED) archtester gentoo-dev 2022-07-27 13:21:24 UTC
Does this happen with 1.3 as well?
Comment 6 Anton Gubarkov 2022-07-28 11:01:11 UTC
Created attachment 795236 [details]
build log

1.3 still triggers the error for me.

The Meson build system
Version: 0.63.0
Source dir: /var/tmp/portage/sys-apps/fwupd-efi-1.3/work/fwupd-efi-1.3
Build dir: /var/tmp/portage/sys-apps/fwupd-efi-1.3/work/fwupd-efi-1.3-build
Build type: native build
Project name: fwupd-efi
Project version: 1.3
C compiler for the host machine: clang (clang 14.0.6 "clang version 14.0.6")
C linker for the host machine: clang ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program x86_64-pc-linux-gnu-objcopy found: YES
Program genpeimg found: NO
Configuring config.h using configuration
Program generate_sbat.py found: YES (/var/tmp/portage/sys-apps/fwupd-efi-1.3/work/fwupd-efi-1.3/efi/generate_sbat.py)
Program generate_binary.py found: YES (/var/tmp/portage/sys-apps/fwupd-efi-1.3/work/fwupd-efi-1.3/efi/generate_binary.py)
Has header "/usr/include/efi/x86_64/efibind.h" : YES
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300

efi/meson.build:57:6: ERROR: Problem encountered: Cannot find elf_x86_64_efi.lds
Comment 7 Marek Szuba (RETIRED) archtester gentoo-dev 2022-07-28 11:46:24 UTC
Gotta love misleading end-user error messages. At least meson logs HAVE captured the root of the problem!
Comment 8 Larry the Git Cow gentoo-dev 2022-07-28 13:03:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9541fad8fb8167c5f4b9fa6ceb58839139fd8014

commit 9541fad8fb8167c5f4b9fa6ceb58839139fd8014
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2022-07-28 12:10:05 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2022-07-28 13:03:46 +0000

    sys-apps/fwupd-efi: have the ebuilds set efi-libdir
    
    Upstream build scripts attempt to determine the ABI-correct libdir name
    by calling '${CC} -print-multi-os-directory', which does not work with
    clang. Fortunately, we have a perfectly good mechanism for this
    available to the ebuilds.
    
    Closes: https://bugs.gentoo.org/831970
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 sys-apps/fwupd-efi/fwupd-efi-1.3.ebuild | 1 +
 1 file changed, 1 insertion(+)