Page 1 of 1

Compiled to run in place on linux, minetestserver doesnt?

Posted: Fri Jan 20, 2012 20:10
by RAPHAEL
I compiled the latest unstable to run in place on linux and minetest does but minetestserver doesn't. Is there a way to get the minetestserver to run in place?

Posted: Fri Jan 20, 2012 20:13
by sfan5
RAPHAEL wrote:I compiled the latest unstable to run in place on linux and minetest does but minetestserver doesn't. Is there a way to get the minetestserver to run in place?
Try "make -j2"

Posted: Fri Jan 20, 2012 22:34
by RAPHAEL
sfan5 wrote:
RAPHAEL wrote:I compiled the latest unstable to run in place on linux and minetest does but minetestserver doesn't. Is there a way to get the minetestserver to run in place?
Try "make -j2"
I did that.
$ apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev
Download source, extract:
$ wget https://github.com/celeron55/minetest/tarball/master -O master.tar.gz
$ tar xf master.tar.gz
$ cd celeron55-minetest-286edd4 (or similar)
Build a version that runs directly from the source directory:
$ cmake . -DRUN_IN_PLACE=1
$ make -j2
^^ that is the code I used to compile.

Posted: Fri Jan 20, 2012 23:12
by randomproof
Have you tried running the server on the command line? You can then run the client any way you want and set the server address as localhost. Or you can just run the client with a blank server address and the server will be started in the background.

Posted: Fri Jan 20, 2012 23:26
by RAPHAEL
randomproof wrote:Have you tried running the server on the command line? You can then run the client any way you want and set the server address as localhost. Or you can just run the client with a blank server address and the server will be started in the background.
What I did was cd to the bin/ directory and run:
nohup ./minetestserver &

but it loaded the config files from the .minetest directory in home. I want it to run in place and use the config mods and such in the folder its in (/home/user/minetest)

Posted: Sat Jan 21, 2012 01:20
by randomproof
Do you get something like this when you run the server:

Code: Select all

steven@debian:~/working/minetest/bin$ ./minetestserver 
signal_handler_init()
Using relative paths (RUN_IN_PLACE)
path_data = /home/steven/working/minetest/bin/../data
path_userdata = /home/steven/working/minetest/bin/..
Debug streams initialized, disable_stderr=0
17:22:47: ACTION[main]: minetest with SER_FMT_VER_HIGHEST=21, VER=0.4.dev-20120106-1 RUN_IN_PLACE=1 USE_GETTEXT=1 INSTALL_PREFIX=/usr/local BUILD_TYPE=Release


        .__               __                   __   
  _____ |__| ____   _____/  |_  ____   _______/  |_ 
 /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
|  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  |  
|__|_|  /__|___|  /\___  >__|  \___  >____  > |__|  
      \/        \/     \/          \/     \/        


AuthManager: loading from /home/steven/working/minetest/bin/../world/auth.txt
BanManager: loading from /home/steven/working/minetest/bin/../world/ipban.txt

Posted: Sat Jan 21, 2012 04:16
by RAPHAEL
After a lot of poking around it seems it was some kind of permission issue. Managed to get it fixed and now it runs in place. Sorry for bothering anyone about this.

Posted: Sat Jan 21, 2012 09:56
by mahho
I compiled with

Code: Select all

cmake -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0 
and copied to ~/mtest bin and data folder, after running bin/minetestserver it generated world, etc properly in ~/mtest (not in .minetest)

So, show the log, as randomproof did :P

Posted: Sat Jan 21, 2012 13:54
by sfan5
mahho wrote:I compiled with

Code: Select all

cmake -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0 
CMake only generates the Makefile, it doesn't build

Posted: Sat Jan 21, 2012 17:16
by mahho
yeah, of course, after that, of course, make is going :)

Posted: Sat Jan 21, 2012 18:11
by RAPHAEL
Hmm seems it still isn't working right. Sometimes it works right and other times it doesn't. Makes no sense to me. One would think it would act the same all the time.

Some notes: The server and the computer compiled on are same distro same packages but different processor and specs. The distro is Linux Mint 12. The user compiled on is different than the user its run from. Permissions were changed. I will likely try on Sunday to compile on the server computer and see if it works. minetestserver runs fine and in place every time on the machine it was compiled on.
-------------
Separator
-------------

Debug streams initialized, disable_stderr=0
18:10:25: ACTION[main]: minetest with SER_FMT_VER_HIGHEST=21, VER=0.4.dev-20120106-1 RUN_IN_PLACE=0 USE_GETTEXT=1 INSTALL_PREFIX=/usr BUILD_TYPE=Release
18:10:25: INFO[main]: Settings: Setting not found: "help"
18:10:25: INFO[main]: Settings: Setting not found: "info-on-stderr"
18:10:25: INFO[main]: Parsing configuration file: "/home/user/.minetest/minetest.conf"
18:10:25: INFO[main]: Settings: Setting not found: "enable-unittests"
AuthManager: loading from /home/user/.minetest/world/auth.txt
BanManager: loading from /home/user/.minetest/world/ipban.txt
18:10:25: INFO[main]: Mod search paths:
18:10:25: INFO[main]: /home/user/.minetest/usermods
18:10:25: INFO[main]: /home/user/.minetest/world/worldmods
18:10:25: INFO[main]: /usr/bin/../share/minetest/mods
18:10:25: INFO[main]: Server: Initializing scripting
18:10:25: INFO[main]: scriptapi_export
18:10:25: INFO[main]: Server: Loading builtin Lua stuff from "/usr/bin/../share/minetest/builtin.lua"
18:10:25: INFO[main]: Loading and running script from /usr/bin/../share/minetest/builtin.lua
18:10:25: INFO[main]: registerNode: registering content id "126": name="air"
18:10:25: INFO[main]: registerNode: registering content id "127": name="ignore"
18:10:25: INFO[main]: registerNode: WARNING: Ignoring CONTENT_IGNORE redefinition

Posted: Sat Jan 21, 2012 19:28
by mahho
18:10:25: ACTION[main]: minetest with SER_FMT_VER_HIGHEST=21, VER=0.4.dev-20120106-1 RUN_IN_PLACE=0 USE_GETTEXT=1 INSTALL_PREFIX=/usr BUILD_TYPE=Release
Looks like it's not compiled with run_in_place

Posted: Sat Jan 21, 2012 20:09
by dannydark
its always best to compile the server on the server machine if using a dedicated/remote server, also like mahho said the debug you pasted shows that you are not using a RUN_IN_PLACE build.