-
Notifications
You must be signed in to change notification settings - Fork 127
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
vgui.so must be located in build/cl_dll directory to produce a correct build on Linux #267
Comments
It seems more like a bug of linker. If I'm using system toolchain, this doesn't happen anymore. If it uses steamrt toolchain, absolute path is written to the shared object. It happens in both our HLSDK and vgui_support, compile set up using CMake and Waf. Back in days when engine used cmake, I had a CMake macro that copied vgui.so before build starts, so it links normally. |
BUT:
|
Solution from old engine https://github.com/FWGS/xash3d/blob/master/cmake/FWGSLib.cmake#L149-L173 Again, it seems irrelevant if we have binutils >2.30, as the post above shows. Probably some earlier versions could work too, if we want to target legacy. |
I copied it over yet it doesn't build. Am I stupid?
Ignore MiWifi, I am not at home and this magical router changes my hostname somehow |
It is incompatible, you need amd64 vgui (and valve does not build it for amd64)
|
I didn't manage to overcome this issue. And it seems like Valve didn't either as vgui.so is located in both
linux
andlinux/release
directories in their repo.We have a workaround in github workflow by just copying vgui.so into the appropriate directory. But it's not applied automatically on the local build. Maybe some hack should be added to cmake script.
About the problem itself: vgui.so is problematic library as it does not have a commonly used
lib
prefix in its name nor the defined soname. So linker has a hard time finding it and adding the dependency with proper path. When going with-l:vgui.so
approach, it writes the absolute path as a dependency forclient.so
which is unacceptable obviously.If you want to experiment with it yourself, use this script to check out the dependencies of the produced client library:
Running this on client.so from Steam Half-Life fetches this:
In case of our sdk it must result in
The text was updated successfully, but these errors were encountered: