runc installation error in Slackware 14.2

1.1k Views Asked by At

I'm trying to install Docker in Slackware 14.2 via SBoTools, but I got an error message of runc installation.

undefined reference to `seccomp_rule_add_exact_array' collect2: error: ld returned 1 exit status

make: *** [all] Error 2

Makefile:30: recipe for target 'all' failed

Failures: runc: runc.SlackBuild return non-zero

I tried to build runc from source, but got the same error. I'm not an specialist with go-lang and don't know if the problem is with it.

Thanks,


More details:

The problem happens when in the installation when it gives that command:

go build -i -ldflags "-X main.gitCommit=54296cf40ad8143b62dbcaa1d90e520a2136ddfe -X main.version=1.0.0-rc2" -tags "seccomp" -o runc .

Edit #2 - Problem solved.

Alright, the problem was in Makefile of runc package from slackbuilds. There is two lines where the command "go build" will be used and in both there is an flag called "-ldflags"... To solve the problem, just update this flag with "-gccgoflags" and that sould work. Obs: If you're trying to install Docker, you'll have this problem with containerd too.

Hope this can help someone and I'll report this for the mainteiner of the package in Slackbuilds :)

3

There are 3 best solutions below

0
On BEST ANSWER

You did not have your PATH variable correctly set when building. The go executable is being picked up from /usr/bin; that executable corresponds to gccgo, not to the one in the google-golang package, which is the one to be used.

1
On

No, it's nothing to do with Go at all. That error is occurring while compiling (or rather linking) C code. At first glance, it looks like the problem is that your libseccomp is out of date. The missing symbol was added betwen version 2.0 and 2.1 of that library.

0
On

The problem isn't -ldflags, The problem is that you haven't set your PATH after installing google-go-lang. To do this you can logout from root prompt that you installed go and log back in, or simply just source /etc/profile.d/go.sh:

source /etc/profile.d/go.sh

and then continue on installing runc and other packages from the prompt that you just sourced go.sh. see:slackware:howtos:docker