I’m trying to extend the mender-artifact recipe with nativesdk so I can include it in our SDK. We would like to use it for manipulating the artifact to inject applications build with the SDK. I found a post on the old mailing list, but there was no response: https://groups.google.com/a/lists.mender.io/forum/#!msg/mender/6_A7TVA_H18/EfxRApwBCAAJ
I’m very familiar with Yocto, but not so much with golang, so I’m a bit stumped on where to even start.
I’m hitting the following error:
GOARCH="amd64"
GOBIN=""
GOCACHE="off"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/build:/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot/opt/modus/tonos-r1/2.1.0/sysroots/x86_64-modussdk-linux/usr/lib/x86_64-modussdk-linux/go"
GOPROXY=""
GORACE=""
GOROOT="/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot-native/usr/lib/go"
GOTMPDIR="/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/go-tmp"
GOTOOLDIR="/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot-native/usr/lib/x86_64-modussdk-linux/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="x86_64-modussdk-linux-gcc --sysroot=/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot"
CXX="x86_64-modussdk-linux-g++ --sysroot=/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-O2 -pipe"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -pipe"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-Wl,-O1"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="--sysroot=/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/go-tmp/go-build653512947=/tmp/go-build -gno-record-gcc-switches"
NOTE: make -j 8 GOPATH=/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/build:/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot/opt/modus/tonos-r1/2.1.0/sysroots/x86_64-modussdk-linux/usr/lib/x86_64-modussdk-linux/go -C /home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/build/src/github.com/mendersoftware/mender-artifact V=1 install
make: Entering directory '/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/git/src/github.com/mendersoftware/mender-artifact'
cd cli/mender-artifact && x86_64-modussdk-linux-go install -ldflags "-X main.Version=2.4.1" -v
NOTE: .com is removed below as the forum wont let me post links
github./mendersoftware/mender-artifact/vendor/golang.org/x/sys/unix
github./mendersoftware/mender-artifact/vendor/github.com/pkg/errors
github./mendersoftware/mender-artifact/vendor/github.com/urfave/cli
github./mendersoftware/mender-artifact/artifact
github./mendersoftware/mender-artifact/handlers
github./mendersoftware/mender-artifact/awriter
github./mendersoftware/mender-artifact/areader
github./mendersoftware/mender-artifact/vendor/golang.org/x/crypto/ssh/terminal
github./mendersoftware/mender-artifact/vendor/github.com/sirupsen/logrus
github./mendersoftware/mender-artifact/cli/mender-artifact
# github.com/mendersoftware/mender-artifact/cli/mender-artifact
/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/recipe-sysroot-native/usr/lib/x86_64-modussdk-linux/go/pkg/tool/linux_amd64/link: seeking to -12042 in $WORK/b001/exe/a.out: seek $WORK/b001/exe/a.out: invalid argument
Makefile:45: recipe for target 'install' failed
make: *** [install] Error 2
make: Leaving directory '/home/mcampbell/work/izo-yocto/build-tonos-r1/tmp/work/x86_64-nativesdk-modussdk-linux/nativesdk-mender-artifact/2.4.1-r0/git/src/github.com/mendersoftware/mender-artifact'
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.
Edit: @mirzak: Formatting