Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: mthompson@dustyrobotics.com, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang
Date: Fri, 18 Sep 2020 23:04:14 -0700	[thread overview]
Message-ID: <8132db85-5881-636e-c091-d84c47efe4fe@gmail.com> (raw)
In-Reply-To: <23477.1600472819113950080@lists.yoctoproject.org>



On 9/18/20 4:46 PM, Mike Thompson via lists.yoctoproject.org wrote:
> OK, I'm making some progress a Bitbake recipe for the Tailscale client 
> built using Go from various samples I found in the OpenEmbedded layers.
> However, I'm running into import issues during compilation and I'm 
> hoping a person familiar with Go might be able to provide some hints. 
>  From what I can tell, Go packages to are allowed to declare that they 
> must be imported using a specific name 
> <https://golang.org/cmd/go/#hdr-Import_path_checking> and it seems that 
> declaration is included in the Tailscale source code.
> Is there a way to craft the Bitbake recipe to honor that requirement for 
> the Tailscale Go source code?
> Currently, my Bitbake recipe for Tailscale looks as shown below.
> tailscale_1.0.5.bb
> -----------------------------------------------------------------
> SUMMARY = "Tailscale client and daemon for Linux"
> HOMEPAGE = "github.com/tailscale/tailscale"
> LICENSE = "DWTFYW"
> LIC_FILES_CHKSUM = 
> "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"
> GO_IMPORT = "github.com/tailscale/tailscale"
> SRC_URI = "git://${GO_IMPORT};nobranch=1;tag=v${PV}"
> inherit go
> GO_INSTALL = "${GO_IMPORT}/cmd/tailscale"
> RDEPENDS_${PN}-dev += "bash"
> -----------------------------------------------------------------
> The Bitbake output with the import error is below:
> -----------------------------------------------------------------
> $ bitbake tailscale
> ...
> NOTE: Executing Tasks
> ERROR: tailscale-1.0.5-r0 do_compile: Execution of 
> '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' 
> failed with exit code 1:
> can't load package: package 
> github.com/tailscale/tailscale/cmd/tailscale: code in directory 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale 
> expects import "tailscale.com/cmd/tailscale"
> can't load package: package .: no Go files in 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
> WARNING: exit code 1 from a shell command.
> ERROR: Logfile of failure stored in: 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/log.do_compile.10615
> Log data follows:
> | DEBUG: Executing shell function do_compile
> | can't load package: package 
> github.com/tailscale/tailscale/cmd/tailscale: code in directory 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale 
> expects import "tailscale.com/cmd/tailscale"
> | can't load package: package .: no Go files in 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
> | WARNING: exit code 1 from a shell command.
> | ERROR: Execution of 
> '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' 
> failed with exit code 1:
> | can't load package: package 
> github.com/tailscale/tailscale/cmd/tailscale: code in directory 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale 
> expects import "tailscale.com/cmd/tailscale"
> | can't load package: package .: no Go files in 
> /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build
> | WARNING: exit code 1 from a shell command.
> |
> ERROR: Task 
> (/home/mike/Development/markbot_linux/sources/meta-markbot/recipes-tailscale/tailscale/tailscale_1.0.5.bb:do_compile) 
> failed with exit code '1'
> NOTE: Tasks Summary: Attempted 2253 tasks of which 2245 didn't need to 
> be rerun and 1 failed.
> -----------------------------------------------------------------
> Thanks,
> Mike Thompson


perhaps you need to inherit go-mod as well, if its using modules.

> 
> 
> 
> 

  reply	other threads:[~2020-09-19  6:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  5:43 Yocto recipe for Tailscale #yocto #golang Mike Thompson
2020-09-18  6:26 ` [yocto] " Nicolas Jeker
2020-09-18 23:46   ` Mike Thompson
2020-09-19  6:04     ` Khem Raj [this message]
2020-09-19 10:13       ` Mike Thompson
2020-09-19 20:58         ` Mike Thompson
2020-09-21 17:30           ` [yocto] " Randy MacLeod
2020-09-23  4:49             ` Mike Thompson
2020-10-13 18:51               ` Mike Thompson
2020-10-13 19:42                 ` [yocto] " Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8132db85-5881-636e-c091-d84c47efe4fe@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=mthompson@dustyrobotics.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox