[NSWI004] Error running make after implementing printk()

Jan Výkruta vykrutak at gmail.com
Sat Oct 10 19:44:53 CEST 2020


There is a cyclic dependency: print.h -> adt/list.h -> debug.h -> print.h.

Don't bother adding helper functions into print.h instead mark them static
in print.c and the compiler will shut up about missing declarations.

On Sat, Oct 10, 2020 at 4:08 PM Krisztian Bokor <bokorkrisztian7 at gmail.com>
wrote:

> Same issue
>
> On Sat, Oct 10, 2020, 16:07 Quoc Anh Nguyen <nquocanh97 at gmail.com> wrote:
>
>> Hello,
>> I have a problem running "make" after modifying the print.c file in
>> assignment 01. I cloned the a01-LOGIN repository, ran the "configure.py"
>> script and successfully ran the "make" command. I proceeded to edit
>> "kernel/src/lib/print.c" and "kernel/include/lib/print.h" to implement my
>> printk() function.
>> Then I ran the configure.py script and tried to run "make", but it gave
>> me this error:
>>
>> include/lib/print.h:15:14: error: unknown type name 'list_t'
>>    15 | void print_L(list_t* list);
>>
>> So I added #include <adt/list.h> to the print.h file. Now "make" gives me
>> this error:
>>
>> include/adt/list.h: In function 'link_init':
>> include/adt/list.h:127:5: error: implicit declaration of function
>> 'assert' [-Werror=implicit-function-declaration]
>>   127 |     assert(link != NULL);
>>       |     ^~~~~~
>> include/adt/list.h:9:1: note: 'assert' is defined in header '<assert.h>';
>> did you forget to '#include <assert.h>'?
>>
>> What am I doing wrong here? I don't suppose I should just include the
>> assert.h file?
>> --
>> Nguyen
>> _______________________________________________
>> NSWI004 mailing list
>> NSWI004 at d3s.mff.cuni.cz
>> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
>>
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/nswi004/attachments/20201010/c7b2099a/attachment.htm>


More information about the NSWI004 mailing list