Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Compilation terminated due to missing c file #50

Open
anjankow opened this issue May 7, 2022 · 0 comments
Open

Compilation terminated due to missing c file #50

anjankow opened this issue May 7, 2022 · 0 comments

Comments

@anjankow
Copy link

anjankow commented May 7, 2022

$ go build cmd/main.go 
# github.com/hyperledger/sawtooth-sdk-go/signing
vendor/github.com/hyperledger/sawtooth-sdk-go/signing/pem_loader.go:22:11: fatal error: ../c/c11_support.h: No such file or directory
   22 | // #include "../c/c11_support.h"
      |           ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Tried with the following Dockerfile:

FROM golang:1.18

WORKDIR /project
COPY . .

RUN go mod download && go mod vendor
RUN apt update && apt install libssl-dev
RUN go build cmd/main.go

My go.mod file:


go 1.18

require (
	github.com/brianolson/cbor_go v1.0.0
	github.com/btcsuite/btcd v0.21.0-beta
	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
	github.com/gorilla/mux v1.8.0
	github.com/hyperledger/sawtooth-sdk-go v0.1.4
	go.uber.org/zap v1.21.0
	google.golang.org/protobuf v1.25.0
	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)

require (
	github.com/davecgh/go-spew v1.1.1 // indirect
	github.com/kr/text v0.2.0 // indirect
	github.com/pkg/errors v0.9.1 // indirect
	github.com/pmezard/go-difflib v1.0.0 // indirect
	gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)

require (
	github.com/rs/cors v1.8.2
	github.com/stretchr/testify v1.7.1
	go.uber.org/atomic v1.7.0 // indirect
	go.uber.org/multierr v1.6.0
)

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

No branches or pull requests

1 participant