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

Compilation terminated due to missing c file #50

@anjankow

Description

@anjankow
$ 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
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions