Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924988 - app-emulation/qemu-8.2.1 fails to compile: ERROR: -static-pie not available due to missing toolchain support
Summary: app-emulation/qemu-8.2.1 fails to compile: ERROR: -static-pie not available d...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-19 16:18 UTC by Agostino Sarubbo
Modified: 2024-02-20 09:04 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,51.25 KB, text/plain)
2024-02-19 16:18 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-02-19 16:18:41 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-emulation/qemu-8.2.1 fails to compile.
Discovered on: arm (internal ref: tinderbox_arm)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-19 16:18:42 UTC
Created attachment 885424 [details]
build.log

build log and emerge --info
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2024-02-19 21:28:43 UTC
ERROR: -static-pie not available due to missing toolchain support

That's weird, because the ebuild only adds that flag if the toolchain suports it:

    # We always want to attempt to build with PIE support as it results
    # in a more secure binary. But it doesn't work with static or if
    # the current GCC doesn't have PIE support.
    if [[ ${static_flag} != "none" ]] && use ${static_flag}; then
        conf_opts+=( --static --disable-pie )
    else
        tc-enables-pie && conf_opts+=( --enable-pie )
    fi

While the configure script has:

  if compile_prog "-Werror -fPIE -DPIE" "$pie_ldflags"; then
    pie="yes"
  elif test "$pie" = "yes"; then
    error_exit "-static-pie not available due to missing toolchain support"
  else
    echo "Disabling PIE due to missing toolchain support"
    pie="no"
  fi

Can you share the associated config.log?
Comment 3 Agostino Sarubbo gentoo-dev 2024-02-20 09:04:30 UTC
really strange because on the same environment I can't reproduce anymore. So I suppose that it was cause by something else.
Let's mark as WORKSFORME for now