scons noob - "prefix=/" not enough for everything?

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
Kristjan

scons noob - "prefix=/" not enough for everything?

Post by Kristjan »

used this command:

Code: Select all

scons prefix=/home/kristjan/wesnoth-1.7.6 prefsdir=.wesnoth1.7.6
after that I get an error while running "scons install":

Code: Select all

scons: *** [/var/run/wesnothd] /var/run/wesnothd: Permission denied
scons: building terminated because of errors.
I want everything installed in $HOME/wesnoth-1.7.6 directory. Is there better option than prefix= for that or do I really have to tell where to install binaries (anything else?) separately?
User avatar
SirTheta
Posts: 32
Joined: February 7th, 2009, 2:51 am
Location: Behind You

Re: scons noob - "prefix=/" not enough for everything?

Post by SirTheta »

I've never used scons, but are Permission Denied leads me to ask.. are you running it as root?
Kristjan

Re: scons noob - "prefix=/" not enough for everything?

Post by Kristjan »

If everything was correct in that command, then why would I need root permission to install anything in $HOME?

Even with bindir given separately I still get permission error, so obviously I have missed something important:

Code: Select all

scons prefix=/home/kristjan/wesnoth-1.7.6/ bindir=/home/kristjan/wesnoth-1.7.6/ install
...
Mkdir("/var/run/wesnothd")
scons: *** [/var/run/wesnothd] /var/run/wesnothd: Permission denied
scons: building terminated because of errors.

---edit---

Code: Select all

scons --help | grep -B 1 /var/run/wesnothd
fifodir: directory for the wesnothd fifo socket file ( /path/to/fifodir )
    default: /var/run/wesnothd
    actual: /var/run/wesnothd
then (without root permission obviously):

Code: Select all

scons prefix=/home/kristjan/wesnoth-1.7.6/ bindir=/home/kristjan/wesnoth-1.7.6/ fifodir=/home/kristjan/wesnoth-1.7.6/wtf_is_fifo install
...
Install file: "wesnothd" as "/home/kristjan/wesnoth-1.7.6/wesnothd"
Mkdir("/home/kristjan/wesnoth-1.7.6/wtf_is_fifo")
Chmod("/home/kristjan/wesnoth-1.7.6/wtf_is_fifo", 0700)
chown : /home/kristjan/wesnoth-1.7.6/wtf_is_fifo
scons: done building targets.
But I am still curios if I did something wrong.
Last edited by Kristjan on October 22nd, 2009, 2:57 am, edited 1 time in total.
User avatar
SirTheta
Posts: 32
Joined: February 7th, 2009, 2:51 am
Location: Behind You

Re: scons noob - "prefix=/" not enough for everything?

Post by SirTheta »

Because, it is trying to create a directory in /var, which you have to be root to create/delete files/folders in.

Code: Select all

Mkdir("/var/run/wesnothd")
scons: *** [/var/run/wesnothd] /var/run/wesnothd: Permission denied
/var/run/wesnothd: Permission denied
Kristjan

Re: scons noob - "prefix=/" not enough for everything?

Post by Kristjan »

I found out why it was trying to create that directory, see my last post.
User avatar
SirTheta
Posts: 32
Joined: February 7th, 2009, 2:51 am
Location: Behind You

Re: scons noob - "prefix=/" not enough for everything?

Post by SirTheta »

Does it run? What Linux distro are you using?
Kristjan

Re: scons noob - "prefix=/" not enough for everything?

Post by Kristjan »

Works fine. Using Ubuntu 9.10, but I doubt that fifodir= not affected by prefix= has anything to do with that. Where is probably a good reason why that is so :eng:
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: scons noob - "prefix=/" not enough for everything?

Post by loonycyborg »

Kristjan wrote:There is probably a good reason why that is so :eng:
Yes. Because /var/run isn't under /usr :)
fifodir stuff is needed to create FIFO file which can be used to issue commands to wesnoth server without connecting to it with a client.
"meh." - zookeeper
Post Reply