[GODRIVER-1436] gcc is required with w1.2.0 Created: 11/Dec/19  Updated: 06/Jan/20  Resolved: 06/Jan/20

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: 1.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jérôme Laforge Assignee: Divjot Arora (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

golang:1.13.5-alpine (Go docker image alpine linux)



 Description   

with the GODRIVER v1.2.0, the build need gcc that is not present on golang:1.13.5-alpine.

As this driver is pure Go (even if Datadog dependence need it) we don't need to have gcc.

 

error:
 
{{go.mongodb.org/mongo-driver/event
go.mongodb.org/mongo-driver/mongo/readconcern
go.mongodb.org/mongo-driver/tag
go.mongodb.org/mongo-driver/mongo/writeconcern
go.mongodb.org/mongo-driver/mongo/readpref
github.com/DataDog/zstd
github.com/golang/snappy
go.mongodb.org/mongo-driver/x/mongo/driver/address
# github.com/DataDog/zstd
exec: "gcc": executable file not found in $PATH
go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/options
go.mongodb.org/mongo-driver/x/mongo/driver/description
go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt
go.mongodb.org/mongo-driver/x/bsonx
go.mongodb.org/mongo-driver/x/mongo/driver/uuid
go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage
go.mongodb.org/mongo-driver/internal
go.mongodb.org/mongo-driver/x/mongo/driver/dns}}



 Comments   
Comment by Divjot Arora (Inactive) [ 16/Dec/19 ]

Hi jerome.laforge@gmail.com,

Can you try compiling with the CGO_ENABLED=0 environment variable (e.g. CGO_ENABLED=0 go build...)? For zstd support, we have https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/compression_cgo.go and https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/compression_nocgo.go defined using build tags to ensure that users can build the driver without cgo support if they are not using the feature.

Generated at Thu Feb 08 08:36:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.