Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : Compiling DROD 5.1.1 on Linux
New Topic New Poll Post Reply
Poster Message
kikuchiyo
Level: Master Delver
Rank Points: 107
Registered: 04-01-2012
IP: Logged

File: drod_5.1.1.patch (890 bytes)
Downloaded 21 times.
License: Public Domain
icon Compiling DROD 5.1.1 on Linux (+11)  
I've managed to compile DROD 5.1.1 on Linux, after a fashion, and I'd like to document my experience for posterity's sake. I'm on a relatively up-to-date Fedora 38 x86_64 Linux system.

- Downloaded the source from https://github.com/CaravelGames/drod (I've actually ran git pull because I've already cloned the source earlier)
- As per readme.md, I cd'd into Master/Linux, and tried to run `./ninjamaker` then `.build`
- I had to install ninja-build and then a number of missing dependencies, I installed these with the system's package manager: `sudo dnf install ninja-build libtheora-devel libvorbis-devel jsoncpp-devel SDL2_mixer-devel SDL2_ttf-devel` (I've already had gcc, make etc. installed, so on a virgin system you'd need to install many more packages before you could even begin)
- Then it complained about a missing mk4.h, a dependency which was not picked up by the build system.
- I recalled from reading in the forum that this is related to something called Metakit, for which I only found dead links on the internets. In the windows readme I've found a link to its source: https://github.com/jnorthrup/metakit/archive/master.zip
- I downloaded that to a separate directory, and compiled it, following the instructions in the README (with one alteration, I've ran the configure script with `--prefix=/usr/local`
- Now I could run ./build in the DROD Master/Linux directory, but there was a compilation error in DbXML.cpp, so I've edited the source
- After that, it finally compiled, but in the end it failed at the linking step, it didn't find most of the libraries
- After a while I've figured it out that it wants to link those libraries statically, but I didn't have them in the appropriate format
- So I've re-ran `./ninjamaker` with the `-no-static` option and rebuilt
- I've saved a copy of my game directory under ~/.local/share/Caravel Games/drod-5_0 before attempting to run the newly minted binary
- apparently it didn't like my alteration to the Metakit installation procedure, so I've had to run it with `LD_LIBRARY_PATH=/usr/local/lib ./drod`
- After that, it finally ran!!!!1

Issues:
- The missing metakit dependency is awkward
- The source doesn't compile without errors with g++ 13, I had to patch the source (even if the modification was trivial)
- The static libraries are a problem, I'm not sure I can get them easily from the system's package manager
- When running the game, I've noticed that the fonts look bad (parts of the letters are missing), apparently this is "fixed" by downgrading to an older version of SDL2_ttf, again, this is not convenient with an up-to-date, package manager based system
- No caravelnet (though there is perhaps a build option for it, I haven't explored yet)





[Last edited by kikuchiyo at 09-09-2023 11:44 PM : added patch]
09-09-2023 at 11:43 PM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : Compiling DROD 5.1.1 on Linux
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.