Next21Team / AmxxCurl

Curl module for amxmodx
MIT License
33 stars 12 forks source link

Doesn't work with ReHLDS #3

Closed hernandezk0 closed 5 years ago

hernandezk0 commented 5 years ago
L 10/10/2018 - 09:03:00: [AMXX] Module "cstrike/addons/amxmodx/modules/curl_amxx_i386.so" failed to load (cstrike/addons/amxmodx/modules/curl_amxx_i386.so: undefined symbol: MD5_Init)
L 10/10/2018 - 09:03:00: Error:
L 10/10/2018 - 09:03:00: [AMXX] Module is not a valid library (file "cstrike/addons/amxmodx/modules/curl_amxx_i386.so")

Doesn't work with ReHLDS

Polarhigh commented 5 years ago

I think it's not rehlds, have you installed SoLoader? Most likely the problem is that the system does not have an OpenSSL and the SoLoader is also not installed, you need to install at least one of two things.

hernandezk0 commented 5 years ago

Both installed, this error only happens when i install ReHLDS

The error is this, not the one i've put on top

Module "cstrike/addons/amxmodx/modules/curl_amxx_i386.so" failed to load (cstrike/addons/amxmodx/modules/curl_amxx_i386.so: undefined symbol: pthread_create)

Polarhigh commented 5 years ago

It seems I forgot to set some link options. What os version you use?

hernandezk0 commented 5 years ago

Ubuntu 18.04

Kushfield commented 5 years ago

In case it's any help, I had the same error on CentOS 7, but only when using it with the ReHLDS version of hlds_linux. @hernandezk0 You could try using the original hlds_linux with the rest of files from ReHLDS, that should "fix" it for now.

On CentOS 6 I also had "undefined symbol: clock_gettime" with the latest glibc (2.12) available from the official repositories. Compiling and updating to glibc 2.17 manually solved it.

Polarhigh commented 5 years ago

I still solving this, stuck with "Enable multithreading to use std::thread: Operation not permitted”. All the solutions that I found were related to the gcc 4.8.x bug, and didn't help for me. Hard to say when the build will be.

hernandezk0 commented 5 years ago

@Kushfield Replacing ReHLDS 'hlds_linux' for HLDS 'hlds_linux' is working for now. Thanks.

GiovaniFerraroTrivelli commented 5 years ago

Is there any update? I can't change hlds_linux file because I am using a shared hosting :(

L 12/10/2018 - 04:12:04: [AMXX] Module "cstrike/addons/amxmodx/modules/curl_amxx_i386.so" failed to load (cstrike/addons/amxmodx/modules/curl_amxx_i386.so: undefined symbol: pthread_create)
L 12/10/2018 - 04:12:04: Error:
L 12/10/2018 - 04:12:04: [AMXX] Module is not a valid library (file "cstrike/addons/amxmodx/modules/curl_amxx_i386.so")
Polarhigh commented 5 years ago

i will fix this soon, it will work if explicitly use pthread, but i want to try to remove the threads and use curl multi interface

Polarhigh commented 5 years ago

https://github.com/Polarhigh/AmxxCurl/releases/tag/v1.0.3 now working with ReHLDS, BUT, it still using threads, so it may causes performance.

GiovaniFerraroTrivelli commented 5 years ago

After install the update:

L 01/14/2019 - 03:24:57: [AMXX] Module "cstrike/addons/amxmodx/modules/curl_amxx_i386.so" failed to load (/lib/libc.so.6: version `GLIBC_2.15' not found (required by cstrike/addons/amxmodx/modules/curl_amxx_i386.so))
L 01/14/2019 - 03:24:57: Error:
L 01/14/2019 - 03:24:57: [AMXX] Module is not a valid library (file "cstrike/addons/amxmodx/modules/curl_amxx_i386.so")

Is this a server problem?

CrazyHackGUT commented 5 years ago

You need install GLIBC 2.15 or higher in your OS. Try update with package manager, or self compile.

Polarhigh commented 5 years ago

@CrazyHackGUT He is using shared hosting, i think i might compile module with older glibc version. @GiovaniFerraroTrivelli What os version yours hosting using?

GiovaniFerraroTrivelli commented 5 years ago

My hosting is using Ubuntu 12.04 and CentOS 6.9. Tested AmxxCurl in both OS (I have servers on CentOS and another on Ubuntu).

Polarhigh commented 5 years ago

@GiovaniFerraroTrivelli now you can try to use amxx_curl_linux_v1.0.3.glibc.2.12.c-ares version. But be aware, i'm not sure about its stability...

GiovaniFerraroTrivelli commented 5 years ago

Thanks! The module is detected OK but when I make a transfer, the server crashes:

https://i.imgur.com/SQvBup0.png

Don't worry! It makes no sense to have much work only for old OS versions.

I really appreciate your work!

Polarhigh commented 5 years ago

@GiovaniFerraroTrivelli Thanks) But possibly problem is in something else then just old system, and probably can appear at other people. Is server crashes with segmentation fault? What plugin you are using? http_get from examples? Maybe this crash refers us to this issue, try to set option: curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); I'm still not quite sure how this option works on different systems and different resolvers.

GiovaniFerraroTrivelli commented 5 years ago

I don't know if it crashes with Segmentation Fault, I don't have access to check that. I am using http_get from examples folder, yes, and I put that and the problem continues 😢

Polarhigh commented 5 years ago

@GiovaniFerraroTrivelli try to disable SoLoader, anyway its no longer needed. On my test machine a joint using SoLoader and AmxxCurl causes crashes.

GiovaniFerraroTrivelli commented 5 years ago

@Polarhigh Great! It works now 👍 Excellent work! 😃