Re: Blacklistd Issues - Problem Identified

From: Michael Grimm <trashcan_at_ellael.org>
Date: Tue, 18 Apr 2023 17:33:56 UTC
Norman Gray <gray@nxg.name> wrote:
> 
> On 18 Apr 2023, at 12:21, Michael Grimm wrote:

>> The sources are at:
>> 
>> /usr/src/contrib/blacklist
>> 
>> In /usr/src/contrib/blacklist/bin you'll find blacklistd.conf and the config files in /usr/src/contrib/blacklist/etc
> 
> I can see the sources if I include src when installing from dvd1.  So far so good...
> 
> I think I may need to be pointed towards some further reading, though.  In (a copy of) /usr/src/contrib/blacklist I try 'make', and that doesn't work (illustrated below) because there's clearly a -I missing (ie, I'm doubtless doing this in the wrong place).

Have a look at Makefile.inc. Here you find that you need to include the path /usr/src/contrib/blacklist/include.

I believe that you will need to resolve some more issues with compiling blacklistd stand alone. I have never tried something similar.

Because I am following STABLE, and by that you have to compile ...

> Looking at [1], /usr/src/Makefile, and /usr/src/UPDATING, I'm getting the impression that the only documented process is 'make world' or 'make buildworld'.  Would that be right?  Even in this simple case where the sources are associated with the userland on the same install image?

… world and kernel from scratch. (Same stands true for following HEAD.) The very first time it will take some time. But after that a small modification of let's say blacklistd.c will result in very short compilation times.

If you do not have a git repository and never had a 'make world' and 'make kernel' running, it will be hard to develop code.

BUT, I have mentioned perviously, that I am not an expert either, someone my point to a simple method in just compiling the blacklist contribution.

Regards,
Michael

> [1] https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld
> 
> 
> %  make
> ===> lib (all)
> cc  -O2 -pipe -fno-common   -g -MD  -MF.depend.bl.o -MTbl.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable  -Qunused-arguments    -c bl.c -o bl.o
> bl.c:60:10: fatal error: 'bl.h' file not found
> #include "bl.h"
>         ^~~~~~
> 1 error generated.
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/src/contrib/blacklist-mod/lib
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/src/contrib/blacklist-mod