Bug 256398 - devel/libgtop: fails to build on head after src commit 6d3e78ad6c11
Summary: devel/libgtop: fails to build on head after src commit 6d3e78ad6c11
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-03 09:27 UTC by Guido Falsi
Modified: 2021-06-06 07:58 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
fix (706 bytes, patch)
2021-06-05 13:39 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer 2021-06-03 09:27:16 UTC
As subject states, changes to sys/mount.h cause libgtop to fail on recent head.

This is __FreeBSD_version 1400018

I'm testing fixing it locally with a patch like the one in bug #253870 but that approach is not the correct one, so I'm not posting a new equivalent patch here.


OTOH I don't know which parts of mount.h libgtop is using here so I'm unable to cook a better fix right away.
Comment 1 Guido Falsi freebsd_committer 2021-06-04 22:29:14 UTC
I forgot to attach the error:

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -march=nehalem -fstack-protector-strong -fno-strict-aliasing -MT procmap.lo -MD -MP -MF .deps/procmap.Tpo -c procmap.c  -fPIC -DPIC -o .libs/procmap.o
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -march=nehalem -fstack-protector-strong -fno-strict-aliasing -MT procsegment.lo -MD -MP -MF .deps/procsegment.Tpo -c procsegment.c -o procsegment.o >/dev/null 2>&1
mv -f .deps/proctime.Tpo .deps/proctime.Plo
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -march=nehalem -fstack-protector-strong -fno-strict-aliasing -MT prockernel.lo -MD -MP -MF .deps/prockernel.Tpo -c prockernel.c -o prockernel.o >/dev/null 2>&1
/bin/sh ../../libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include   -I/usr/local/include -I/usr/local/include  -Winline 	-Wall 	-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes 	-Wnested-externs -Wpointer-arith 	-Wcast-align -Wsign-compare 	-O2 -pipe -march=nehalem  -fstack-protector-strong -fno-strict-aliasing  -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c -o netload.lo netload.c
In file included from procmap.c:52:
/usr/include/sys/mount.h:764:7: error: unknown type name 'bool'
                    bool *mp_busy);
                    ^
In file included from procmap.c:53:
/usr/include/ufs/ufs/quota.h:235:59: error: unknown type name 'bool'
int     quotaon(struct thread *, struct mount *, int, void *, bool *);
                                                              ^
procmap.c:100:25: warning: unused variable 'um' [-Wunused-variable]
        struct ufsmount um;
                        ^
procmap.c:404:16: warning: cast from 'gchar *' (aka 'char *') to 'glibtop_map_entry *' (aka 'struct _glibtop_map_entry *') increases required alignment from 1 to 8 [-Wcast-align]
        return (glibtop_map_entry*) g_array_free(maps, FALSE);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
Comment 2 Guido Falsi freebsd_committer 2021-06-05 13:39:43 UTC
Created attachment 225571 [details]
fix

Attaching patch I am running.

Tested it in poudriere for 11.x 12.2 and 13.0 and it compiles successfully on all. Works fine with head.

It requires review and testing by some third party at least.
Comment 3 Guido Falsi freebsd_committer 2021-06-06 07:51:28 UTC
Fixed using different approach in base 15e9a4872eb2
Comment 4 Guido Falsi freebsd_committer 2021-06-06 07:58:14 UTC
(In reply to Guido Falsi from comment #3)

Ops wrong reference in previous comment I meant ports 15e9a4872eb2