<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12704</bug_id>
          
          <creation_ts>2018-04-20 14:50:16 +0000</creation_ts>
          <short_desc>Go fails to build on older hosts</short_desc>
          <delta_ts>2018-04-26 07:59:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Matt Madison">matt</assigned_to>
          <cc>matt</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>otavio</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80364</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-04-20 14:50:16 +0000</bug_when>
    <thetext>ERROR: go-runtime-1.9.4-r0 do_compile: Function failed: do_compile (log file is located at /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/go-runtime/1.9.4-r0/temp/log.do_compile.54340)
...
| ##### Building Go toolchain using /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/go-runtime/1.9.4-r0/recipe-sysroot-native/usr/lib/go.
| # runtime/cgo
| gcc: error: unrecognized command line option ‘-fstack-protector-strong’


Looks like it&apos;s trying to use the host compiler with target CFLAGS, which isn&apos;t right.

This broke a test-M4 build so hopefully we can get this fixed asap.

https://autobuilder.yocto.io/builders/nightly-world-lsb/builds/941/steps/BuildImages/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80367</commentid>
    <comment_count>1</comment_count>
    <who name="Matt Madison">matt</who>
    <bug_when>2018-04-21 06:16:19 +0000</bug_when>
    <thetext>The issue is specifically with CGO_CFLAGS and CGO_LDFLAGS, which are being set in go-runtime.inc to the target values.  For the go 1.10 runtime build, that&apos;s the right setting, since it only builds target binaries.  That&apos;s not good for the go 1.9 runtime build, though, since it builds the host binaries before building the target binaries.

Overriding those settings on the host-side invocation of make.bash should take care of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80416</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-04-26 07:59:40 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=00fe24fe8cbec81362e04c4c56ff4d33384cf72c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>