Building g2.1.pre-1159-gfbefe13 with error on FreeBSD

Bugs that have been resolved.

Moderator: Graf Zahl

VVD
Posts: 1
Joined: Sun Jul 12, 2015 19:18

Building g2.1.pre-1159-gfbefe13 with error on FreeBSD

Post by VVD »

Trying to build GZDoom g2.1.pre-1159-gfbefe13 on FreeBSD:
git clone git://github.com/coelckers/gzdoom.git
cmake .
make

Then I fix 2 errors in src/gl/system/gl_system.h and src/sound/fmodsound.cpp near __APPLE__ and malloc.h: added __FreeBSD__ in same #if and #ifdef.

Then make again:
Linking CXX executable ../gzdoom
/usr/bin/ld: cannot find -lgtk-x11-2.0
CC: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
I have gtk-x11-2.0:
ls -l /usr/local/lib/libgtk-x11-2.0.so*
lrwxr-xr-x 1 root wheel 27 28 мар 05:56 /usr/local/lib/libgtk-x11-2.0.so@ -> libgtk-x11-2.0.so.0.2400.27
lrwxr-xr-x 1 root wheel 27 28 мар 05:56 /usr/local/lib/libgtk-x11-2.0.so.0@ -> libgtk-x11-2.0.so.0.2400.27
-rwxr-xr-x 1 root wheel 4148876 28 мар 05:56 /usr/local/lib/libgtk-x11-2.0.so.0.2400.27
Can't find any build logs with errors. How to debug building of GZDoom?
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: Building g2.1.pre-1159-gfbefe13 with error on FreeBSD

Post by Rachael »

Unless I missed something, I believe FreeBSD is not officially supported yet. That being said, there are 3 things you may be able to try:

1) you might try and get a minimal Ubuntu distro and building it on that using a virtual machine, then transfer the binary over to FreeBSD and run it from there using FreeBSD's Linux emulator (which will be a bit slow). It may or may not work. (I believe this may be your best option)

2) Failing that, you can try and use WinE instead, and just use the Windows version. That can be built using MinGW. (This one is more of a failsafe, but I have only ever tested older versions of GZDoom on WinE, I have not tested the new ones that require more advanced OpenGL features yet)

3) Another thing you may try is passing -D__linux__ to gcc during build. I believe there is an option in cmake to do this automatically. If GZDoom uses any linux-dependent services though it may not actually work, and that is honestly a bit hacky. Either way, it may be looking for libraries which do not exist.

If none of these work, you may be SOL for running it on FreeBSD.

If you do get it working, please let us know what you did - if you did indeed perform any code changes then the repository should probably be updated. If you performed option 3, then the #ifdef lines will all need to be updated with __FreeBSD__ because passing __linux__ through the compiler is ugly.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: Building g2.1.pre-1159-gfbefe13 with error on FreeBSD

Post by Graf Zahl »

No feedback for 7 months? Off this goes...

Return to “Closed Bugs”