Install freeciv-server only (clientless)

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
User avatar
belpir
Posts: 6
Joined: Tue Jul 26, 2016 6:49 am
Location: Czech Republic

Install freeciv-server only (clientless)

Postby belpir » Tue Jul 26, 2016 7:22 am

Hello,
Is there any way how to compile and run freeciv-server without client section?
I woud like to provide my own freeciv server on linux, CLI only. I already own linux VPS (web, database and VPN services) without X. I want to install freeciv-server there.
I have tried several options, but everytime X11/GTK/Qt is required.

There is my ./configure:

Code: Select all

./configure --prefix=/usr/local/games --sysconfdir=/etc --enable-silent-rules --enable-fcdb=sqlite3 --enable-ipv6=no --enable-client=xaw


According to man, I have tried option "--enable-client=stub" but no change. every time I get error:

Code: Select all

...
checking pkg-config is at least version 0.7... yes
checking for GTK+ - version >= 2.12.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking Qt5 headers... not found
configure: error: Cannot build modpack installer with any gui
...


All other dependencies have been met except Qt/GTK/X11.
I do not understand why these libs are required, when the option "--enable-client=auto/all/gtk2/gtk3/sdl/xaw/qt/stub[/code]" is set to xaw or stub ? No GTK/Qt .... If is there no chance to clientless server, I am willing to run minimalistic xaw client, but only without GTK/Qt installed to the server.

I also found option "--disable-server do not compile the server" but not "--disable-client" ... Is there any way how to install freeciv without client section?

Misc. info:

Freeciv latest stable release (2.5.4)
Debian 8 (amd64) linux - I want to compile it because Debian repos. provides only older releases.
I also have user auth to be enabled (sqlite)

Thank you
Regards

User avatar
belpir
Posts: 6
Joined: Tue Jul 26, 2016 6:49 am
Location: Czech Republic

Re: Install freeciv-server only (clientless)

Postby belpir » Tue Jul 26, 2016 7:37 am

By the way.
I also tried:

Code: Select all

./configure --prefix=/usr/local/games --sysconfdir=/etc --enable-silent-rules  --enable-ipv6=no --enable-client=stub --disable-gtktest --disable-sdltest --disable-sdl2test --disable-freetypetest


But GTK/Qt is still required (without fcdb, with disable-gtktest ...) the error is the same.

Regards

User avatar
JTN
Elite
Posts: 462
Joined: Wed Jan 30, 2013 12:15 am

Re: Install freeciv-server only (clientless)

Postby JTN » Tue Jul 26, 2016 8:50 am

I think it's the modpack installer build that's pulling in GUI stuff in your build. You can control that with the --enable-fcmp configure option, e.g., --enable-fcmp=no.

Building the client can be disabled -- I've just done a built with --disable-client, and it looks like --enable-client=no would do the same thing. (Usually in configure scripts, if there's an --enable-foo you can also specify --disable-foo. The configure script help could probably be clearer that it's possible to disable the client.)

I've just done a 2.5.4 build with --disable-client --enable-fcmp=no and, while I haven't actually tried it in a GUI-library-free environment, I didn't see anything in the configure log suggesting that such libraries were sought.

cazfi
Elite
Posts: 1709
Joined: Tue Jan 29, 2013 6:54 pm

Re: Install freeciv-server only (clientless)

Postby cazfi » Tue Jul 26, 2016 1:26 pm

In 2.5, --disable-client --disable-fcmp. In 2.6 also --disable-ruledit is needed.

User avatar
belpir
Posts: 6
Joined: Tue Jul 26, 2016 6:49 am
Location: Czech Republic

Re: Install freeciv-server only (clientless)

Postby belpir » Tue Jul 26, 2016 5:47 pm

Hello,
Confirm, it works ... its incredible .. thank you guys.
SOLVED

One last question ... I tried to compile freeciv acording to man pages, but there are no options like --disable-client ... So what is the preferred and actual manual for freeciv?

Thank you again,

Regards

cazfi
Elite
Posts: 1709
Joined: Tue Jan 29, 2013 6:54 pm

Re: Install freeciv-server only (clientless)

Postby cazfi » Tue Jul 26, 2016 6:12 pm

For configure options:

Code: Select all

> ./configure --help
There's --disable-<option> where there is --enable-<option>, and --without-<option> when there's --with-<option>. That comes from the autoconf, and is no way specific thing to freeciv build, though there's some cases where there's no sensible implementation of --without-<option>.

User avatar
belpir
Posts: 6
Joined: Tue Jul 26, 2016 6:49 am
Location: Czech Republic

Re: Install freeciv-server only (clientless)

Postby belpir » Wed Jul 27, 2016 5:07 am

OK, thanks a lot.