This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: How to change go Package Management Agent address?

Part Number: SK-AM62

Hello,

While following the directions (link to TI directions) for building the Processor SDK the following error was reported and the build failed:

Invoked by:

$MACHINE=am62xx-evm bitbake -k 

ERROR: websocketd-0.4.1-r0 do_compile: Execution of '/home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/temp/run.do_compile.2824' failed with exit code 1
ERROR: Logfile of failure stored in: /home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/temp/log.do_compile.2824
Log data follows:
| DEBUG: Executing shell function do_compile
| go: github.com/gorilla/websocket@v1.4.0: Get "https://proxy.golang.org/github.com/gorilla/websocket/@v/v1.4.0.mod": dial tcp 142.251.43.17:443: i/o timeout
| go: github.com/gorilla/websocket@v1.4.0: Get "https://proxy.golang.org/github.com/gorilla/websocket/@v/v1.4.0.mod": dial tcp 142.251.43.17:443: i/o timeout
| WARNING: /home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/temp/run.do_compile.2824:1 exit 1 from 'aarch64-none-linux-gnu-go install -p 8 -v -ldflags="-r /usr/lib/go/pkg/linux_arm64_dynlink -extldflags ' --sysroot=/home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/recipe-sysroot -Wl,-rpath-link=/home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/recipe-sysroot/usr/lib/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed'" -modcacherw -buildmode=pie `go_list_packages`'
| ERROR: Execution of '/home/devsoc/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/websocketd/0.4.1-r0/temp/run.do_compile.2824' failed with exit code 1
ERROR: Task (/home/devsoc/tisdk/sources/meta-arago/meta-arago-extras/recipes-devtools/websocketd/websocketd_0.4.1.bb:do_compile) failed with exit code '1'

According to the log, we can find the error reason is my PC can't get access to the go Package Management Agent address https://proxy.golang.org.  Chinese Internet blocked the site. So I want to change this address to https://goproxy.cn,  which is also a go Package Management Agent address and can be accessed in China. 

Where should I change the address in code?

  • According to the log, we can find the error reason is my PC can't get access to the go Package Management Agent address https://proxy.golang.org.  Chinese Internet blocked the site. So I want to change this address to https://goproxy.cn,  which is also a go Package Management Agent address and can be accessed in China. 

    Where should I change the address in code?

    I had a quick look, there doesn't seem to be an easy/simple place to change that in the Yocto sources, but instead this server URL is used throughout the downloaded sources. So one way to change this address would be to create patches for all applicable modules that use this URL to update those to the different .cn address you have, and add those patches to the respective recipes in the Yocto source tree.

    The above is a lot of work but there might be an easier way. I noticed a lot of the different sources contain this piece of go code...

    GOPROXY    = envOr("GOPROXY", "https://proxy.golang.org,direct")

    ...which suggests the build would be using the server from the shell environment, if configured via GOPROXY. So I would suggest to try this. Doing so should require two steps to be done before your build:

    1. Edit your build/conf/setenv file and look for the BB_ENV_EXTRAWHITE variable that is exported there (note I think this variable will have a different name in Kirkstone-based TI v9.x SDKs). To that variable definition, add GOPROXY at the end. This is needed to expose this additional ENV variable to the Yocto build.
    2. Add an additional line to that build/conf/setenv file (or run it from the command line, whatever you prefer)

    Please give this a try and report back here. Also you may need to do a completely clean build.

    Regards, Andreas