Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Baron Pampa

Can't compile(Linux)

Recommended Posts

Hi, I have trouble running Eternity. When using the AUR version it crashes before starting. The AUR git version also fails to compile. I've resorted to compiling directly from your repository, but I receive following error upon execution of the "cmake .." command:
 

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SDL2_NET_INCLUDE_DIR
[Lot of lines which go like "used as include directory in directory XYZ]

SDL2_NET_LIBRARY
    linked by target "eternity" in directory /home/brzegorz/Builds/eternity/source

-- Configuring incomplete, errors occurred!

I'm using Arch Linux on A10-6800K CPU. In the attachement you can find the CMakeOutput.log.

CMakeOutput.zip

Share this post


Link to post

OK given you're on Arch you'll need to punch in following (assuming you're using sudo):

sudo pacman -S sdl2_net

You may also need "sdl2_mixer" installed. The issue is that you're missing the sdl2_net library on your system, which is required. Let me know if there's any other trouble.

Share this post


Link to post

/usr/bin/ld: cannot find -lADLMIDI_static

I've checked both AUR and manually installed adlmidi from https://github.com/Wohlstand/libADLMIDI. cmake throws this warning:
 

CMake Warning (dev) at CMakeLists.txt:326 (ADD_SUBDIRECTORY):
  The source directory

    /home/brzegorz/Builds/eternity/adlmidi

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt.  Run
  "cmake --help-policy CMP0014" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

EDIT: Thanks for help with the SDL. Installing sdl2 helped with the cmake phase.

EDIT: I've noticed that the output of libadlmidi "make install" states:

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/lib/libADLMIDI.a
-- Up-to-date: /usr/local/include/adlmidi.h
-- Up-to-date: /usr/local/include/adlmidi.hpp
-- Up-to-date: /usr/local/lib/pkgconfig/libADLMIDI.pc

 

Shouldn't eternity engine link adlmidi instead of ADLMIDI_static?

EDIT: I've copied libADLMIDI.a as libADLMIDI_static.a and Eternity compiled. I've played through few maps and everything seems to be all right.

Edited by Baron Pampa

Share this post


Link to post

That's... odd. When I used CMake on windows libADLMIDI ended up in the appropriate place. libADLMIDI very much contains a CMakeLists.txt, and the submodule should be in "eternity/adlmidi". Does "eternity/adlmidi" not contain CMakeLists.txt? Additionally, the following should be in the CMakeLists.txt which means that static is the static library and the static library only should be built.

option(libADLMIDI_STATIC   "Build static library of libADLMIDI" ON)
option(libADLMIDI_SHARED   "Build shared library of libADLMIDI" OFF)

I pushed a commit. Maybe it fixes it for you? I'm unsure. Please let me know.

Edited by Altazimuth

Share this post


Link to post

I've made a pull and situation got even worse: cmake doesn't finish because it can't find libADLMIDI, regardless of whether I have it or not. eternity/adlmidi is an empty directory for me.

Just a thought...my libADLMIDI resides inside /usr/lib. Do I understand correctly that you expect that the contents of libADLMIDI repo be inside eternity/adlmidi?? I've tried cloning it there, but it doesn't help. Either way, after making a git clone/git pull, eternity/adlmidi is an empty directory.

Share this post


Link to post
8 hours ago, Baron Pampa said:

eternity/adlmidi is an empty directory for me

I figured as much. OK you gotta run "git submodule init" on the command line. I'm concerned by the directory being present but empty, as it foils my check that the "adlmidi" directory exists that is supposed to check if the submodule is installed.

 

Git is just too damn user-hostile.

Edited by Altazimuth

Share this post


Link to post
8 hours ago, Baron Pampa said:

Btw. thank you for your time :)

It's no issue. I apologise that you had to go through this in the first place.

What does CMake still fail with after initing?

 

Share this post


Link to post

[eternity]$ git submodule init
Submodule 'adlmidi' (https://github.com/Wohlstand/libADLMIDI/) registered for path 'adlmidi'
...

[build]$ cmake ..
...
CMake Error at CMakeLists.txt:34 (message):
  adlmidi not found.  Please install adlmidi submodule.

Sorry, I forgot to paste the messages :). Moreover, adlmidi directory is still empty after submodule init.

Share this post


Link to post

DavidPH fixed the cmake, and I also updated both the release and -git PKGBUILDs on the AUR, so those work too.

Share this post


Link to post

the -git AUR package still doesn't compile, although with adifferent error:

[ 97%] Building CXX object source/CMakeFiles/eternity.dir/sdl/i_pcsound.cpp.o
/var/cache/private/pikaur/build/eternity-engine-git/src/eternity/source/sdl/i_pcsound.cpp: In function ‘void PCSound_Mix_Callback(void*, Uint8*, int)’:
/var/cache/private/pikaur/build/eternity-engine-git/src/eternity/source/sdl/i_pcsound.cpp:165:24: error: static assertion failed: PCSound_Mix_Callback called with incompatible template parameter
  165 |          static_assert(false, "PCSound_Mix_Callback called with incompatible template parameter");
      |                        ^~~~~
make[2]: *** [source/CMakeFiles/eternity.dir/build.make:3235: source/CMakeFiles/eternity.dir/sdl/i_pcsound.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:414: source/CMakeFiles/eternity.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
==> ERROR: A failure occurred in build()

 

 

The normal package builds correctly, but there's no music.

Share this post


Link to post
2 hours ago, Baron Pampa said:

the -git AUR package still doesn't compile, although with adifferent error:

Well, it did work when I updated the package, but 49bb60e00e7e8f515bdac1fcfa05e0a08b922231 broke it again.

Share this post


Link to post
3 hours ago, chungy said:

49bb60e00e7e8f515bdac1fcfa05e0a08b922231 broke it again

I'll fix that. I didn't think that it'd actually compile the failed static_assert. Is that UB? I'll rejig those. I guess MSVC is just wrong.

 

EDIT: Fixed it.

 

Fucking MSVC accepting non-conforming code:

image.png.b1b8b14a2266d20479f333c975abf5e2.png

 

Edited by Altazimuth

Share this post


Link to post

I'd like to report that both normal and git version work now, but without music. Console output doesn't seem to show anything of interest:

[brzegorz@brzegorz-pc ~]$ eternity
The Eternity Engine
Copyright 2017 James Haley, Stephen McGranahan, et al.
http://www.doomworld.com/eternity

This program is free software distributed under the terms of
the GNU General Public License. See the file "COPYING" for
full details. Commercial sale or distribution of this product
without its license, source code, and copyright notices is an
infringement of US and international copyright laws.

Z_Init: Init zone memory allocation daemon.
Base path set to install directory.
User path set to home directory.
M_LoadSysConfig: Loading system.cfg
D_DoIWADMenu: Init IWAD choice subsystem.
IWAD found: /home/brzegorz/Games/Doom/iwads/doom.wad
Ultimate DOOM version

Built on Sep 22 2019 at 10:07:52
M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /usr/share/eternity/base/doom/eternity.pke
 adding /home/brzegorz/Games/Doom/iwads/doom.wad

E_ProcessEDF: Loading root file /usr/share/eternity/base/root.edf
V_InitMisc: Init miscellaneous video patches.
C_Init: Init console.
I_Init: Setting up machine state.
I_InitSound: Configured audio device with 2048 samples/slice.
I_InitMusic: Using SDL_mixer.
D_SetGraphicsMode: Set graphics mode
 (using video driver 'SDL GL2D')
 Loaded extension GL_ARB_pixel_buffer_object

I've both sdl2_net and sdl_mixer installed.

Share this post


Link to post

No music? Uhhh... You still have the problem if you update to the latest git revision?

Share this post


Link to post

Oh. Cool, thanks. The problem there might be related to MIDI being something of a nuisance on Linux IIRC. I'll need to make an EE-specific guide (though it'd be basically the same as Chocolate Doom or what have you) some day.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×