Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building pkg/rngd with latest alpine base fails on x86 #2967

Closed
rn opened this issue Mar 23, 2018 · 1 comment · Fixed by #2969
Closed

Building pkg/rngd with latest alpine base fails on x86 #2967

rn opened this issue Mar 23, 2018 · 1 comment · Fixed by #2969

Comments

@rn
Copy link
Member

rn commented Mar 23, 2018

With linuxkit/alpine:96ad1eb5ec262b4cd0eef574cdc0b225b502d9ee, currently the latest alpine base image, building on x86 we get an error:

linuxkit pkg build .
Building "linuxkit/rngd:245d6e560556875e0b3e3e7ecfdd86f33e6be52f"
Pull (1 of 1): linuxkit/rngd:245d6e560556875e0b3e3e7ecfdd86f33e6be52f@sha256:f3837e2f7bbb4187b389d1b1b1b0621fe2da9977f485883e9b20ae71acf71b14
sha256:f3837e2f7bbb4187b389d1b1b1b0621fe2da9977f485883e9b20ae71acf71b14: Pulling from linuxkit/rngd
no matching manifest for linux/amd64 in the manifest list entries
No image pulled, continuing with build
Sending build context to Docker daemon  4.291MB
Step 1/13 : FROM linuxkit/alpine@sha256:187a64e2608be2c836486fe0772b4849720534e83021d0b06447538e0c5838b4 AS mirror
 ---> 7b9c7ac9c061
Step 2/13 : RUN apk add --no-cache go gcc musl-dev linux-headers
 ---> Using cache
 ---> ebea81500a00
Step 3/13 : ENV GOPATH=/go PATH=$PATH:/go/bin
 ---> Using cache
 ---> 3858b30d7e81
Step 4/13 : COPY cmd/rngd/ /go/src/rngd/
 ---> Using cache
 ---> 49003a184a05
Step 5/13 : RUN REQUIRE_CGO=1 go-compile.sh /go/src/rngd
 ---> Running in a5490145b803
gofmt...
govet...
golint...
ineffassign...
go test...
go build rngd: invalid flag in #cgo CFLAGS: -mrdrnd
The command '/bin/sh -c REQUIRE_CGO=1 go-compile.sh /go/src/rngd' returned a non-zero code: 1
exit status 1

the gcc --target-help lists -mrdrnd as an option

  -mrdrnd                     Support RDRND built-in functions and code generation.
  -mrdseed                    Support RDSEED instruction.
@rn
Copy link
Member Author

rn commented Mar 24, 2018

ah, golang/go#23672 limits the flags one can use with cgo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant