[SOLVED] runc from slackbuilds.org does not build on Slackware 15.0
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
runc from slackbuilds.org does not build on Slackware 15.0
I always had issues with building runc on slackware post 14.2 current. But also the new script for Slackware 15.0 still fails.
Code:
runc-1.0.2/vendor/modules.txt
go build -trimpath "-mod=vendor" "-buildmode=pie" -tags "seccomp" -ldflags "-X main.gitCommit=12644e614e25b05da6fd08a38ffa0cfe1903fdec -X main.version=1.0.2 " -o runc .
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# github.com/opencontainers/runc
/usr/bin/ld: $WORK/b001/_pkg1_.a(_cgo_defun.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: $WORK/b001/_pkg2_.a(_cgo_defun.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: $WORK/b001/_pkg3_.a(_cgo_defun.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [Makefile:34: runc] Fehler 2
$ go version
go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64
The Google version of go should be placed first in your $PATH by the profile script "/etc/profile.d/go.sh" which should be executable... and you would have to be running a Bash-compatible shell of course. There's also "/etc/profile.d/go.csh" if you use a C-shell compatible shell.
also, when you build scripts from SlackBuilds.org, you should do it in a root login shell or, as user, becoming root with "su -" (note the trailing slash) or it won't source the scripts in /etc/profile.d: it's explained in the HOWTO (at step 4) and it's also explained in google-go-lang's README.
Ok, I get the same issue with all go programs... They always try to use gccgo and not go. Even when I move gccgo they try to is it instead of go. Rebooting or logging in and out again does not solve. Rebuilding google-go-lang does also not help
also, when you build scripts from SlackBuilds.org, you should do it in a root login shell or, as user, becoming root with "su -" (note the trailing slash) or it won't source the scripts in /etc/profile.d: it's explained in the HOWTO (at step 4) and it's also explained in google-go-lang's README.
$ go version
go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64
This is indeed what I see
Quote:
Originally Posted by Windu
The Google version of go should be placed first in your $PATH by the profile script "/etc/profile.d/go.sh" which should be executable... and you would have to be running a Bash-compatible shell of course. There's also "/etc/profile.d/go.csh" if you use a C-shell compatible shell.
After running this script, which does exist and is executable I still see:
Code:
$ go version
go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64
Further to the need to source /etc/profile.d/go.sh, it would be really helpful if any SlackBuild which requires go, either directly or indirectly through some other dependency, were to have a line something like:
Code:
[ -z "$GOROOT" ] && source /etc/profile.d/go.sh
I see there's no go-template.SlackBuild available at SBo and I don't know enough about go based packaging to know if it makes sense to have such a thing. If so, I'd like to see a check like that included.
I was pulling my hair out with this too. I did what you said about using su with the - rather than just su and it was perfect . Thank you for the solution.
I had the same issue on Slackware 15. Was pulling my hair out and was annoyed for the whole day. Came across this post and did what was suggested about being root. Not just su but su - after doing this it was perfect. Thank you for the solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.