Raised This Month: $ Target: $400
 0% 

How to compile extension against specific glibc version?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-18-2014 , 13:21   How to compile extension against specific glibc version?
Reply With Quote #1

How to compile an extension against specific glibc version(2.13 in my case)?

Last edited by glhf3000; 11-18-2014 at 13:22.
glhf3000 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-18-2014 , 14:00   Re: How to compile extension against specific glibc version?
Reply With Quote #2

If you're getting GLIBC issues during runtime for extensions, for a lot of games it means that the extension was linked against server.so and vstdlib.so instead of server_srv.so and vstdlib_srv.so.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-18-2014 , 14:45   Re: How to compile extension against specific glibc version?
Reply With Quote #3

I tried to copy libvstdlib_srv.so and libtier0_srv.so into hl2sdk-l4d2/lib/linux and then remove _srv from filenames.
Nothing changed.

How to link these libraries properly?

Last edited by glhf3000; 11-18-2014 at 14:50.
glhf3000 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-18-2014 , 16:16   Re: How to compile extension against specific glibc version?
Reply With Quote #4

If you're compiling it using a Makefile, the "easy" route would be to update the Makefile where it says libtier0 to libtier0_srv and where it says libvstdlib to libvstdlib_srv

Note that this is the "easy" fix. The proper fix is to rewrite the Makfile to only do this change if the game is css, tf2, dods, hl2dm, or l4d2.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 11-18-2014 at 16:16.
Powerlord is offline
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 11-19-2014 , 00:27   Re: How to compile extension against specific glibc version?
Reply With Quote #5

Changed
Quote:
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE1/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2
LIB_PREFIX = lib
LIB_SUFFIX = .so
override ENGSET = true
endif
to

Quote:
ifeq "$(ENGINE)" "left4dead2"
HL2SDK = $(HL2SDK_L4D2)
HL2PUB = $(HL2SDK)/public
HL2LIB = $(HL2SDK)/lib/linux
CFLAGS += -DSOURCE_ENGINE=6
METAMOD = $(MMSOURCE1/core
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/left4dead2
LIB_PREFIX = lib
LIB_SUFFIX = _srv.so
override ENGSET = true
endif
And finally it compiled.

Thanks.

Last edited by glhf3000; 11-19-2014 at 00:28.
glhf3000 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 14:00.


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