Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Download and compile the code now!
1 2 Previous Next
- - By Günther [de] Date 2009-05-09 15:15 Edited 2009-05-09 16:59
The idea is that you ask questions if you are stuck, somebody answers them, and we can compile a guide from it afterwards. I'll start with suggesting TortoiseHg as a mercurial client.
Reply
Parent - - By Compufreak [de] Date 2009-05-09 15:29
I compiled successful the source code. It works on Ubuntu 9.04, but only the developer mode doesn't run correctly. The console window are empty, I don't know why.
Reply
Parent - - By Günther [de] Date 2009-05-09 16:53
You need to pass --with-gtk to configure. I should probably spend the time to either make that the default or dependant on the existance of the Gtk+ headers.
Reply
Parent - By Compufreak [de] Date 2009-05-09 18:04 Edited 2009-05-09 20:01
Ok, thanks. I will test it.

Edit: I test it now, but nothing changed, the console window is empty.

Edit2: Sorry my mistake, it works. I changed the name and so I copied the wrong file.
Reply
Parent - - By Caesar [de] Date 2009-05-09 15:46
I stuck in installing TortoiseHG. It does not appear in the context menu. Possible, that it collides with TortoiseSVN?
Parent - - By Zapper [de] Date 2009-05-09 16:09
No, I use both
Parent - - By Caesar [de] Date 2009-05-09 16:45
Which one was installed first?
Parent - By Zapper [de] Date 2009-05-09 16:50
TortoiseSVN
Parent - - By Clonkonaut [de] Date 2009-05-09 16:36
System reboot done?
Reply
Parent - By Caesar [de] Date 2009-05-09 16:45
Multiple times...
Parent - - By Günther [de] Date 2009-05-09 16:58
If you are adventurous enough to navigate a windows command prompt, you could also install Mercurial alone and use that to clone the repository.
Reply
Parent - By Caesar [de] Date 2009-05-09 17:00
Nothing easier than that.
Parent - - By Günther [de] Date 2009-05-09 17:08
Also, if you had provided more details, I would have known whether this FAQ entry is relevant to your situation. ;-)
Reply
Parent - By Caesar [de] Date 2009-05-09 17:36
Arr! Whatacrap. :(
Parent - - By Cani [de] Date 2009-05-09 16:47
I'm using TortoiseHg and the visualhg plug-in for visual studio 2008. Everything works fine but I'm missing "jconfig.h" and getting an error during compiling the engine:

> Error  2  error BK1506 : cannot open file '..\intermediate\vc9\Engine\Release\C4SecurityCertificates.sbr': No such file or directory  BSCMAKE  engine

Parent - - By Isilkor Date 2009-05-09 16:55
Did you download the prebuilt dependencies? If not, you'll have to get the required libraries yourself.
Reply
Parent - - By Cani [de] Date 2009-05-09 16:59
The prebuilt dependencies zip didn't open (I only tried winrar). I think I should have all the libraries but this "jconfig.h"-file.
Parent - By Günther [de] Date 2009-05-09 17:01
The libjpeg binaries from gnuwin32 should also work. http://gnuwin32.sourceforge.net/packages/jpeg.htm
Reply
Parent - By Isilkor Date 2009-05-09 17:02
In the libjpeg distribution, you'll find multiple jconfig.*. Rename the jconfig.vc to jconfig.h, and you should be fine.
Reply
Parent - - By Günther [de] Date 2009-05-09 16:56
Have you installed Isilkors library pack? Alternatively you could compile jpeglib and the other dependancies yourself.
Reply
Parent - By Cani [de] Date 2009-05-09 17:36
Now it works! It was just that single file. Thanks!
Parent - - By Günther [de] Date 2009-05-09 22:48
For those using mingw on windows. Unpack this, move the dlls from bin to planet, and run configure thus:
./configure 'CPPFLAGS=-I/path/to/extra/include' 'LDFLAGS=-L/path/to/extra/lib'
You can pass additional flags, such as --enable-sound if you have fmod. I don't know hwether it will compile and link, testing that now.
(The licenses should all be in the docs directory.)
Reply
Parent - By Günther [de] Date 2009-05-12 18:00
Another version, this time with a static glew. I also updated the instructions for mingw and actually tested them myself.
Attachment: mingwlibs2.7z (1808k)
Reply
Parent - By Günther [de] Date 2009-05-12 11:43
For those not wanting to install the shell extension, see this FAQ. That way, everyone can use the same dialogs and I don't have to explain the plain hg commandline.
Reply
Parent - By Newton [es] Date 2009-05-12 19:38
Regarding TortoiseHG on Gnome/Nautilus - I am a bit stuck. I get the Mercurial menu for all directories with options like "Make directory versioned" BUT NOT in any directory where a actual mercurial repos is in. Anyone else ran into these problems yet?
Parent - - By Günther [de] Date 2009-05-28 23:17
Can somebody on Windows download cmake and test these build files? I hope that we can replace the msvc, codeblocks and xcode project files with this, and maybe even the automake ones, or at least share the list of files. Having to update 4 build systems for every tiny change in the file list is getting irritating. It worked somewhat for Redwolf Design, but for a bigger group it gets more important that the source always builds.
Attachment: config.h.cmake (5k)
Attachment: CMakeLists.txt (14k)
Reply
Parent - - By Isilkor Date 2009-05-29 09:15
I changed CMakeLists.txt a little to make it work in Windows and added options to allow the user to select if he wants to build with DX/GL. Also changed the find_library calls to invocations of the equivalent FindFOO package as far as they are supplied in the default cmake package. After this, I was able to create a working MSVC solution.

Building DX still requires a change to standard/src/StdD3DShader.cpp to pull the inclusion of Standard.h out of the #ifdef.
Attachment: CMakeLists.txt (14k)
Reply
Parent - By Günther [de] Date 2009-05-29 20:26
Thanks. I made some further fixes and added Linux support as well as some SDL-as-windowing-system-support, which might make it work on MacOSX, and pushed the result.
Reply
Parent - - By bahamada [de] Date 2009-06-04 09:24
is there a good documentation for the complete build system used in this particular case? And yes I know there are good manuals for autoconf, automake and make. ;)
I just want to get a overview about the important build files and where I have to specify what.
Reply
Parent - - By Günther [de] Date 2009-06-04 12:21
There's README.linux.txt which lists all important options. In general, the goal is to not have to specify anything. That reminds me, I should make the --with-gtk-option the default. And figure out how to make the game run out of the box without having to link the executable in the planet-folder.
Reply
Parent - - By bahamada [de] Date 2009-06-05 12:05
Ok my particular Problem ist the install rule in the make file which won't work properly...
I'm able to compile etc.... My point is that im confused with the amount of files given...
My Goal is to debianize this package... so far so good only thing missing is a correct instal routine.
Reply
Parent - By Günther [de] Date 2009-06-05 14:53
Yes, installation doesn't work yet. The game still assumes that the binary and game data are in the same directory, DOS style. The assumption that that directory is writable should be largely gone, though. The easiest solution might be a symbolic link to the executable from the game data directory (called planet for nostalgic reasons) and a shell script which executes that. Or change CStdApp::Init in StdXApp.cpp so that Location points to /usr/share/games/clonk/clonk instead of argv[0]. That file probably doesn't even have to exist.
Something like this (untested):
mkdir -p /usr/share/games/clonk
cp -r planet/* /usr/share/games/clonk/
cp -a clonk /usr/games/clonk.bin
ln -s /usr/games/clonk.bin /usr/share/games/clonk/clonk
echo "#!/bin/sh\n/usr/share/games/clonk/clonk $@" >/usr/games/clonk
chmod a+x /usr/games/clonk
make c4group
./c4group /usr/share/games/clonk/* -p
Reply
Parent - - By MastroLindo Date 2009-08-22 14:20
couple of questions on ubuntu 9.04

first on clonk: compiling the code I got an error about libGL not found (specifically glBegin), but I downloaded and installed all dependecies, especially the libgl1-mesa-dev that should be what I need. Can it be that my compiler doesn't see the library because it's not linked correctly even if I installed from  a .deb file? Or I am really missing one library there?

second for tortoiseHg: it requires mercurial 1.3 at least, but the ubuntu package is still at version1.1.2. I didn't try yet... does anybody know if there are issues with this mercurial version on ubuntu? Otherwise i rather keep the text version
Reply
Parent - By Isilkor Date 2009-08-22 14:29

> it requires mercurial 1.3 at least, but the ubuntu package is still at version1.1.2.


You can probably get a reasonably well working version from Launchpad.
Reply
Parent - - By Carli [de] Date 2009-08-22 14:44 Edited 2009-08-22 15:50
Launch synaptic and download "mercurial" and LibGL
Parent - By Isilkor Date 2009-08-22 15:28

> I downloaded and installed all dependecies, especially the libgl1-mesa-dev

Reply
Parent - - By Günther [de] Date 2009-08-22 18:11
Have you installed a proprietary 3d driver? Those replace the libGL and might interfere with compiling. But without the linker command line and the exact error message, I'm only guessing.

And you can switch to an older version of tortoisehg which is compatible with the older mercurial, but Isilkor's advice is probably better.
Reply
Parent - - By MastroLindo Date 2009-08-22 22:18
yes, I have the nvidia propietary drivers
Reply
Parent - - By Günther [de] Date 2009-08-23 11:47
Then please try compiling without them, just to check, or post the complete error messages and linker command line.
Reply
Parent - - By MastroLindo Date 2009-08-24 13:08
tried to compile even removing the drivers:

./configure --with-gtk 'CXX=g++ -std=gnu++0x'
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++0x accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++ -std=gnu++0x... gcc3
checking whether C++ compiler accepts -std=gnu++0x... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking for windows.h... no
checking for stdint.h... yes
checking for unistd.h... yes
checking for poll.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for locale.h... yes
checking for sys/socket.h... yes
checking for signal.h... yes
checking for langinfo.h... yes
checking for execinfo.h... yes
checking for sys/inotify.h... yes
checking for sys/syscall.h... yes
checking for multimon.h... no
checking for io.h... no
checking for direct.h... no
checking for share.h... no
checking for iconv... yes
checking for iconv declaration... extern size_t iconv (iconv_t cd,  char * * inbuf, size_t * inbytesleft, char * * outbuf, size_t * outbytesleft);
checking for vasprintf... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for Mix_OpenAudio in -lSDL_mixer... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_read_image in -lpng... yes
checking for deflate in -lz... yes
checking for freetype-config... freetype-config
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for X11/keysym.h... yes
checking for X11/extensions/xf86vmode.h... yes
checking for X11/xpm.h... yes
checking for X11/extensions/Xrandr.h... yes
checking for XOpenDisplay in -lX11... yes
checking for XpmCreatePixmapFromData in -lXpm... yes
checking for XF86VidModeQueryVersion in -lXxf86vm... yes
checking for XRRQueryExtension in -lXrandr... yes
checking for glBegin in -lGL... no
configure: error: libGL not found.
Reply
Parent - - By Günther [de] Date 2009-08-24 14:58
Okay, by "without them" I meant "without them but with the mesa ones". More detailed error information is available in the config.log.
Reply
Parent - - By MastroLindo Date 2009-08-24 21:06
i uninstalled the nvidia and installed the mesa lib... what else I have to do?

attached the config.log

I hereby license the following file(s) under the CC-by license
Attachment: config.log (27k)
Reply
Parent - - By Günther [de] Date 2009-08-24 21:43
Do you have a /usr/lib/libGL.so?
Reply
Parent - - By MastroLindo Date 2009-08-25 13:22
libGL.so.1
libGL.so.180.44

(i reinstalled the nvidia drivers right now since I use them for other applications)

Maybe we can meet on a chat and try to solve it together? the forum is not the best way to solve this I think :)
Reply
Parent - By Newton [es] Date 2009-08-25 14:30

>meet on a chat


The openclonk developers usually dwell in irc.euirc.net, channel #clonkdev
Parent - - By Günther [de] Date 2009-08-25 15:20
You really need libGL.so, not libGL.so.something. libgl1-mesa-dev has that file here.
Reply
Parent - - By MastroLindo Date 2009-08-29 22:56
Sorry for the delay in the answer: work issues :)

However I uninstalled and reinstalled the graphic drivers and I got libGl.so (as a soft link anyway)

Compiled successfully, thanks for helping!
Reply
Parent - By Günther [de] Date 2009-08-30 03:05

> I got libGl.so (as a soft link anyway)


That's the expected situation. It's so that you can link using -lfoo, which expands to "a library in the search path named libfoo.so", but the dependency at runtime is to the library libfoo.so links to, so that one can have multiple versions of the same library, without having to specify the library version when linking. It's not a terrible effective scheme, though, because you can easily get into a situation where a program links directly to one version of the library and indirectly to another version, and crashes due to the resulting confusion. And in practice, another level of indirection is used anyway so that one could easily give the full version of the library to the linker.
Reply
Parent - - By bahamada [de] Date 2009-09-15 13:03
just take a look into my https://launchpad.net/~sebastian-ruehl/+archive/ppa
You can grab the source page and the install just the dev dependencies.
Reply
Parent - By Carli [de] Date 2009-09-15 15:38
Wow, OpenClonk for Synaptics!
Up Topic Development / Developer's Corner / Download and compile the code now!
1 2 Previous Next

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill