Raised This Month: $9 Target: $400
 2% 

Solved Converting a windows plugin to linux?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 04-04-2021 , 16:19   Converting a windows plugin to linux?
Reply With Quote #1

As the title says
__________________

Last edited by nG_getwreck; 04-10-2021 at 09:14.
nG_getwreck is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-04-2021 , 20:27   Re: Converting a windows plugin to linux?
Reply With Quote #2

It is rare to have to do anything.
__________________

Last edited by fysiks; 04-05-2021 at 13:55.
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-05-2021 , 06:17   Re: Converting a windows plugin to linux?
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
You don't need to do anything.
Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.
__________________

Last edited by HamletEagle; 04-05-2021 at 06:18.
HamletEagle is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 04-05-2021 , 20:49   Re: Converting a windows plugin to linux?
Reply With Quote #4

or maybe something with offsets for linux, with using get_pdata_cbase for example? im not experienced in that field but i think i saw something about it
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...)
JocAnis is offline
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 04-05-2021 , 22:09   Re: Converting a windows plugin to linux?
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
or maybe something with offsets for linux, with using get_pdata_cbase for example? im not experienced in that field but i think i saw something about it
yeah, that's what i mean.

I've heard about this, and did try doing it but sword animations gone horribly wrong. Also other modes doesn't work.
__________________

Last edited by nG_getwreck; 04-05-2021 at 22:17.
nG_getwreck is offline
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 04-05-2021 , 22:15   Re: Converting a windows plugin to linux?
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.
I have a knife sword plugin that I downloaded somewhere, it works in windows but when I try using it on my online server, it crash for some sort of reason. Did try checking the logs but it doesn't show the reason why it crash. No errors are shown.
__________________
nG_getwreck is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-07-2021 , 03:42   Re: Converting a windows plugin to linux?
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.
Speaking of Rage, I tested it recently and it seems to crash whenever I hook / call a function. About Okapi, it causes segfaults even with non-virtual functions. The only one that seems to work perfect is Orpheu, but it lacks proper vector support. Now, I'm not sure what's wrong with Rage. Either some offsets are wrong in the default files that it comes with or some are hardcoded into it and have wrong values, as the last major update was before the steampipe update if I'm not mistaken, or maybe it was only properly tested on CS and works fine there, but not on other mods ... Who knows?

Last edited by DarthMan; 04-07-2021 at 03:43.
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-07-2021 , 06:05   Re: Converting a windows plugin to linux?
Reply With Quote #8

Quote:
Originally Posted by nG_getwreck View Post
I have a knife sword plugin that I downloaded somewhere, it works in windows but when I try using it on my online server, it crash for some sort of reason. Did try checking the logs but it doesn't show the reason why it crash. No errors are shown.
You should post the source code. How else are we supposed to know what is wrong?
Speaking of offsets, it is possible the plugin has the wrong extra offset for linux but I can't say more without looking at the code.

DarthMan, can you reproduce okapi crashes under windows too? I only managed to get a crash under linux with virtual functions.
__________________

Last edited by HamletEagle; 04-07-2021 at 06:07.
HamletEagle is offline
Old 04-07-2021, 06:17
nG_getwreck
This message has been deleted by nG_getwreck. Reason: -Hide dat code lol-
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-07-2021 , 08:04   Re: Converting a windows plugin to linux?
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
You should post the source code. How else are we supposed to know what is wrong?
Speaking of offsets, it is possible the plugin has the wrong extra offset for linux but I can't say more without looking at the code.

DarthMan, can you reproduce okapi crashes under windows too? I only managed to get a crash under linux with virtual functions.
Sadly not, not using it anymore tho. But I know that the tfc bugfixes plugin that hlstriker made caused segfaults, and I was told a possible issue could be the Okapi module, as I inspected the code and nothing looked bad.
About Rage, u can just try to hook or call any function on TFC, hlds/rehlds will instantly crash. I have a handler for CBasePlayer::Observer_SetMode.

Last edited by DarthMan; 04-07-2021 at 08:05.
DarthMan is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-07-2021 , 08:06   Re: Converting a windows plugin to linux?
Reply With Quote #10

When does the server crash? Is it just at random or is it on certain events/actions, like you stabbing with a knife, round start, on server launch, etc... It's a really important piece of information for reproducing, understanding and fixing a bug.
__________________

Last edited by klippy; 04-07-2021 at 08:07.
klippy is offline
Reply


Thread Tools
Display Modes

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 19:19.


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