intel / trustauthority-client-for-go

BSD 3-Clause "New" or "Revised" License
16 stars 18 forks source link

ITA CLI fails with error “-linkmode=external requires external (cgo) linking, but cgo is not enabled” on RHEL #30

Closed anjalirai-intel closed 3 months ago

anjalirai-intel commented 4 months ago

There is dependency on go version v1.22 for building cli on RHEL.

Post upgrading the go version to v1.22 the make cli build fails with error -linkmode=external requires external (cgo) linking, but cgo is not enabled

Error:

make cli
    -X github.com/intel/trustauthority-client/tdx-cli/cmd.GitHash=9bcf69c" -o trustauthority-cli
-linkmode=external requires external (cgo) linking, but cgo is not enabled
make: *** [Makefile:10: cli] Error 1

Resolution: CGO_ENABLED=1 make cli