Hello Thomas,

Thomas Frohwein <tfrohw...@fastmail.com> wrote:
> On Thu, Mar 09, 2023 at 12:06:57PM +0000, Stuart Henderson wrote:
> > On 2023/03/09 07:13, Ali Farzanrad wrote:
> > >  --- Quake/Makefile.orig
> > >  +++ Quake/Makefile
> > > -@@ -29,7 +29,7 @@ VORBISLIB=vorbis
> > > - # Helper functions
> > > - # ---------------------------
> > > - 
> > > --check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - 
> > > > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
> > > -+check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > 
> > > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
> > > - 
> > 
> > Please leave in the hunk that removes -Werror
> 
> yes, what's the reason for this being in the diff/

I thought that you've removed that -Werror mistakenly, because it was
used to detect compiler options and without that flag it's functionality
(compiler flags detection) is broken.

> > 
> > 
> > > - # ---------------------------
> > > - 
> > > -@@ -51,7 +51,7 @@ LDFLAGS ?=
> > > +@@ -51,15 +51,15 @@ LDFLAGS ?=
> > >   DFLAGS ?=
> > >   CFLAGS ?=
> > >   
> > >  -CFLAGS += -Wall -Wno-trigraphs -Wno-unused-function -Werror -std=gnu11 
> > > -MMD
> > >  +CFLAGS += -Wall -Wno-trigraphs -Wno-unused-function -std=gnu11 -MMD
> > >   CFLAGS += $(CPUFLAGS)
> > > ++CFLAGS += -DUSE_CRT_MALLOC
> 
> Can you reference documentation about the option USE_CRT_MALLOC? I can't
> find any in the vkquake files, nor on a quick web search.

No, I just receive segmentation fault on my arm64 machine:
$ doas pkg_add vkquake
quirks-6.116 signed on 2023-03-09T01:36:51Z
vkquake-1.20.3: ok
New and changed readme(s):
        /usr/local/share/doc/pkg-readmes/vkquake
$ vkquake
Command line: ./vkquake
Found SDL version 2.24.1
Detected 8 CPUs.
Initializing vkQuake v1.20.3
Built with Clang 13.0.0
Host_Init
Segmentation fault

And it was about a NULL-dereferencing after a failed memory allocation.
I tried to find the problem, but its memory management was so complex.
I found this option on Quake/mem.c file.

Even after applying my patch it is still not working on my system, but
I don't think it is related to this port:
$ vkquake
Command line: ./vkquake
Found SDL version 2.24.1
Detected 8 CPUs.
Initializing vkQuake v1.20.3
Built with Clang 13.0.0 
Host_Init
Playing registered version.
Console initialized.
UDP4_Init: gethostbyname failed (Host name lookup failure)
UDP4 Initialized
UDPv6 Initialized
Server using protocol 999+ (FTE-RMQ)
Exe: 21:30:40 Mar 10 2023

Vulkan Initialization
Using Vulkan 1.1
Instance extensions:
 VK_KHR_surface
 VK_KHR_xlib_surface
 VK_KHR_get_surface_capabilities2
 VK_KHR_get_physical_device_properties2


ERROR-OUT BEGIN


QUAKE ERROR: Couldn't find any Vulkan devices

> > >   ifneq ($(DEBUG),0)
> > >   DFLAGS += -D_DEBUG
> > > -@@ -59,7 +59,6 @@ CFLAGS += -g
> > > + CFLAGS += -g
> > >   do_strip=
> > >   else
> > >   DFLAGS += -DNDEBUG
> > > 

Reply via email to