matoom/frostbite

Installation instructions - Build for Linux (Fedora)

Closed this issue ยท 18 comments

Apologies if this is the wrong venue for this, but I'm struggling to install/build(?) on Linux (specifically, Fedora). The instructions on https://matoom.github.io/frostbite/installation.html. I'm not a c++ or Qt developer, so I suspect there are some assumptions I'm not discerning. Could you please help me build the project for linux?

Thanks for your patience,
P

Yep, not the first time this has come up. There's been a few other contributors who have managed to get it up and running, i think it should be a fairly straightforward process.

The install instructions are of no use to you unless you want to run the pre-built binaries for debian and in that case it's just unpack and run, nothing more to it.

If you're building it yourself then you have to get Qt installed on your system first.

Go to the Qt download page:

Get Qt installer (5.12 is the last one that doesn't require any registration):

Get Qt creator

Once you have everything set up -- run qt creator, open the project and press the green arrow to build.

Everything should technically run with zero-config but you want to manually copy all the resources in the same location as your binary.

Most importantly all files from:

  • /deploy/common
  • /deploy/linux

You can find the release scripts here in the bottom of the page but this likely only works on debian (might have to comment out in case of errors):

Outstanding. I was going down a C++ rabbit hole rather blind and to no avail. These instructions are immensely helpful and appreciated.

I find the cleanliness of you FE great, and love the map integration, so am quite excited to forgo Wine and install it natively to improve the rendering.

While I don't presume anything but amateurish enthusiasm, if you like help updating your site to include the above let me know.

I'll close the issue as soon as I've tested the procedure.

Thanks again,
P

Well, alas, no dice.

I was able to acquire all the Qt tools, but not able to build correctly on Fedora.

I also tried to use the precompiled binary with both Windows and Ubuntu (note that only release 1.15.1 makes the pre-compiled Unbuntu binary available) in virtual machines, but no dice there either. The only success I've had is running the Windows binary in Wine, which works well enough that I sill prefer Frostbite to any other FE I've tried. I'm wondering if there is, perhaps, a requirement such that it isn't possible to run in a virtual environment.

I'll close this issue as I don't want to waste anymore of your time, but I'd be happy to dig more deeply and share error messages if you're interested going down the rabbit hole.

If you have qt installed (I install it in Ubuntu and Debian via package manager), then you should be able just to go to the directory with sources and write

qmake
make

to build everything.
You might need to go to gui directory and perform the same commands as well.

Well, made some progress, but got stumped during the build with the following output:

cd gui/ && ( test -e Makefile || /usr/bin/qmake -o Makefile /home/pierre/Downloads/frostbite-1.16.0-beta/gui/gui.pro ) && make -f Makefile
make[1]: Entering directory '/home/pierre/Downloads/frostbite-1.16.0-beta/gui'
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -DRELEASE_VERSION="1.16.0b" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I. -I.. -I../log4qt/src -I. -I.. -I../singleapp -I../cleanlooks -I../cleanlooks/shared -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtMultimedia -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtNetwork -I/usr/include/qt6/QtXml -I/usr/include/qt6/QtConcurrent -I/usr/include/qt6/QtCore -Imocs -Iuics -I/usr/lib64/qt6/mkspecs/linux-g++ -o objs/appenderskeleton.o ../log4qt/src/log4qt/appenderskeleton.cpp
make[1]: Leaving directory '/home/pierre/Downloads/frostbite-1.16.0-beta/gui'

It looks like you are building with Qt6, not with Qt5(have a look at your include paths in this output). I doubt you can build Frostbite with Qt6, so you better to uninstall qt6 and try to install qt5.

You're right!

After a few hours of figuring out the relationship of Qt to the host of packages available in the Fedora dnf repository, and the function versioning of qmake, I was able to get it built and running successfully. So happy to forgo wine and run directly (and perhaps mainly solve the puzzle).

The basic issue is that installing 'qt' using 'dnf' in Fedora 40 installs only qt6, and while qt5-* packages are available for installation, it wasn't at all clear that qt5-devel installed qmake-qt5. Anyhoo, hopefully this will help anyone else interested in the same.

Please not my offer still stands if you'd like the steps performed written up to add to the installation page.

Say what you will but linux as a whole is kind of difficult to pin down, every distro comes with it's own quirks. The ubuntu machine that i use for building linux releases was a full clean slate and with all the cross references i doubt the binary packages even runs on any other ubuntu versions besides the one i'm building on, let alone on other distros. There's no way to make a one size fits all for linux.

To give you just a small snippet of all the system dependencies that are needed to run on ubuntu and i only package a handful of those, everything else is just expected to be there.

~/projects/build-FrostBite-Desktop-Release$ ldd Frostbite 
	linux-vdso.so.1 (0x00007ffd650f4000)
	libQt5Widgets.so.5 => /lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fb85532a000)
	libQt5Multimedia.so.5 => /lib/x86_64-linux-gnu/libQt5Multimedia.so.5 (0x00007fb855213000)
	libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fb854c28000)
	libQt5Network.so.5 => /lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007fb854a67000)
	libQt5Xml.so.5 => /lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007fb854a25000)
	libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fb8544dc000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb8544b7000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb8542d5000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb854186000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb85416b000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb853f79000)
	libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007fb853f24000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fb853e9a000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fb853e62000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb853e46000)
	libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fb853d41000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb853d3b000)
	libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007fb853a3c000)
	libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007fb853854000)
	libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007fb8537d0000)
	libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007fb8537ba000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fb853690000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb855cc8000)
	libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007fb85360e000)
...

Please not my offer still stands if you'd like the steps performed written up to add to the installation page.

Any help regarding updating the page in it's entirety would be welcome and greatly appreciated. It's frankly in a dire state on all fronts.

Going over the current page right now, i'm thinking it might be best to just separate the basic download page and add a new page for building under linux or maybe more specifically building under fedora? I wouldn't necessarily want to confuse any regular users looking to download the binaries and not wanting to go through the entire building process. Really, i wouldn't be opposed to rethinking the whole installation page and actually move the ruby instructions under a separate page?

It's hard for me to judge from my biased pov since i already know where i upload my releases and i'm not exactly going through the same installation process myself.

Ha! Yeah, there's a lot to like about Linux, but there are some challenges too. I'm happy to take a crack at an updated page. I haven't had a chance to collaborate on something (I normally just do web dev stuff alone), so it'll be a fun chance to flex github.

I'm noticing the pages site hosting the user guide isn't pulling from the project's 'docs' directory, so I'm not sure how to clone the site and propose changes.

If you piont me to repository for the guide itself, I'll set up a fresh virtual install of Fedora 40, go through the process again of compiling again, and document the steps, making proposed changes to the installation section that seem helpful. If I manage it, I'll try to do the same for ubuntu. I expect with a guide for a debian based distro and the red hat based distro, you'd cover almost the whole the linux gang, except perhaps for some edge cases and the Arch linux gang, but the latter are pretty savvy and I doubt would need me to guide them.

On a side note, and at the risk of being overbold, going through this process has got me curious about GUI programming. In figuring out the outlines of Qt as a platform, I snooped around for comparative frameworks/libraries and got enamoured with the gnome development IDE/platform. If I wanted to take a crack as a native gnome gui FE, where would I find info on the API for building to DR?

FE internals are tightly coupled to Qt, it is not only GUI itself depends on it.
As for linux deliverables, maybe a good way to go is to have a look at AppImage or Flatpak, it seems more and more apps are using this approach to deal with dependencies. I personally never tried to build anything with them so cannot help there...

Sorry for the delayed response. They just dropped a major patch in gw and i've been farming like crazy.

Yea, the site runs on github web hosting. You can find more information from the docs here.

Long story short, all the sources can be found in gh-pages branch.

Everything is mostly plain html. I use jquery for highlighting syntax in code examples and google analytics to help with google search results.

If I wanted to take a crack as a native gnome gui FE, where would I find info on the API for building to DR?

There's no official api or specs that i'm aware of. Everything you see here is a product of reverse engineering and honestly not a very good example on how to implement the protocols (my first attempt).

Just a word of warning, it's hard to have the foresight to expect what is to me known as the sf protocol (used by the stormfront client). It looks like xml but don't be fooled by the appearances, it's very much not xml nor does it adhere to any xml standards. I partly made it work using a conventional xml parser but you might want to consider creating your own custom parser for this.

What i've gathered over the years of playing dr and experimenting i've placed into one single file that i believe contains all the outliers in the protocol and other parts that demanded special attention.

This and the authentication api is probably what you need to focus on to get started.

The auth protocol is best documented here, on the warlock wiki.

I have the password encryption implemented in c++, both plain and qt versions.

If you run frostbite with debug logging enabled it's very transparent with the underlying protocols and you can draw a lot of information from other open source community projects that are out there.

On the bright side i've been keeping an eye on the web client (they hopefully continue developing). It's a web socket based json protocol and is much cleaner. Only problem being it's not quite fleshed out yet in terms of functionality. From what i can recall off the top of my head there's a couple of crucial pieces missing like the exp window for example. If that works for you, this could be one route to take.

There's no official specs for that either. You would have to tear through all the guts and try to reverse engineer it but at least it would be somewhat easier to accomplish with javascript.

As for linux deliverables, maybe a good way to go is to have a look at AppImage or Flatpak

I think i vaguely recall trying to port to appimage but with no success at the time. I might have to look into this again.

Thanks for all the info. I'll try to put something together next week you can consider (the install instructions rather than a GUI - sounds like putting frostbite together was pretty painful).

Hi! Sorry for reopening, but I've put together some changes on the Download/Installation page for you consideration, detailing how to install on Fedora, with a few (I hope helpful) structural changes to the page to make it easier to follow.

I've not contributed to other people's projects before, so simply cloned the project on my local machine, created a new branch, and made the proposed changes. I can't push the new branch, so let me know how you'd like me to proceed.

If you like the basic idea, we could break it up into multiple pages, but I'd suggest moving to generating the new and updated pages in markdown for simplicity sake. Would be a lot faster to write and edit.

Anyhoo, let me know.

P

In general you need to fork the project in Github UI, then clone your forked version, commit/push and make a pull request from your branch to upstream(this repo).
Here are the instructions https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo

Huzzah! It seems to have worked. Have a look, and no hard feelings if you'd rather pass.

It occurs to me that the fork workflow is nice, as I expect I will be able to test the pages on github as I attempt to break apart the pages use a simpler markdown approach.

Also, I played around with flatpak this morning. Seems setting up your project is really just a matter of defining 'manifest' file (famous last words). Once I fiddle with pages some more, I'll see if I can't put together a working manifest. Not sure if you'd rather see Flathub, or as just a local build to include as a downloadable and installable option.

Alright. I've made two pull requests. One is basically just adding the install instructions for Fedora, the other splits the installation instruction across pages, and refactors the whole site using Jekyll based markdown with the minimal theme.