Thread
-
Meson and Numa: C header not found
Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> — 2025-04-10T06:00:28Z
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. Regards Daniel
-
Re: Meson and Numa: C header not found
Tomas Vondra <tomas@vondra.me> — 2025-04-10T09:22:29Z
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 -
Re: Meson and Numa: C header not found
Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> — 2025-04-10T09:53:06Z
> > 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 -
Re: Meson and Numa: C header not found
Tomas Vondra <tomas@vondra.me> — 2025-04-10T10:07:45Z
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 -
Re: Meson and Numa: C header not found
Tom Lane <tgl@sss.pgh.pa.us> — 2025-04-10T14:33:15Z
Tomas Vondra <tomas@vondra.me> 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
-
Re: Meson and Numa: C header not found
Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> — 2025-04-10T15:48:40Z
>Tomas Vondra <tomas@vondra.me> 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
-
Re: Meson and Numa: C header not found
Tom Lane <tgl@sss.pgh.pa.us> — 2025-04-10T16:10:20Z
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes: > Tomas Vondra <tomas@vondra.me> 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 -
Re: Meson and Numa: C header not found
Daniel Westermann (DWE) <daniel.westermann@dbi-services.com> — 2025-04-10T16:26:54Z
>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 -
Re: Meson and Numa: C header not found
Tom Lane <tgl@sss.pgh.pa.us> — 2025-04-10T16:39:22Z
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> 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