public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Meson and Numa: C header not found
2+ messages / 2 participants
[nested] [flat]

* Re: Meson and Numa: C header not found
@ 2025-04-10 17:18  Daniel Westermann (DWE) <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Daniel Westermann (DWE) @ 2025-04-10 17:18 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Tomas Vondra <[email protected]>; [email protected] <[email protected]>

>That's just weird then.  The only other theory that comes to mind
>is that there's something wrong with the SELinux attributes on these
>fles.  restorecon might help if so.

If that would be the case, then it is a packaging issue on Fedora, I guess.

Even after restorecon I get this:

Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
Run-time dependency numa found: YES 2.0.19

../postgresql/meson.build:957:12: ERROR: C header 'numa.h' not found

... which gives this in the log:

Run-time dependency numa found: YES 2.0.19
Using cached compile:
Cached command line:  cc /home/postgres/build/meson-private/tmpjon5_bg2/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0 

Code:
 
        #ifdef __has_include
         #if !__has_include("numa.h")
          #error "Header 'numa.h' could not be found"
         #endif
        #else
         #include <numa.h>
        #endif
Cached compiler stdout:
 
Cached compiler stderr:
 /home/postgres/build/meson-private/tmpjon5_bg2/testfile.c:4:12: error: #error "Header 'numa.h' could not be found"
    4 |           #error "Header 'numa.h' could not be found"
      |            ^~~~~


../postgresql/meson.build:957:12: ERROR: C header 'numa.h' not found


Regards
Daniel





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Meson and Numa: C header not found
@ 2025-04-10 17:45  Tom Lane <[email protected]>
  parent: Daniel Westermann (DWE) <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2025-04-10 17:45 UTC (permalink / raw)
  To: Daniel Westermann (DWE) <[email protected]>; +Cc: Tomas Vondra <[email protected]>; [email protected] <[email protected]>

"Daniel Westermann (DWE)" <[email protected]> writes:
> Even after restorecon I get this:

> Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
> Run-time dependency numa found: YES 2.0.19

> ../postgresql/meson.build:957:12: ERROR: C header 'numa.h' not found

> ... which gives this in the log:

> Run-time dependency numa found: YES 2.0.19
> Using cached compile:
> Cached command line:  cc /home/postgres/build/meson-private/tmpjon5_bg2/testfile.c -E -P -D_FILE_OFFSET_BITS=64 -P -O0 

Ah-hah: the "cached" bit gave me the clue I needed.  I think
you ran "meson setup" without numactl-devel installed, and it
cached the fact that numa.h wasn't there.  I can reproduce
this error with

$ sudo dnf remove numactl-devel
$ git clean -dfxq
$ meson setup build
$ sudo dnf install numactl-devel
$ meson setup build --reconfigure

... which ends with

Run-time dependency numa found: YES 2.0.19

meson.build:957:12: ERROR: C header 'numa.h' not found

It's okay again after blowing away the build subdirectory
(e.g. via "git clean -dfxq") and trying again.

This implies that it caches info about header presence but
not library presence (else it wouldn't have thought that
the library was there either, I guess).  Kind of weird,
but I'm still learning about meson.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-04-10 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10 17:18 Re: Meson and Numa: C header not found Daniel Westermann (DWE) <[email protected]>
2025-04-10 17:45 ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox