sc-controller icon indicating copy to clipboard operation
sc-controller copied to clipboard

(c-branch) compile inside container

Open toby63 opened this issue 4 years ago • 7 comments

I would like to compile sc-controller (c-branch) inside an LXD-Container. The main reason for using containers is (of course) that you can seperate between a build system and the normal system. So the goal is to get a folder with binaries that i can copy to other systems, to use scc.

Sadly my attempts failed so far. I don't know if it has anything to to with using a container.

meson build and ninja -C build both seem to be sucessful, but ninja -C build scc-daemon fails, with the following message: ninja: Entering directory build [0/1] Running external command scc-daemon. /usr/bin/sh: 0: Can't open ../../meson-run.sh FAILED: meson-scc-daemon /usr/bin/meson --internal commandrunner [path to]c-branch/2503/sc-controller [path to]c-branch/2503/sc-controller/build src/daemon /usr/bin/meson sh ../../meson-run.sh src/daemon/scc-daemon debug ninja: build stopped: subcommand failed.

I tried both the pre-release v0.4.9.10 and the recent c-branch (commit 528dab369d3ad3f14f89a51654e0e5bb4c33c549).

  • Do I have to run it on the system that I want to use scc on? (I would like to avoid that)
  • Are there other commands I could use, to just create the binaries inside a chosen folder?
  • Or is it a different problem?

By the way: I use Debian Testing.

toby63 avatar Mar 27 '20 15:03 toby63

Looks like issue with path, either because of how different version of meson behaves or caused by container. Open src/daemon/meson.build and add/remove some ../'s from path that should lead to meson-run.sh.

kozec avatar Mar 31 '20 07:03 kozec

Did not work, I tried everything from 0 to 10, always this error: /usr/bin/sh: 0: Can't open ../../../../../../../meson-run.sh FAILED: meson-scc-daemon /usr/bin/meson --internal commandrunner /home/compile/sc-contr/c-branch/2503/sc-controller /home/compile/sc-contr/c-branch/2503/sc-controller/build src/daemon /usr/bin/meson sh ../../../../../../../meson-run.sh src/daemon/scc-daemon debug ninja: build stopped: subcommand failed.

toby63 avatar Apr 01 '20 21:04 toby63

I think I found the reason, it seems there is no "meson-run.sh" anywhere...

toby63 avatar Apr 01 '20 21:04 toby63

Okay, I can see how that may be an issue. I've added it.

kozec avatar Apr 03 '20 13:04 kozec

First of all thank you.

But there are two problems:

  1. I get a syntax error: ninja: Entering directory build' [0/1] Running external command scc-daemon ninja: no work to do. ../../meson-run.sh: 17: Syntax error: "(" unexpected (expecting "fi") FAILED: meson-scc-daemon /usr/bin/meson --internal commandrunner /home/compile/sc-contr/c-branch/0304/sc-controller /home/compile/sc-contr/c-branch/0304/sc-controller/build src/daemon /usr/bin/meson sh ../../meson-run.sh src/daemon/scc-daemon debug `

  2. When i changed the "meson-run.sh" to just run the linux related part, I got lots of errors about X-Server. a. So it seems that command starts the program. This might be obvious for some people, but I suggest a clarification in the Readme about this. b. I wanted to just compile this program and then be able to copy it somewhere else (almost like packaging). But if that is not possible at the moment, I can wait (an older version of scc is running again on my computer).

toby63 avatar Apr 03 '20 18:04 toby63

b. I wanted to just compile this program and then be able to copy it somewhere else (almost like packaging).

Why are you starting scc-daemon then? To just build without starting anything, ninja -C build is enough?

kozec avatar Apr 04 '20 16:04 kozec

Why are you starting scc-daemon then? To just build without starting anything, ninja -C build is enough?

You could write that in the readme, so that it is more clear. I assumed that it was some kind of install command, just via a script or whatever. But anyway, just as I have said, I am now using an older version again.

Nonetheless you should probably fix the syntax error that i mentioned above.

But to have information for other users, how do you use the c-branch on another computer then? As there is no install command, which files should one copy and which command to use? Copy the source folder and run "ninja -C build scc-daemon"?

toby63 avatar Apr 05 '20 19:04 toby63