On Wed, 2022-10-26 at 11:09 +0200, Florian Weimer wrote:
There will be a few generic issues in build tools that when address
fix multiple packages
Hi,
I've been interested in a check of a project I maintain and I stopped
very soon on Fedora 37 with
gcc-12.2.1-2.fc37.x86_64
glibc-2.36-4.fc37.x86_64
libdb-5.3.28-53.fc37.x86_64
When I try to compile this simple program:
#include <db.h>
int main(void) { db_create(NULL, NULL, 0); return 0; }
(which is part of the project's "can build" test to verify the thing is
properly installed in the system) using:
gcc -Wall -Wextra test.c -o test -ldb
then it doesn't claim anything and succeeds, but when I compile it as:
gcc -std=c99 -Wall -Wextra test.c -o test -ldb
I get an error:
In file included from test.c:1:
/usr/include/db.h:1098:9: error: unknown type name ‘u_int’
and tons of related warning/error lines generated by gcc.
Looking into the db.h file, it has there a comment that it can add the
`u_int`, when the system doesn't provide it, but that related block is
empty in Fedora. More interestingly, even when I add `#define
__USE_MISC 1` at the very top of the program, thus the
/usr/include/sys/types.h should declare also `typedef __u_int u_int;`,
the type is still unknown and the compilation aborts. Something
declares __u_char_defined before the sys/types.h gets to it, it seems.
A fix might be done on the libdb's db.h or elsewhere?
I may face more similar or totally different issues while I progress
with my compilation attempt (until I give up), and I'm not going to
spam this list with it. I do understand these things need to be
addressed individually, which makes perfect sense. Where it would be is
harder to guess for me.
Bye,
Milan