<?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>15095</bug_id>
          
          <creation_ts>2023-04-05 08:57:35 +0000</creation_ts>
          <short_desc>recipes-devtools/go-1.20 native: not possible to build with go 1.4</short_desc>
          <delta_ts>2024-07-25 15:04:44 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jonas.licht</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sakib.sajal</cc>
    
    <cc>tgamblin</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>95292</commentid>
    <comment_count>0</comment_count>
    <who name="">jonas.licht</who>
    <bug_when>2023-04-05 08:57:35 +0000</bug_when>
    <thetext>To bootstrap golang version 1.20 at least Go 1.17.13 is required. https://go.dev/doc/go1.20#bootstrap

So trying to build go-native-1.20.1-r0 fails with:
| DEBUG: Executing shell function do_compile
| Building Go cmd/dist using /home/bitbake/oe-build/build/tmp/work/x86_64-linux/go-native/1.20.1-r0/go1.4/go. (go1.4-bootstrap-20170531 linux/amd64)
| can&apos;t load package: package ./cmd/dist: found packages build.go (main) and notgo117.go (building_Go_requires_Go_1_17_13_or_later) in /home/bitbake/oe-build/build/tmp/work/x86_64-linux/go-native/1.20.1-r0/go/src/cmd/dist
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of &apos;/home/bitbake/oe-build/build/tmp/work/x86_64-linux/go-native/1.20.1-r0/temp/run.do_compile.4163319&apos; failed with exit code 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95307</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-06 14:46:36 +0000</bug_when>
    <thetext>The bootstrap mechanism seems to use the same PV when building go so it&apos;s not clear how you are encountering this problem. Can you explain how to reproduce the issue in detail?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95327</commentid>
    <comment_count>2</comment_count>
    <who name="">jonas.licht</who>
    <bug_when>2023-04-11 08:47:35 +0000</bug_when>
    <thetext>(In reply to Randy MacLeod from comment #1)
&gt; The bootstrap mechanism seems to use the same PV when building go so it&apos;s
&gt; not clear how you are encountering this problem. Can you explain how to
&gt; reproduce the issue in detail?

Did you have some e.g. docker environment for a yocto example build to demonstrate the issue?

If I look into the go-native_1.20.1.bb it says in it&apos;s comment to first build go1.4 as the bootstrap version [0].
Buildroot is encountering some simualr error [1].

However, you can avoid to build you native go with the bootstrapping version by using the go-binary-native recipe.
Therefor I need to set PREFERRED_PROVIDER_go-native = &quot;go-binary-native&quot;


[0] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/go/go-native_1.20.1.bb
[1] https://lore.kernel.org/buildroot/CA+h8R2rtcynkCBsz=_9yANOEguyPCOcQDj8_ns+cv8RS8+8t9A@mail.gmail.com/T/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95353</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-13 14:59:22 +0000</bug_when>
    <thetext>Movign to unassigned. Jonas, you want to work on this go for it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95370</commentid>
    <comment_count>4</comment_count>
    <who name="">jonas.licht</who>
    <bug_when>2023-04-14 15:03:20 +0000</bug_when>
    <thetext>(In reply to Randy MacLeod from comment #3)
&gt; Movign to unassigned. Jonas, you want to work on this go for it.

I think the best solution would be to build the go-native directly with gccgo.
But this will require at least gcc version 12 and this will limit the supported Ubuntu version to 22.04 and above.

Another way could be a multistage bootstrapping, so building some intermediate version. But I think this will be a never ending storie.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96078</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-07-26 21:22:02 +0000</bug_when>
    <thetext>Bulk move of 64 bugs to 4.3 M3 after a quick review.
If a bug is actually fixed, please add a commit link and resolve it.
-- Randy for YP bug team.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96494</commentid>
    <comment_count>6</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2023-09-14 16:53:44 +0000</bug_when>
    <thetext>Moved to M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97066</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:29:11 +0000</bug_when>
    <thetext>Bulk move to 5.0 M1. -- Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97665</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-12-21 23:28:27 +0000</bug_when>
    <thetext>Bulk move of 52 5.0-M1 bugs to M2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98025</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-25 14:28:53 +0000</bug_when>
    <thetext>Bulk move of bugs owned by &quot;unassigned&quot; from 5.0-M2 to 5.0-M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99449</commentid>
    <comment_count>10</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-07-25 15:04:44 +0000</bug_when>
    <thetext>We deleted the 1.4 recipe so this is no longer a valid bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>