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

Issue executing Prebid Server Go #58

Open
heidi51degrees opened this issue Oct 3, 2024 · 1 comment
Open

Issue executing Prebid Server Go #58

heidi51degrees opened this issue Oct 3, 2024 · 1 comment
Labels
type: bug Something isn't working

Comments

@heidi51degrees
Copy link

heidi51degrees commented Oct 3, 2024

Is it there an easy way to run or fix this? thanks.

vscode ➜ /workspaces/prebid-server (master) $ go run main.go

github.com/51Degrees/device-detection-go/v4/onpremise

/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:24:34: undefined: dd.ResourceManager
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:25:34: undefined: dd.ConfigHash
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:242:21: undefined: dd.ConfigHash
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:307:12: undefined: dd.EvidencePrefix
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:312:53: undefined: dd.ResultsHash
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:319:16: undefined: dd.NewResultsHash
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:328:45: undefined: dd.Evidence
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:329:21: undefined: dd.NewEvidenceHash
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:358:43: undefined: dd.EvidenceKey
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:467:18: undefined: dd.NewResourceManager
/go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:467:18: too many errors

@heidi51degrees heidi51degrees added the type: bug Something isn't working label Oct 3, 2024
@justadreamer
Copy link
Contributor

This usually happens if either CGO_ENABLED env var is set to 0 or C compiler is missing. CGO_ENABLED is 1 by default, but maybe something overrides it on your system - f.e. here is how I can simulate the same errors on my Mac:

❯ CGO_ENABLED=0 go run main.go
# github.com/51Degrees/device-detection-go/v4/onpremise
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:31:34: undefined: dd.ResourceManager
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:32:34: undefined: dd.ConfigHash
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:106:36: undefined: dd.ConfigHash
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:343:12: undefined: dd.EvidencePrefix
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:351:56: undefined: dd.ResultsHash
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:358:16: undefined: dd.NewResultsHash
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:367:48: undefined: dd.Evidence
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:368:21: undefined: dd.NewEvidenceHash
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:417:43: undefined: dd.EvidenceKey
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:531:18: undefined: dd.NewResourceManager
../../../../go/pkg/mod/github.com/51!degrees/device-detection-go/[email protected]/onpremise/onpremise.go:531:18: too many errors

Setting CGO_ENABLED=1 resolves the above errors. Please see this doc for more details: https://github.com/prebid/prebid-server/tree/master/docs/build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants