Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 924988

Summary: app-emulation/qemu-8.2.1 fails to compile: ERROR: -static-pie not available due to missing toolchain support
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Virtualization Team <virtualization>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ajak, dilfridge
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

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