-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fix matchmaking_ds for gamedata #1504
Conversation
Example plugin: https://forums.alliedmods.net/showthread.php?p=2750363 |
By the way, I tried to do this: P.S.: |
Windows build is also have this bug: https://forums.alliedmods.net/showpost.php?p=2750542&postcount=19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust the branch for a fallback if the library is outstanding.
Done. But I have never seen the name of the file There are very few plugins (even I would say there are practically no plugins) who would use this library and write to you if problems are found :) |
BMS: by SteamDB |
Maybe it is still worth using my first option, but with minor changes to work with x64 libraries? |
A gentleman and a scholar.
Isn't there something weird on linux where it's |
I think the confusion is that the only games that utilize this binary also don't use the lib prefix or srv suffix. If those games were to backport that library, they would surely use their own naming convention. While it's unlikely to happen, we should be using the same prefix/suffix handling for all libraries belonging to an engine. For example, the CS:GO Linux client adds a _client suffix to all binaries instead of using an _srv suffix on the server binaries, and sure enough, it's called matchmaking_ds_client.so there. |
The problem is that these libraries are not in the
Yes, but what's the point if the server doesn't find the library we need in this case? :) |
I was commenting on the prefix and suffix of the filename itself. We should be looking for the binary in the same places that the engine does, including the standard library path and gameinfo's GameBin path. |
So should I change in the code somehow or is my commit ok? |
@psychonic, I looked at your change from #1028. The problem with the old code was that it used PLATFORM_FOLDER, which on a 32 bit system adds the win32/linux32/osx32 folder, which in fact is not there. Therefore, the library was not found. |
I made some more small changes to the code, maybe this will be better then?) |
I tried the cs go server for the test on linux: Those, in fact, the current code, which is in the sourcemod, can work correctly only on windows/osx, since But even so, in the current situation, I think it would be correct to also use my current changes + |
I took a deeper dive into this because there is clearly some issue, but some of the information wasn't making sense. Some clarifications:
There are two specific issues, both affecting Linux and maybe Mac(?). The prefixFor a handful of games on Linux (and again, maybe Mac?), Valve started prefixing the filenames of tier0, vstdlib, and any new shared objects with "lib". In Source 1, they did not apply it to the remaining, pre-existing shared objects (unlike the _srv or _client suffix on some engine). (In Source 2, they do aggressively use the "lib" prefix on all). The pathOn Windows, LoadLibrary only needs the filename if the binary is already loaded in the process. On Linux, it follows ld's rules instead, regardless of whether the shared object is currently loaded. Since the GameBin path is not typically in LD_LIBRARY_PATH by default, the binary isn't found by dlopen, even with the correct filename. I think that a better fix for the name issue would be to have a different helper function for forming the binary name, either multiple macros or a single runtime function. And for the path, looking up the GameBin folder from the gameinfo.txt rather than hardcoding "bin". All that aside, I think the fix in the PR is Good Enough if it works. I don't have the energy to do the above. |
I couldn't leave well enough alone. An alternative approach to fix all the potential problem cases noted, making the engine's filesystem interface do the work for us with minimal code. You could scrap the other changes and replace:
with:
|
Its pretty work on l4d2 linux, but don't forget about |
That shouldn't be necessary with this approach. |
Library is finded, but not the one we need. |
Code by psychonic #1504 (comment)
In continuation of this problem - #1028. It still exists (on linux). My option is to make the library find correct
This has been done before and it worked :) I restored it.