NVIDIA / libnvidia-container

NVIDIA container runtime library
Apache License 2.0
843 stars 205 forks source link

issue to build v1.9.0: . /bin/sh: 3: go: not found #163

Open pint1022 opened 2 years ago

pint1022 commented 2 years ago

checkout v1.9.0. make install.

it reports error: ... export CGO_LDFLAGS="-Wl,--gc-sections -Wl,-s -Wl,-soname,libnvidia-container-go.so.1"; \ go build -o libnvidia-container-go.so -ldflags "-s -w" -buildmode=c-shared . /bin/sh: 3: go: not found Makefile:40: recipe for target 'libnvidia-container-go.so' failed make[2]: [libnvidia-container-go.so] Error 127 make[2]: Leaving directory '/home/steven/dev/libnvidia-container/deps/src/nvcgo' /home/steven/dev/libnvidia-container/mk/nvcgo.mk:28: recipe for target 'build' failed make[1]: [build] Error 2 make[1]: Leaving directory '/home/steven/dev/libnvidia-container' Makefile:260: recipe for target 'deps' failed make: *** [deps] Error 2 ...

klueska commented 2 years ago

Do you have go installed?

pint1022 commented 2 years ago

yes, it built v1.7.0 without any problem on the same machine.

klueska commented 2 years ago

A dependency on go was added in 1.8.0 for cgroupv2 support. If you don’t care about cgroupv2 then you can compile with WITH_NVCGO=no to remove the dependency on go.