ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.84k stars 2.02k forks source link

undefined symbol: ThreadInterlockedAssignIf #187

Closed chuckpreslar closed 11 years ago

chuckpreslar commented 11 years ago

Running the severplugin_empty compiled on Ubuntu 13.04 x64 with Counter Strike: GO seems to fail.

$ ldd -d server.so
    linux-gate.so.1 =>  (0xf7771000)
    libtier0.so => not found
    libvstdlib.so => not found
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf76d7000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76d2000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf75e9000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf75ce000)
    /lib/ld-linux.so.2 (0xf7772000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf741b000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf73fd000)
undefined symbol: RandomFloat   (./server.so)
undefined symbol: Msg   (./server.so)
undefined symbol: Warning   (./server.so)
undefined symbol: _Z6ConMsgPKcz (./server.so)
undefined symbol: _Z11ConColorMsgRK5ColorPKcz   (./server.so)
undefined symbol: Plat_IsInDebugSession (./server.so)
undefined symbol: DevMsg    (./server.so)
undefined symbol: KeyValuesSystem   (./server.so)
undefined symbol: _Z6DevMsgPKcz (./server.so)
undefined symbol: ThreadGetCurrentId    (./server.so)
undefined symbol: ThreadInterlockedAssignIf (./server.so)
undefined symbol: _ZNV16CThreadFastMutex4LockEjj    (./server.so)
undefined symbol: ThreadInterlockedExchange (./server.so)
undefined symbol: Error (./server.so)
undefined symbol: Plat_localtime    (./server.so)
undefined symbol: GetCPUInformation (./server.so)

Output from server boot:

Plugins: found file "serverplugin_empty.vdf"
 failed to dlopen /home/steam/cstrike_go/csgo/addons/serverplugin_empty/bin/server.so error=/home/steam/cstrike_go/csgo/addons/serverplugin_empty/bin/server.so: undefined symbol: ThreadInterlockedAssignIf
Unable to load plugin "addons/serverplugin_empty/bin/server"

Any help on this would be awesome.

psychonic commented 11 years ago

CS:GO is on a different engine branch. It's not compatible with Source SDK 2013.

You can find unofficial, reverse engineered headers for plugins compatible with CS:GO here, http://hg.alliedmods.net/hl2sdks/hl2sdk-csgo

chuckpreslar commented 11 years ago

you're awesome, @psychonic, thanks a lot for such a quick reply.

chuckpreslar commented 11 years ago

if I could bother you once more @psychonic, is there some form of documentation for these headers to help get me started? am I to merge the directories with the sdk?

psychonic commented 11 years ago

There is no real documentation, and it's even possible that the serverplugin_empty in there hasn't been updated for the header changes. We use the sdk for building Metamod:Source, SourceMod, and extensions for SourceMod.

I would recommend making a Metamod:Source plugin instead of a VSP. There is very little difference when coding except that MM:S gives you a few niceties and also acts as a deconfliction layer between plugin. There are also two sample plugins included with it that are actually up to date.

Regardless, you can get support for that community-maintained SDK, VSPs, and MM:S plugins at https://forums.alliedmods.net/forumdisplay.php?f=75

And here is the article on MM:S plugin development. http://wiki.alliedmods.net/Category:Metamod:Source_Development

chuckpreslar commented 11 years ago

I've been working with SourceMod for a bit, but needed to draw text to the HUD which seems to be impossible?

Shows a HUD message to a client on the given channel. As of this writing, only TF, HL2MP, and SourceForts support HUD Text.

Only reason I was going to attempt to dig into using the SDK.

Once again, @psychonic.

psychonic commented 11 years ago

We're getting way offtopic here, but in short, the reason that doesn't work on CS:GO (nor CS:S) hasn't anything to do with the code.

There is a definition missing in one of the client res files that causes HudText to not display. Not fixing it was a conscious decision by those teams due to not wanting plugins to be able to clutter random areas of the screen with colored text.