-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Undefined symbol "__cpu_model" in librenderdoc.so #365
Comments
From google it seems like this is a bug in GCC 5 and should be fixed in GCC 6, although it's not entirely clear. Do you know when this behaviour will be fixed? I'm a little hesitant to add a workaround for a compiler bug without understanding what impact it would have on forward/backward compatibility. At least I presume it would need to be limited to only builds with gcc (not clang), but will it work fine on older GCC versions, or newer? There's also the issue that making binaries to distribute on linux is dicey enough already, and I don't know what the ABI compatibility implications are of linking directly to libgcc. |
I've read it should be fixed in GCC 6 too, but I'm using GCC 6.1.1 as of now and the symbol is still hidden. Matteo |
Right, GCC will link in libgcc when necessary automatically which is why the bug is a weird one. But I'm not sure what exactly will happen if libgcc is linked in explicitly, or if that will cause portability/clash issues when compiled on one distribution and run on another. I'm just a little concerned about understanding the potential impact of a change like that before making it. Tracing back the problem it seems like the bug is triggered from a call to Given that on linux I only really plan to ever support x64 builds, and x64 CPUs are all SSE2, I will try just changing this function so that it returns 1 on x64 and (just for safety) returns 0 on x86. That way hopefully we avoid invoking the GCC bug but without any serious fallout elsewhere. |
This looks fine (and safe) to me. |
Applied the fix in 953ebe0 which accidentally referred to the wrong issue. It all compiles and runs for me though - please let me know if it does for you as I was testing on gcc 5.4 on ubuntu. |
Thanks for the quick fix, can confirm that it is working fine on Fedora 24 using GCC 6.1.1. |
Using GCC 6.1.1 on Fedora 24 I can compile RenderDoc and all of its target just fine, but as soon as I start QRenderDoc I get the following error:
qrenderdoc: symbol lookup error: /home/mbertello/Projects/renderdoc/build/bin/librenderdoc.so: undefined symbol: __cpu_model
This is apparently an issue since GCC 5.4 because those symbol are now hidden.
To fix this issue one can simply explicitly links against libgcc which provides the needed symbols.
I have attached a patch with the fix for this issue.
gcc6_patch.txt
Matteo
The text was updated successfully, but these errors were encountered: