Re: CFT: snmalloc as libc malloc

From: Brooks Davis <brooks_at_freebsd.org>
Date: Thu, 09 Feb 2023 19:45:51 UTC
On Thu, Feb 09, 2023 at 07:36:48PM +0000, David Chisnall wrote:
> On 9 Feb 2023, at 19:15, Mateusz Guzik <mjguzik@gmail.com> wrote:
> > 
> > it fails to build for me:
> > 
> > /usr/src/lib/libc/stdlib/snmalloc/malloc.cc:35:10: fatal error:
> > 'override/jemalloc_compat.cc' file not found
> > #include "override/jemalloc_compat.cc"
> >         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 1 error generated.
> > --- malloc.o ---
> > *** [malloc.o] Error code 1
> > 
> > make[4]: stopped in /usr/src/lib/libc
> > /usr/src/lib/libc/stdlib/snmalloc/memcpy.cc:25:10: fatal error:
> > 'global/memcpy.h' file not found
> > #include <global/memcpy.h>
> >         ^~~~~~~~~~~~~~~~~
> > 1 error generated.
> > --- memcpy.o ---
> > *** [memcpy.o] Error code 1
> 
> This looks as if you haven???t got the submodule?  Is there anything in contrib/snmalloc?

I'd suggest adding a Makefile check for contrib/snmalloc/LICENSE or
the like with an .error with appropriate git submodule commands.

-- Brooks