Build fails on OpenBSD (generic_files/profiler.c)

20 views
Skip to first unread message

Oliver Krüger

unread,
Apr 30, 2026, 2:59:09 AM (6 days ago) Apr 30
to flint-devel
Hejhej,

Building flint-3.5.0 and flint-3.4.0 (at least) fails on OpenBSD (7.8, amd64)
when compiling generic_files/profiler.c, with error

/opt/flint-3.5.0/src/generic_files/profiler.c:193:24: error: member
reference base type 'u_int64_t' (aka 'unsigned long long') is not a structure or union
  193 |     virt = kp.p_vmspace.vm_map.size;
      |            ~~~~~~~~~~~~^~~~~~~
/opt/flint-3.5.0/src/generic_files/profiler.c:194:23: error: member
reference base type 'u_int64_t' (aka 'unsigned long long') is not a structure or union
  194 |     rss = kp.p_vmspace.vm_rssize * getpagesize();
      |           ~~~~~~~~~~~~^~~~~~~~~~
2 errors generated.

This is not how kinfo_proc works op OpenBSD (defined in sys/sysctl.h). The
following patch seems to work:

193,194c193,194
<     virt = kp.p_vmspace.vm_map.size;
<     rss = kp.p_vmspace.vm_rssize * getpagesize();
---
>     virt = kp.p_vm_map_size;
>     rss = kp.p_vm_rssize * getpagesize();

ChatJippity does not seem to know how to BSD.

M.v.h.,
Oliver

Albin Ahlbäck

unread,
Apr 30, 2026, 6:40:59 AM (5 days ago) Apr 30
to flint-devel
Hi Oliver,

Thanks for raising this issue.  I'll fix it in the coming hours.

Best,
Albin

--

---
You received this message because you are subscribed to the Google Groups "flint-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flint-devel...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/flint-devel/22e8b64d-c76d-440f-8608-a76a6469f4d9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages