[PROBLEM] Building Source.Python

Please post any questions about developing your plugin here. Please use the search function before posting!
battleweaver
Member
Posts: 43
Joined: Mon Oct 02, 2017 7:57 am
Location: Moscow
Contact:

[PROBLEM] Building Source.Python

Postby battleweaver » Mon Mar 12, 2018 3:23 pm

Hi, everyone!

I'm trying to build Docker image with CS:GO server and pre installed Source.Python. I did't find any ways how to download the latest version of the compiled library, so I decided to build it myself. But I getting an error:

Code: Select all

CMakeFiles/core.dir/build.make:422: recipe for target 'CMakeFiles/core.dir/core/modules/commands/commands_client.cpp.o' failed
make[2]: *** [CMakeFiles/core.dir/core/modules/commands/commands_client.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/core.dir/all' failed
make[1]: *** [CMakeFiles/core.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Requirements version:

Code: Select all

➜  src git:(master) ✗ cmake --version
cmake version 3.5.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
➜  src git:(master) ✗ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Full build log you can see at CircleCi in step "Build Source.Python": https://circleci.com/gh/MichaelPak/Source.Python/25
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [PROBLEM] Building Source.Python

Postby Ayuto » Mon Mar 12, 2018 5:00 pm

There is a new SP branch that introduces an "sp update" command. That command downloads the latest version from our build server using the Jenkins API. This is how it's done:
https://github.com/Source-Python-Dev-Te ... #L131-L146

If you would still like to compile it on your own, try GCC 4.8 instead of 5.4. That should work.
battleweaver
Member
Posts: 43
Joined: Mon Oct 02, 2017 7:57 am
Location: Moscow
Contact:

Re: [PROBLEM] Building Source.Python

Postby battleweaver » Tue Mar 13, 2018 8:36 am

I've tried to do what you said, but it didn't help.
But I have another idea: add Sourse.Python as submodule in my repo, download last success build (core.so and source-python.so) from here: http://builds.sourcepython.com/job/Source.Python%20-%20Building/game=csgo,label=master/lastSuccessfulBuild/artifact/src/Builds/Linux/csgo/*zip*/csgo.zip, copy that to Source.Python's addons directory and inject Source.Python to CS:GO server.
Will it work?
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [PROBLEM] Building Source.Python

Postby Ayuto » Tue Mar 13, 2018 6:30 pm

battleweaver wrote:I've tried to do what you said, but it didn't help.

Why didn't it help?

Your idea will probably work most of the time, but you can end up in a non-working installation, because you mix the latest Code from the repo with possibly old binaries (core.so and source-python.so).
battleweaver
Member
Posts: 43
Joined: Mon Oct 02, 2017 7:57 am
Location: Moscow
Contact:

Re: [PROBLEM] Building Source.Python

Postby battleweaver » Wed Mar 14, 2018 6:48 am

Ayuto wrote:Why didn't it help?

I've installed gcc-4.8 on ubuntu 16.04:

Code: Select all

apt install -y gcc-4.8 cmake g++-multilib git

But I got exactly the same error:

Code: Select all

CMakeFiles/core.dir/build.make:422: recipe for target 'CMakeFiles/core.dir/core/modules/commands/commands_client.cpp.o' failed
make[2]: *** [CMakeFiles/core.dir/core/modules/commands/commands_client.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/core.dir/all' failed
make[1]: *** [CMakeFiles/core.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Full log: https://circleci.com/gh/MichaelPak/Source.Python/27


Ayuto wrote:because you mix the latest Code from the repo with possibly old binaries (core.so and source-python.so).

Do you have something like release branches in your git repo? Or сan I download the latest version of SP by static reference from Jenkins?
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [PROBLEM] Building Source.Python

Postby Ayuto » Wed Mar 14, 2018 7:36 am

Well, you also have to tell the build script to use 4.8. This is done by setting the environment variable CXX to e.g. /usr/bin/g++-4.8.

You can download the latest build by using the function I referenced here:
viewtopic.php?p=11442#p11442

Currently, this will return you the following link for CS:S:
http://builds.sourcepython.com/job/Sour ... 1-2018.zip

That's exactly what you need.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 12 guests