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

* Re: Meson and Numa: C header not found
@ 2025-04-10 09:22  Tomas Vondra <[email protected]>
  0 siblings, 2 replies; 8+ messages in thread

From: Tomas Vondra @ 2025-04-10 09:22 UTC (permalink / raw)
  To: Daniel Westermann (DWE) <[email protected]>; [email protected] <[email protected]>

On 4/10/25 08:00, Daniel Westermann (DWE) wrote:
> Hi,
> 
> I wanted to play a bit with the Numa stuff recently committed but Meson fails to find numa.h:
> 
> 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
> 
> Is this expected? The header file is there:
> 
> postgres@pgbox:/home/postgres/ [DEV] sudo find / -name numa.h
> /usr/include/numa.h
> 
> This is a Fedora 41 system.
> 

That's weird. I'm on Fedora 41 too, and I don't have this issue. If I do

    $ meson setup build

I get

    libnuma : YES 2.0.19

and then

    ninja -C build

completes just fine. What exactly are the commands you're executing?


FWIW I guess -hackers would be a better place for this question.


regards

-- 
Tomas Vondra







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

* Re: Meson and Numa: C header not found
@ 2025-04-10 09:53  Daniel Westermann (DWE) <[email protected]>
  parent: Tomas Vondra <[email protected]>
  1 sibling, 1 reply; 8+ messages in thread

From: Daniel Westermann (DWE) @ 2025-04-10 09:53 UTC (permalink / raw)
  To: Tomas Vondra <[email protected]>; [email protected] <[email protected]>

>
>   ninja -C build
>
>completes just fine. What exactly are the commands you're executing?
>
>
>FWIW I guess -hackers would be a better place for this question.

Nothing special, just this:

meson configure -Dprefix=${PGHOME} \
                -Dbindir=${PGHOME}/bin \
                -Ddatadir=${PGHOME}/share \
                -Dincludedir=${PGHOME}/include \
                -Dlibdir=${PGHOME}/lib \
                -Dsysconfdir=${PGHOME}/etc \
                -Dpgport=5432 \
                -Dplperl=enabled \
                -Dplpython=enabled \
                -Dssl=openssl \
                -Dpam=enabled \
                -Dldap=enabled \
                -Dlibxml=enabled \
                -Dlibxslt=enabled \
                -Dsegsize=${SEGSIZE} \
                -Dblocksize=${BLOCKSIZE} \
                -Dllvm=enabled \
                -Duuid=ossp \
                -Dzstd=enabled \
                -Dlz4=enabled \
                -Dzstd=enabled \
                -Dgssapi=enabled \
                -Dsystemd=enabled \
                -Dicu=enabled \
                -Dlibcurl=enabled \
                -Dliburing=enabled \
                -Dlibnuma=disabled \
                -Dsystem_tzdata=/usr/share/zoneinfo
ninja 
ninja install

Regards
Daniel







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

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

From: Tomas Vondra @ 2025-04-10 10:07 UTC (permalink / raw)
  To: Daniel Westermann (DWE) <[email protected]>; [email protected] <[email protected]>



On 4/10/25 11:53, Daniel Westermann (DWE) wrote:
>>
>>    ninja -C build
>>
>> completes just fine. What exactly are the commands you're executing?
>>
>>
>> FWIW I guess -hackers would be a better place for this question.
> 
> Nothing special, just this:
> 
> meson configure -Dprefix=${PGHOME} \
>                 -Dbindir=${PGHOME}/bin \
>                 -Ddatadir=${PGHOME}/share \
>                 -Dincludedir=${PGHOME}/include \
>                 -Dlibdir=${PGHOME}/lib \
>                 -Dsysconfdir=${PGHOME}/etc \
>                 -Dpgport=5432 \
>                 -Dplperl=enabled \
>                 -Dplpython=enabled \
>                 -Dssl=openssl \
>                 -Dpam=enabled \
>                 -Dldap=enabled \
>                 -Dlibxml=enabled \
>                 -Dlibxslt=enabled \
>                 -Dsegsize=${SEGSIZE} \
>                 -Dblocksize=${BLOCKSIZE} \
>                 -Dllvm=enabled \
>                 -Duuid=ossp \
>                 -Dzstd=enabled \
>                 -Dlz4=enabled \
>                 -Dzstd=enabled \
>                 -Dgssapi=enabled \
>                 -Dsystemd=enabled \
>                 -Dicu=enabled \
>                 -Dlibcurl=enabled \
>                 -Dliburing=enabled \
>                 -Dlibnuma=disabled \
>                 -Dsystem_tzdata=/usr/share/zoneinfo
> ninja 
> ninja install
> 

Are you sure this is the sequence that fails? Because this has

 -Dlibnuma=disabled

so that shouldn't build the NUMA stuff at all.

regards

-- 
Tomas Vondra







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

* Re: Meson and Numa: C header not found
@ 2025-04-10 14:33  Tom Lane <[email protected]>
  parent: Tomas Vondra <[email protected]>
  1 sibling, 1 reply; 8+ messages in thread

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

Tomas Vondra <[email protected]> writes:
> On 4/10/25 08:00, Daniel Westermann (DWE) wrote:
>> I wanted to play a bit with the Numa stuff recently committed but Meson fails to find numa.h:
>> 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

> That's weird. I'm on Fedora 41 too, and I don't have this issue. If I do

I couldn't reproduce it on F41 either.  Note that you need to
have numactl-devel installed else /usr/include/numa.h isn't
there; but meson seems to fail as-expected without that,
or silently fall back to libnuma=disabled if you don't try to
force it.

			regards, tom lane






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

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

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

>Tomas Vondra <[email protected]> writes:
>> On 4/10/25 08:00, Daniel Westermann (DWE) wrote:
>>> I wanted to play a bit with the Numa stuff recently committed but Meson fails to find numa.h:
>>> 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

>> That's weird. I'm on Fedora 41 too, and I don't have this issue. If I do

>I couldn't reproduce it on F41 either.  Note that you need to
>have numactl-devel installed else /usr/include/numa.h isn't
>there; but meson seems to fail as-expected without that,
>or silently fall back to libnuma=disabled if you don't try to
force it.
>
  
It is there:

postgres@pgbox:/home/postgres/ [DEV] ls /usr/include/numa.h
/usr/include/numa.h

Regards
Daniel






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

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

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

"Daniel Westermann (DWE)" <[email protected]> writes:
> Tomas Vondra <[email protected]> writes:
>> On 4/10/25 08:00, Daniel Westermann (DWE) wrote:
>>> ../postgresql/meson.build:957:12: ERROR: C header 'numa.h' not found

> It is there:

> postgres@pgbox:/home/postgres/ [DEV] ls /usr/include/numa.h
> /usr/include/numa.h

Just to confirm, do you have all of these in /usr/lib64?

$ ls -l /usr/lib64/libnuma*
lrwxrwxrwx. 1 root root    16 Nov  4 19:00 /usr/lib64/libnuma.so -> libnuma.so.1.0.0
lrwxrwxrwx. 1 root root    16 Nov  4 19:00 /usr/lib64/libnuma.so.1 -> libnuma.so.1.0.0
-rwxr-xr-x. 1 root root 62424 Nov  4 19:00 /usr/lib64/libnuma.so.1.0.0

As of HEAD, line 957 of meson.build is

  if not cc.has_header('numa.h', dependencies: libnuma, required: libnumaopt)

I'm not familiar at all with meson, but I wonder exactly what the
dependencies: bit does.  That kind of looks like it might cause the
check to fail if the libnuma library isn't there, which is something
we do need to check, but doing it this way seems like it'd produce
a pretty misleading failure message if numa.h exists but the library
doesn't.

			regards, tom lane






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

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

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

>Just to confirm, do you have all of these in /usr/lib64?

>$ ls -l /usr/lib64/libnuma*
>lrwxrwxrwx. 1 root root    16 Nov  4 19:00 /usr/lib64/libnuma.so -> libnuma.so.1.0.0
>lrwxrwxrwx. 1 root root    16 Nov  4 19:00 /usr/lib64/libnuma.so.1 -> libnuma.so.1.0.0
>-rwxr-xr-x. 1 root root 62424 Nov  4 19:00 /usr/lib64/libnuma.so.1.0.0

>As of HEAD, line 957 of meson.build is

>  if not cc.has_header('numa.h', dependencies: libnuma, required: libnumaopt)

postgres@pgbox:/home/postgres/ [DEV] ls -l /usr/lib64/libnuma*
lrwxrwxrwx. 1 root root    16 Nov  5 01:00 /usr/lib64/libnuma.so -> libnuma.so.1.0.0
lrwxrwxrwx. 1 root root    16 Nov  5 01:00 /usr/lib64/libnuma.so.1 -> libnuma.so.1.0.0
-rwxr-xr-x. 1 root root 62424 Nov  5 01:00 /usr/lib64/libnuma.so.1.0.0
18:25:38 postgres@pgbox:/home/postgres/ [DEV]

Yes, it it there

Regards
Daniel



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

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

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

"Daniel Westermann (DWE)" <[email protected]> writes:
>> Just to confirm, do you have all of these in /usr/lib64?

> Yes, it it there

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
files.  restorecon might help if so.

			regards, tom lane






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


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

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10 09:22 Re: Meson and Numa: C header not found Tomas Vondra <[email protected]>
2025-04-10 09:53 ` Daniel Westermann (DWE) <[email protected]>
2025-04-10 10:07   ` Tomas Vondra <[email protected]>
2025-04-10 14:33 ` Tom Lane <[email protected]>
2025-04-10 15:48   ` Daniel Westermann (DWE) <[email protected]>
2025-04-10 16:10     ` Tom Lane <[email protected]>
2025-04-10 16:26       ` Daniel Westermann (DWE) <[email protected]>
2025-04-10 16:39         ` 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