The official "ZDoom on Linux" thread.

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Re: The official "ZDoom on Linux" thread.

Postby MartinHowe » Fri Nov 18, 2016 6:31 pm

I haven't done any but trivial development on Unix for years (yes I said Unix not Linux, that should tell you how long ago) and never used CMake before (maybe it didn't exist in 2002) so there's a lot to learn. Just Plain old Make :) So to get people started, it would help if the Wiki instructions were up to date; it's much easier to learn this sort of thing by tinkering with a working build system. So the Wiki needs to include getting the other libraries and also gtk+ 3.0 (sorry forgot to mention that, as that is not present on a default install). This procedure was on a newly installed Linux Mint Cinnamon "Sarah" 18.

I am re-running the entire process from scratch (after the libraries already installed), starting with the fresh zdoom_build directory (I use a different location but paths are not the issue here) and this is what I get:

Code: Select allExpand view
make: *** No rule to make target 'clean'. Stop.
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found GME: /usr/lib/x86_64-linux-gnu/libgme.so 
-- Using system zlib, includes found at /usr/include
-- Using system jpeg library, includes found at /usr/include
-- Using system bzip2 library, includes found at /usr/include
-- Using system gme library, includes found at /usr/include
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of 0i8
-- Check size of 0i8 - failed
-- Check size of 0l
-- Check size of 0l - done
-- Check size of 0ll
-- Check size of 0ll - done
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of void *
-- Check size of void * - done
-- Check size of __int64
-- Check size of __int64 - failed
-- Looking for itoa
-- Looking for itoa - not found
-- Performing Test DUMB_CAN_USE_SSE
-- Performing Test DUMB_CAN_USE_SSE - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.18.9
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread 
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so 
-- FMOD include files found at /home/martin/Games/System.Linux/ZDoom/zdoom/fmodapi42636linux64/api/inc
-- FMOD version: 0004.26.36
CMake Error at src/CMakeLists.txt:314 (message):
  Use of FMOD Ex 0004.26.36 with OpenAL will result in crashes.  Either
  update FMOD to 4.36 or later or set NO_OPENAL.


-- FMOD library found at /home/martin/Games/System.Linux/ZDoom/zdoom/fmodapi42636linux64/api/lib/libfmodex64-4.26.36.so
-- Found SndFile: /usr/lib/libsndfile.so 
-- Found MPG123: /usr/lib/libmpg123.so 
-- Found FluidSynth: /usr/lib/x86_64-linux-gnu/libfluidsynth.so 
-- Selected assembler: /usr/bin/as
-- Performing Test CAN_DO_CPP14
-- Performing Test CAN_DO_CPP14 - Success
-- Looking for filelength
-- Looking for filelength - not found
-- Looking for strupr
-- Looking for strupr - not found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for strnicmp
-- Looking for strnicmp - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Fluid synth libs: /usr/lib/x86_64-linux-gnu/libfluidsynth.so
-- Looking for FMOD_System_GetDriverCaps in /home/martin/Games/System.Linux/ZDoom/zdoom/fmodapi42636linux64/api/lib/libfmodex64-4.26.36.so
-- Looking for FMOD_System_GetDriverCaps in /home/martin/Games/System.Linux/ZDoom/zdoom/fmodapi42636linux64/api/lib/libfmodex64-4.26.36.so - found
-- Configuring incomplete, errors occurred!
See also "/home/martin/Games/System.Linux/ZDoom/zdoom/build/CMakeFiles/CMakeOutput.log".
See also "/home/martin/Games/System.Linux/ZDoom/zdoom/build/CMakeFiles/CMakeError.log".


Note the following:
*Lack of a "clean" target in Make.
*CMake Error at src/CMakeLists.txt:314 (message): Use of FMOD Ex 0004.26.36 with OpenAL will result in crashes. Either update FMOD to 4.36 or later or set NO_OPENAL.

I then open up src/CMakeLists.txt and set NO_OPENAL. When I rebuild, it works, issuing only some "uninitialised" warnings which are inevitable with a dev build.

I then use the git commands to get the current release version 2.8.1. This is after deleting the modified CMakeLists.txt file to avoid clashes.
Building this does NOT incur a warning about OpenAL, so clearly the current dev version is the one affected by it.
I now have a working release build of ZDoom.

I hope the devs and Wiki maintainers find this helpful :)
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: The official "ZDoom on Linux" thread.

Postby Blzut3 » Fri Nov 18, 2016 8:00 pm

NO_OPENAL can be set with cmake-gui, ccmake, or with -DNO_OPENAL=ON. No need to modify any files.

I'm not sure why the make clean line is there.

Only the dev builds produce the OpenAL error since the diagnostic was added recently. It's still relevant.
Blzut3
Pronounced: B-l-zut
 
Joined: 24 Nov 2004

Re: The official "ZDoom on Linux" thread.

Postby MartinHowe » Fri Nov 18, 2016 8:02 pm

Thanks for that, cheers.

For Linux audio experts:

On a separate note, I keep getting warnings about fluidsynth not being able to pin sample data in memory - on a machine with 12GB physical RAM!
None of the usual fixes work: low-latency kernel, /etc/security/limits.d/martin.conf with priority 85 and unlimited memlock, adding myself to the audio group.
The music plays just fine, but these warnings are irritating.
Am I doing something extremely stupid here?
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: The official "ZDoom on Linux" thread.

Postby Blzut3 » Fri Nov 18, 2016 9:50 pm

As far as I know the fluidsynth thing would be something to ask on their mailing list (or whatever). It never bothered me and I don't think it's anything that ZDoom's doing.

I've simplified the wiki article to hopefully be easier to follow for first timers. I feel like the article got a bit on the verbose side and started to make compiling ZDoom look way more complicated than it actually is.
Blzut3
Pronounced: B-l-zut
 
Joined: 24 Nov 2004

Re: The official "ZDoom on Linux" thread.

Postby MartinHowe » Sat Nov 19, 2016 6:16 am

I actually came here this morning to thank whoever did that - so THANKS :D
Will give it a walk-through later today.

EDIT:
I couldn't wait :)

Works as is except that the ${a} needs removing in the next-to-last line shown below; the FMOD folder tree has both 64 and 32 bit versions and its name isn't suffixed with anything:

a='' && [ "$(uname -m)" = x86_64 ] && a=64
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DFMOD_LIBRARY="fmodapi44462linux/api/lib/libfmodex${a}-4.44.62.so" \
-DFMOD_INCLUDE_DIR="fmodapi44462linux${a}/api/inc" &&
make
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: The official "ZDoom on Linux" thread.

Postby Matt » Sat Jan 07, 2017 2:19 am

How do you load a mod that's in a folder with a space in its name? I've tried just typing as is and typing with a backslash before the space and neither works.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: The official "ZDoom on Linux" thread.

Postby _mental_ » Sat Jan 07, 2017 2:41 am

Vaecrius wrote:How do you load a mod that's in a folder with a space in its name? I've tried just typing as is and typing with a backslash before the space and neither works.

I'm using double quotes around a name. This is especially helpful if there are several characters in its path that need to be escaped.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: The official "ZDoom on Linux" thread.

Postby Gez » Sat Jan 07, 2017 6:30 am

Vaecrius wrote:How do you load a mod that's in a folder with a space in its name? I've tried just typing as is and typing with a backslash before the space and neither works.


zdoom "folder with spaces in its name/mod with spaces in its name.pk3" "another spaced folder/another spaced mod name.wad" "and a third why not/you get how it works I guess.zip"
Gez
 
 
 
Joined: 06 Jul 2007

Re: The official "ZDoom on Linux" thread.

Postby Matt » Tue Jan 17, 2017 12:35 am

Apparently it wasn't working because I was trying to run this instead of gzdoom directly:
Code: Select allExpand view
#!/bin/bash
~/doom/./gzdoom $*
Is there any way to make this perform the same way?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: The official "ZDoom on Linux" thread.

Postby _mental_ » Tue Jan 17, 2017 1:14 am

It should be
Code: Select allExpand view
#!/bin/sh
~/doom/gzdoom "$@"

Consider to create an alias instead.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: The official "ZDoom on Linux" thread.

Postby Matt » Wed Jan 18, 2017 12:15 am

Sweet, thanks!

EDIT: seems I have to set them separately in bash and gmrun...
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: The official "ZDoom on Linux" thread.

Postby Elias79 » Thu Mar 09, 2017 1:50 pm

Is Gzdoom discussion allowed here?
as i had some issues compiling it from scratch due to all the dependencies when having different versions of zdoom or gzdoom.
Elias79
 
Joined: 30 Jan 2017

Re: The official "ZDoom on Linux" thread.

Postby Rachael » Thu Mar 09, 2017 1:57 pm

Yes.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: The official "ZDoom on Linux" thread.

Postby Matt » Thu Mar 09, 2017 4:11 pm

I haven't had to do anything about dependencies in ages... what's missing?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: The official "ZDoom on Linux" thread.

Postby Elias79 » Thu Mar 09, 2017 5:37 pm

Vaecrius wrote:I haven't had to do anything about dependencies in ages... what's missing?

Many of those lol: https://aur.archlinux.org/packages/gzdoom/

The problem comes when i want to install more that one version using the package manager, and i failed compiling it from scratch.
Elias79
 
Joined: 30 Jan 2017

PreviousNext

Return to General

Who is online

Users browsing this forum: Enjay and 6 guests