Raised This Month: $32 Target: $400
 8% 

MetaMod Sample Plugin Error: undefined symbol: _ZdlPv


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shortguy
Member
Join Date: Jul 2009
Old 01-17-2015 , 02:12   MetaMod Sample Plugin Error: undefined symbol: _ZdlPv
Reply With Quote #1

I am compiling the sample_mm plugin for CS:GO included with the metamod source (1.11.0-dev) on a 64 bit linux machine using gcc-4.7.

The plugin itself compiles fine, but when I try to load the plugin using meta load sample I get the error:

Failed to load plugin addons/sample_mm (addons/sample_mm.so: undefined symbol: _ZdlPv).

Any information or advice regarding this? I am pretty new to linux compilation in general as I come from a mostly Java background so any help would be appreciated.

Thanks!

PHP Code:
[michael:~/Desktop/MMPlugin/sample_mm]$ make ENGINE=csgo
if [ "true" "false" ]; then \
        echo 
"You must supply one of the following values for ENGINE:"; \
        echo 
"csgo, left4dead2, left4dead, css, orangeboxvalve, orangebox, or original"; \
        exit 
1; \
    
fi
mkdir 
-p Release.csgo
ln 
-sf ../hl2sdk-csgo/lib/linux/libvstdlib.so
ln 
-sf ../hl2sdk-csgo/lib/linux/libtier0.so
make 
-f Makefile sample_mm
make
[1]: Entering directory `/home/michael/Desktop/MMPlugin/sample_mm'
if [ "true" = "false" ]; then \
        echo "You must supply one of the following values for ENGINE:"; \
        echo "csgo, left4dead2, left4dead, css, orangeboxvalve, orangebox, or original"; \
        exit 1; \
    fi
gcc-4.7 -I../hl2sdk-csgo/public/game/server -I. -I.. -I../hl2sdk-csgo/public -I../hl2sdk-csgo/public/engine -I../hl2sdk-csgo/public/mathlib 
-I../hl2sdk-csgo/public/vstdlib -I../hl2sdk-csgo/public/tier0 
-I../hl2sdk-csgo/public/tier1 -I. -I../mmsource-1.7/core -I../mmsource-1.7/core/sourcehook -DSOURCE_ENGINE=12 -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 
-DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -DSE_PORTAL2=11 -DSE_CSGO=12 -O3 
-funroll-loops -pipe -D_LINUX -DPOSIX -Dstricmp=strcasecmp
 -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca 
-Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wall -Wno-non-virtual-dtor -Wno-overloaded-virtual 
-Werror -fPIC -fno-exceptions -fno-rtti -msse -m32 -fno-strict-aliasing 
-fvisibility=hidden -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -o Release.csgo/sample_mm.o -c sample_mm.cpp
gcc-4.7 -I../hl2sdk-csgo/public/game/server -I. -I.. -I../hl2sdk-csgo/public 
-I../hl2sdk-csgo/public/engine -I../hl2sdk-csgo/public/mathlib -I../hl2sdk-csgo/public/vstdlib -I../hl2sdk-csgo/public/tier0 -I../hl2sdk-csgo/public/tier1 -I. 
-I../mmsource-1.7/core -I../mmsource-1.7/core/sourcehook -m32 Release.csgo/sample_mm.o ../hl2sdk-csgo/lib/linux/tier1_i486.a l
ibvstdlib.so libtier0.so ../hl2sdk-csgo/lib/linux/interfaces_i486.a -shared -static-libgcc -ldl -lm -o Release.csgo/sample_mm.so
make[1]: Leaving directory 
`/home/michael/Desktop/MMPlugin/sample_mm

Last edited by shortguy; 01-17-2015 at 02:13.
shortguy is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-17-2015 , 05:12   Re: MetaMod Sample Plugin Error: undefined symbol: _ZdlPv
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=248109
__________________

Last edited by GoD-Tony; 01-17-2015 at 05:12.
GoD-Tony is offline
shortguy
Member
Join Date: Jul 2009
Old 01-17-2015 , 05:31   Re: MetaMod Sample Plugin Error: undefined symbol: _ZdlPv
Reply With Quote #3

Yes I saw this but I am very hesitant to add that compiler flag when the wiki says:

Quote:
There are a few flags you should generally not add, ever:

-lstdc++ (same as using g++) - Even if you use the exact same compiler build as Valve, linking against the libstdc++ will be painful. Not all Linux distributions use the same version, and in general ABI compatibility on this library is frequently broken. You will find that users report load failures or even crashes, and the problem may be very difficult to trace. As such, you should avoid using exceptions or any part of the Standard Template Library (STL). Valve provides many abstractions that should suffice, and SourceHook provides some as well.

Last edited by shortguy; 01-17-2015 at 05:32.
shortguy is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-17-2015 , 08:25   Re: MetaMod Sample Plugin Error: undefined symbol: _ZdlPv
Reply With Quote #4

Due to some changes in CS:GO, that is now necessary (unless you can find a better workaround).

https://github.com/alliedmodders/sou...ildScript#L396

Last edited by psychonic; 01-17-2015 at 22:57.
psychonic is offline
shortguy
Member
Join Date: Jul 2009
Old 01-17-2015 , 20:17   Re: MetaMod Sample Plugin Error: undefined symbol: _ZdlPv
Reply With Quote #5

Ahh, thanks for that psychonic, just another csgo quirk.
shortguy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode