-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
gollvm: failure to build on Arch Linux #36512
Comments
I don't know much about Arch Linux, but it looks like you don't have the C developer libraries installed. |
Hmmm Other things seem to find them fine (other C/C++ codebases), and the package manager shows I have libc++/libstdc++/glibc/etc. (I also definetely have
) Is there anything in particular I should check for that I could be missing? The other issue that has a similar error message seems to come from it improperly recognizing the glibc directory (perhaps I have a setup that is triggering the same behaviour?) |
That's odd. I don't know what is happening. @thanm is on vacation, but maybe @cherrymui has a quick answer. |
Currently we find crt1.o from /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o, but on Arch Linux, crt1.o is in directory /usr/lib/, and I didn't even find directory /usr/lib/x86_64-pc-linux-gnu/. My Arch linux environment is pulled from https://hub.docker.com/_/archlinux/. At first it didn't have gcc, I installed it myself. I don't know if this directory exists if Arch Linux is installed from image. To fix this issue, we may need to add the /usr/lib directory to the Toolchain.filePaths_ when initializing Linux::Linux class. |
Looks like that worked for the second issue (crt):
I'm happy to file just this change, though if possible I'd also like to figure out why gen-sysinfo.go isn't getting the fields needed so it can just be one PR if possible. |
If they are different problems then we would certainly prefer different PRs. |
Fair enough, I'll go ahead and open one for this. |
Change https://golang.org/cl/214599 mentions this issue: |
@securityinsanity I didn't encounter the issue related to gen-sysinfo.go, I can successfully build gollvm on Arch Linux after solving the crt{1|i|n}.o issue. My container information:
|
Hey @erifan , Thanks for that info. I wonder if this is maybe something to do with me using CC=clang, and or the hardned kernel? Those are the two things that look different at a glance. For help here's my info:
|
Hmm,,, I don't know, maybe you can have a try with gcc |
Change https://golang.org/cl/224037 mentions this issue: |
Can we try to mitigate this issue by adding this to Linux::Linux() in LinuxToolChain.cpp, if it seems fine I'm glad to make a submission. |
Change https://go.dev/cl/399317 mentions this issue: |
The existing detection will wrongly detect Arch Linux as Ubuntu since there is lsb-release as well as arch-release under /etc/. This patch tries to fix it by changing the order of detection. Updates golang/go#36512. Change-Id: I3af1a9ce6843e25b47e1db4755e77303d06b33da Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/399317 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
What operating system and processor architecture are you using (
go env
)?x86_64 Arch Linux
(Failure building go, so I can't run
go env
, but if there's any more info I'm happy to edit this as need be)What did you do?
What did you expect to see?
I expected to be able to build gollvm successfully.
What did you see instead?
Results in: THESE error logs.
After doing some digging I realized it was missing some fields in
gen-sysinfo.go
, so I manually added in the following fields to the very bottom of the file. Running ninja again then results in: THIS error message. This looks similar to some output posted on #26405 in terms of editing a file, and seeing failure to link to cri.o. As such I'm going to post the two commands requested in that issue in case it's of help:The text was updated successfully, but these errors were encountered: