Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD compatibility #11

Open
interkosmos opened this issue Aug 17, 2022 · 1 comment
Open

FreeBSD compatibility #11

interkosmos opened this issue Aug 17, 2022 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@interkosmos
Copy link

Trying to build qengine on FreeBSD:

$ mkdir build
$ cd build/
$ cmake -DBUILD_SDL=OFF -DBUILD_DOCS=OFF ..

This fails, as the following include has to be added to src/platform/unix/memory.c first:

@@ -36,6 +36,7 @@
 
 #if defined(__FreeBSD__) || defined(__OpenBSD__)
 #include <machine/param.h>
+#include <sys/types.h>
 #define MAP_ANONYMOUS MAP_ANON
 #endif

Then, linking fails:

[ 31%] Building C object CMakeFiles/client.dir/src/game/player/weapon.c.o
[ 32%] Linking C executable client
ld: error: undefined symbol: input_update
>>> referenced by system.c
>>> CMakeFiles/client.dir/src/platform/unix/system.c.o:(Sys_SendKeyEvents)
[…]

Perhaps, input.h is not found for whatever reason?

@klaussilveira klaussilveira added bug Something isn't working good first issue Good for newcomers labels Jun 7, 2023
@kniffy
Copy link

kniffy commented Jul 25, 2023

for reasons I don't understand I can successfully build qengine on my freebsd 13.2 workstation, after applying the memory.c patch. I packed a tarball of the build dir here https://tildas.org/files/misc/qengine-fbsd-20230725.tzst

it does not build on a ghostbsd 23.06.01 system:

[ 29%] Building C object vendor/SDL2-2.0.22/CMakeFiles/SDL2.dir/src/video/x11/SDL_x11xinput2.c.o
[ 29%] Building C object vendor/SDL2-2.0.22/CMakeFiles/SDL2.dir/src/video/x11/edid-parse.c.o
[ 29%] Building C object vendor/SDL2-2.0.22/CMakeFiles/SDL2.dir/src/core/unix/SDL_poll.c.o
[ 29%] Building C object vendor/SDL2-2.0.22/CMakeFiles/SDL2.dir/src/core/linux/SDL_udev.c.o
/home/voyevoda/WORK/GIT/qengine/vendor/SDL2-2.0.22/src/core/linux/SDL_udev.c:32:10: fatal error: 'linux/input.h' file not found
#include <linux/input.h>
         ^~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants