QW-Group/ezquake-source

BUG: build error at Artix

Closed this issue · 7 comments

Please search for existing issues and check for potential duplicates before filing yours.

ezQuake version:
r7708~3c3623f8
7708

OS/device including version:
Artix

Describe the bug
error during compilation
make -j5

 1103 |                                         SV_MVDName2Txt(dir.files[i].name));
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[CC] .ezquake/src/sv_mod_frags.o
[CC] .ezquake/src/vm.o
src/sv_mod_frags.c: In function ‘parse_mod_string’:
src/sv_mod_frags.c:181:51: error: passing argument 1 of ‘pcre2_substring_list_free_8’ from incompatible pointer type [-Wincompatible-pointer-types]
  181 |                         pcre2_substring_list_free((const PCRE2_UCHAR8**)buf);
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   const PCRE2_UCHAR8 ** {aka const unsigned char **}
In file included from src/sv_mod_frags.c:33:
/usr/include/pcre2.h:949:1: note: expected ‘PCRE2_UCHAR8 **’ {aka ‘unsigned char **’} but argument is of type ‘const PCRE2_UCHAR8 **’ {aka ‘const unsigned char **’}
  949 | PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
      | ^

To Reproduce

Clone the git repository:

git clone --recurse-submodules https://github.com/ezQuake/ezquake-source.git

Switch to ezquake-source path:

cd ~/ezquake-source/

Initialize/update git submodules:

git submodule update --init --recursive --remote

Run the compilation (replace 5 with the number of cpu cores you have +1):

make -j5

You can add -jN as a parameter to make to build in parallell. Use number of cpu cores plus 1 (e.g. -j5 if you have a quad core processor).

Copy the compiled binary to your Quake folder, on 64bit linux the binary will be called ezquake-linux-x86_64.

Expected behavior
binary ezquake-linux-x86_64

VVD commented

Try to remove from src/sv_mod_frags.c:181:51: pcre2_substring_list_free((const PCRE2_UCHAR8**)buf); substring const: pcre2_substring_list_free((PCRE2_UCHAR8**)buf); and build again.

@VVD Thanks a lot! Build done.

@VVD sorry have yet questions

again make clone git with no editing src/sv_mod_frags.c :181:51:

pcre2_substring_list_free((const PCRE2_UCHAR8**)buf); substring const: pcre2_substring_list_free((PCRE2_UCHAR8**)buf);

and its build good with no errors, why?

game working well, but what this mean at console?

home:[freeartist-artix]:~/Downloads/ezquake-source$ ./ezquake-linux-x86_64
**Error: Couldn't load gfx/palette.lmp**

This is typically caused by being unable to locate pak0.pak.
Copy pak0.pak into 'id1' folder, in same directory as executable.

(zenity:10592): Adwaita-WARNING **: 08:56:04.756: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
**No provider of glGenSamplers found.  Requires one of:
    Desktop OpenGL 3.3
    GL_ARB_sampler_objects
    OpenGL ES 3.0**

home:[freeartist-artix]:~/Downloads/ezquake-source$ 
VVD commented
  1. Another compiler? Other build options?
  2. Read this:
This is typically caused by being unable to locate pak0.pak.
Copy pak0.pak into 'id1' folder, in same directory as executable.

You need file pak0.pak with game data.

Another compiler? Other build options?

Only add to env, do git clone and build again with no errors
export CFLAGS="-march=native -O3"
from advice at nQuake/client-linux#15 (comment)

Read this:

already present at dir with builded bin ezquake-linux-x86_64

home:[freeartist-artix]:~/Downloads/ezquake-source/id1$ ls
id1  pak0.pak  pak1.pak
home:[freeartist-artix]:

and what this mean? i am at old g92 nvidia card with 340.108 driver patched for new kernels

(zenity:10592): Adwaita-WARNING **: 08:56:04.756: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
**No provider of glGenSamplers found.  Requires one of:
    Desktop OpenGL 3.3
    GL_ARB_sampler_objects
    OpenGL ES 3.0**
VVD commented

Get nQuake, install it and replace ezquake with just compiled.

i'm going to go ahead and close this since the initial issue was resolved, if needed we can help further on discord.quake.world