How to build Source.Python?
How to build Source.Python?
It seems the build server is down, so I was wondering if anyone has the requirements and steps for building and installing Source.Python, from source. The docs only seem to refer to downloading and installing the precompiled binaries.
I've been able to compile latest master branch on Linux locally, and get a CS:GO server to load the SOs, but the binaries themselves error out after being loaded. I think I'm just missing some unknown build environment requirement here.
Can anyone help?
I've been able to compile latest master branch on Linux locally, and get a CS:GO server to load the SOs, but the binaries themselves error out after being loaded. I think I'm just missing some unknown build environment requirement here.
Can anyone help?
- L'In20Cible
- Project Leader
- Posts: 1533
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: How to build Source.Python?
What are the errors?
Re: How to build Source.Python?
Right now I'm getting this:
but it would be really nice to have some official documentation on how to replicate the build properly.
Code: Select all
[Source.Python] Loading...
TypeError: No Python class registered for C++ class CFunctionInfo
[Source.Python] Failed to initialize internal modules.
[Source.Python] Could not initialize python.
Failed to load plugin "addons/source-python"
[Source.Python] Unloading...
Traceback (most recent call last):
File "/mnt/vdb1/steam/install_dir/csgo/addons/source-python/packages/source-python/__init__.py", line 34, in <module>
from loggers import _sp_logger # It's save to import this here
File "/mnt/vdb1/steam/install_dir/csgo/addons/source-python/packages/source-python/loggers.py", line 24, in <module>
from cvars import ConVar
File "/mnt/vdb1/steam/install_dir/csgo/addons/source-python/packages/source-python/cvars/__init__.py", line 10, in <module>
from _cvars import ConVar
ImportError: No module named '_cvars'
[Source.Python] Failed to unload the main module.
[Source.Python] Unloaded successfully.
but it would be really nice to have some official documentation on how to replicate the build properly.
- L'In20Cible
- Project Leader
- Posts: 1533
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: How to build Source.Python?
There is no documentation, as you shouldn't be required to build it manually yourself. I didn't have the chance to talk with Ayuto or Necavi (both being currently offline) but I'm sure the buildbot being down is temporarily and will be back up soon enough.
As for the error you get, it tells me that no python module has been registered on the c++ side (_cvars being the first one alphabetically). Could you add -developer to your startup command line? That should generates more debug messages.
EDIT: Necavi is currently looking into it! builds.sourcepython.com is back up and running, thanks Necavi!
As for the error you get, it tells me that no python module has been registered on the c++ side (_cvars being the first one alphabetically). Could you add -developer to your startup command line? That should generates more debug messages.
EDIT: Necavi is currently looking into it! builds.sourcepython.com is back up and running, thanks Necavi!
Re: How to build Source.Python?
Thanks for putting the precompiled builds back up, but now I'm getting this:
That's with the latest July 19th build. CS:GO server is up to date, and runs fine without Source.Python installed.
I've tried adding '-developer' but that doesn't seem to generate any additional logs. I tried '-debug', but the log generated by that has nothing useful in it either.
I'm running 4.5.5-300.fc24.x86_64 (Fedora 24) if that makes a difference.
Any ideas?
Code: Select all
[Source.Python] Loading...
PreMinidumpCallback: updating dump comment
assert_20160723092038_1.dmp[20726]: Uploading dump (out-of-process)
/tmp/dumps/assert_20160723092038_1.dmp
assert_20160723092038_1.dmp[20726]: Finished uploading minidump (out-of-process): success = yes
assert_20160723092038_1.dmp[20726]: response: Discarded=1
assert_20160723092038_1.dmp[20726]: file ''/tmp/dumps/assert_20160723092038_1.dmp'', upload yes: ''Discarded=1''
Segmentation fault (core dumped)
That's with the latest July 19th build. CS:GO server is up to date, and runs fine without Source.Python installed.
I've tried adding '-developer' but that doesn't seem to generate any additional logs. I tried '-debug', but the log generated by that has nothing useful in it either.
I'm running 4.5.5-300.fc24.x86_64 (Fedora 24) if that makes a difference.
Any ideas?
- L'In20Cible
- Project Leader
- Posts: 1533
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: How to build Source.Python?
Are you sure nothing else gets printed to the console after "[Source.Python] Loading...?" when "-develper" is enabled?
Re: How to build Source.Python?
Fairly certain. It doesn't appear to make a difference in the output.
Re: How to build Source.Python?
I was able to get SP to work with the Windows CS:GO dedicated server. That will at least let me develop and test some, but I'd still like to figure out how to use it with the Linux version in the long run.
Re: How to build Source.Python?
I'm crashing with build 409 on Linux, as well. Here is the output I am seeing:
*Edit: nevermind this post... I forgot I had the server.cfg setup to plugin_load "addons/source-python" for testing loading SourceMod with Source.Python on the same server, which caused it to try to load twice. After I removed that, I have no issues.
*Edit2: though, I feel a bit confused that Valve would not have a check before loading a plugin to see if it is already loaded.
*Edit: nevermind this post... I forgot I had the server.cfg setup to plugin_load "addons/source-python" for testing loading SourceMod with Source.Python on the same server, which caused it to try to load twice. After I removed that, I have no issues.
*Edit2: though, I feel a bit confused that Valve would not have a check before loading a plugin to see if it is already loaded.
- L'In20Cible
- Project Leader
- Posts: 1533
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: How to build Source.Python?
Is that the logs of a single startup?
EDIT: Just saw your edits, was checking the logs and I noticed it was loading twice and was confusing.
EDIT: Just saw your edits, was checking the logs and I noticed it was loading twice and was confusing.
Re: How to build Source.Python?
CS:GO on Linux is working fine for me. To print additional output you need to add +developer 5 to the command line. And -debug is always helpful.
Re: How to build Source.Python?
If anyone thinks it'd be useful, I am working on adding Source.Python into my SRCDS Docker images for Insurgency, which will be a one-button deployment for a complete functioning game server with whichever build is specified. If a build/test environment list is available, I can try to make Dockerfiles for several of your use cases to help get new people ready to write plugins without a lot of setup hassle. I've been using it for working with SourceMod, specifically extensions which have different glibc dependencies, and it's been exceedingly helpful for me.
I can also help out if you want to make your buildbot generate artifacts or Docker images as part of the build process. I am just getting my feet wet with Source.Python, but once I start getting stuff working I'll put it all on my GitHub. If anyone more familiar with the project wants to give me some background and needs so I can focus on the stuff you guys find useful, feel free to ping me.
I can also help out if you want to make your buildbot generate artifacts or Docker images as part of the build process. I am just getting my feet wet with Source.Python, but once I start getting stuff working I'll put it all on my GitHub. If anyone more familiar with the project wants to give me some background and needs so I can focus on the stuff you guys find useful, feel free to ping me.
Re: How to build Source.Python?
That's awesome! Though, I don't think Source.Python works for Insurgency, yet. It is an engine/game I think we should look to support, but currently don't. I don't know if creating Docker images is something we want to have as part of the build process, but it sounds intriguing.
Re: How to build Source.Python?
Yeah, I worked a bit with asherkin on the vtable dumper for SourceMod, and getting Insurgency supported in SourceMod. I wrote a majority of publicly available popular Insurgency specific SourceMod plugins, and I'm looking to do the same for Source.Python if I can. A great example of something I'm wholly unqualified for, but since nobody else is doing it, I'll muddle through :)
Re: How to build Source.Python?
Docker images could be very helpful in certain specific scenario's. If those that would be willing/able to use it could generate the docker images on their end, customized to their needs, that'd be pretty awesome. I wonder how the procedure for that would look like.
Re: How to build Source.Python?
I would also like to see how these Docker images can help! Go for it :D
Re: How to build Source.Python?
jballou wrote:Yeah, I worked a bit with asherkin on the vtable dumper for SourceMod, and getting Insurgency supported in SourceMod. I wrote a majority of publicly available popular Insurgency specific SourceMod plugins, and I'm looking to do the same for Source.Python if I can. A great example of something I'm wholly unqualified for, but since nobody else is doing it, I'll muddle through :)
We certainly appreciate any help in this regard! If you have any questions for us, don't hesitate to ask.
Return to “General Discussion”
Who is online
Users browsing this forum: Bing [Bot] and 20 guests