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: "at most two relocations per offset are supported" error, during the generation of gen-sysinfo.go #42679
Comments
That link doesn't seem to work for me -- I get a page with just {"count":11,"value":"Uri expired"} |
It looks good to me -- clean build of llvm-goc, the standard libraries, units tests, and clean unit test run. What is the problem? |
I thought that error disallows to build something for libgo. |
Hm: Clang 9 brought an error:
|
https://github.com/advancedwebdeveloper/clang_test_cpu_features/commit/1c97f602d6d1cc669ba3ba502bf68e30be5aefd5/checks/1415448433/logs - llvm-godumpspec seams to be involved. Let me guess: it is related to https://go.googlesource.com/gollvm/+/890acef7d115f5e3855f174aa102c5766809275a , right? |
Yes, this is an llvm-godumpspec problem. No, https://go.googlesource.com/gollvm/+/890acef7d115f5e3855f174aa102c5766809275a is not related, this problem has been around a lot longer than that. llvm-godumpspec works by reading the DWARF from a C/C++ compiler generated object file, and it uses the LLVM dwarf reading library to do this. Turns out I can reproduce the same problem ("error: at most two relocations per offset are supported") just with the existing llvm dwarf dump too. Example:
I spent a little while in the debugger looking at this. It looks like the problem is with the way the reader handles relocations. At this line here: it seems to be making the assumption that there is going to be only one debug section of a given name in an object file, which is definitely not true when -g3 is in effect (you get multiple .debug_macro sections). I'm not sure it's worth pursuing a fix in the LLVM dwarf reader for this. I'll send a CL to use "-g2" instead of "-g3" for the sysinfo.c compile, that should take care of the issue (we don't look at the DWARF macro info in any case). |
I still think that I should enable tracing. |
If you are talking about "--trace", I don't think that will be helpful. The trace output is very verbose, and includes a lot of detail that will just confuse users. I am preparing a CL that should fix this (get rid of the warning altogether). |
Change https://golang.org/cl/271037 mentions this issue: |
OK, fix submitted. Closing out this issue now... |
OK, thanks.
https://gist.github.com/advancedwebdeveloper/325f1aa01c86f12680263743343f6bd2 - this is what I am getting. |
I am re-opening this for the third time.
There is still a bug:
https://pipelines.actions.githubusercontent.com/oib3H8xVEpkbM8cVrnJdamNlDcncoD0BGAHRcaZf8LBr47rVSq/_apis/pipelines/1/runs/46/signedlogcontent/3?urlExpires=2020-11-17T20%3A03%3A31.7737280Z&urlSigningMethod=HMACV1&urlSignature=dxHWhVt%2FHIJztgoNkEtN2lwmHVZqWbg8MLVozJV14OY%3D
CC @thanm @cherrymui @ianlancetaylor
The text was updated successfully, but these errors were encountered: