revive wmmemload port
Marco Beishuizen
mbeis at xs4all.nl
Thu Aug 27 22:43:25 UTC 2015
On Thu, 27 Aug 2015, the wise Kurt Jaeger wrote:
> Hi!
>
> There's the problem.
>
> The tgz file does not unpack into a work/wmmemload-0.1.8/ directory,
> instead it unpacks into something else.
>
> Try to check this and fix it with some WRKSRC or similar variable.
Well, the good news is that I got somewhat further, the bad news is I ran
into a build problem. The makefile I now have is:
...
# $FreeBSD$
PORTNAME= wmmemload
PORTVERSION= 0.1.8
PORTREVISION= 0
CATEGORIES= sysutils windowmaker
MASTER_SITES= https://dev.gentoo.org/~voyageur/distfiles/
MAINTAINER= mbeis at xs4all.nl
COMMENT= A dockapp for windowmaker that displays the current mem/swap usage
USE_XORG= xpm
WRKSRC= ${WRKDIR}/dockapps
GNU_CONFIGURE= yes
USES= gmake
USES= autoreconf
.include <bsd.port.mk>
...
But the build stops with a lot of errors:
...
In file included from mem_freebsd.c:18:
/usr/include/vm/vm_param.h:94:2: error: unknown type name 'u_int'
u_int xsw_version;
^
/usr/include/vm/vm_param.h:95:2: error: unknown type name 'dev_t'; did you
mean 'div_t'?
dev_t xsw_dev;
^
/usr/include/stdlib.h:62:3: note: 'div_t' declared here
} div_t;
^
mem_freebsd.c:50:2: error: use of undeclared identifier 'u_int'
u_int mtotal, mwired, mcached, mfree, mused;
^
mem_freebsd.c:54:2: error: use of undeclared identifier 'u_int'
u_int new_swappgsin, new_swappgsout;
^
mem_freebsd.c:64:40: error: use of undeclared identifier 'mtotal'
GETSYSCTL("vm.stats.vm.v_page_count", mtotal);
^
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:65:40: error: use of undeclared identifier 'mwired'
GETSYSCTL("vm.stats.vm.v_wire_count", mwired);
^
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:66:41: error: use of undeclared identifier 'mcached'
GETSYSCTL("vm.stats.vm.v_cache_count", mcached);
^
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:67:40: error: use of undeclared identifier 'mfree'; did you
mean 'free'?
GETSYSCTL("vm.stats.vm.v_free_count", mfree);
^~~~~
free
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
/usr/include/stdlib.h:93:7: note: 'free' declared here
void free(void *);
^
mem_freebsd.c:67:40: error: use of undeclared identifier 'mfree'; did you
mean 'free'?
GETSYSCTL("vm.stats.vm.v_free_count", mfree);
^~~~~
free
mem_freebsd.c:29:61: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
/usr/include/stdlib.h:93:7: note: 'free' declared here
void free(void *);
^
mem_freebsd.c:78:39: error: use of undeclared identifier 'new_swappgsin';
did you mean 'swappgsin'?
GETSYSCTL("vm.stats.vm.v_swappgsin", new_swappgsin);
^~~~~~~~~~~~~
swappgsin
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:56:13: note: 'swappgsin' declared here
static int swappgsin = -1;
^
mem_freebsd.c:78:39: error: use of undeclared identifier 'new_swappgsin';
did you mean 'swappgsin'?
GETSYSCTL("vm.stats.vm.v_swappgsin", new_swappgsin);
^~~~~~~~~~~~~
swappgsin
mem_freebsd.c:29:61: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:56:13: note: 'swappgsin' declared here
static int swappgsin = -1;
^
mem_freebsd.c:79:40: error: use of undeclared identifier 'new_swappgsout';
did you mean 'swappgsout'?
GETSYSCTL("vm.stats.vm.v_swappgsout", new_swappgsout);
^~~~~~~~~~~~~~
swappgsout
mem_freebsd.c:29:48: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:57:13: note: 'swappgsout' declared here
static int swappgsout = -1;
^
mem_freebsd.c:79:40: error: use of undeclared identifier 'new_swappgsout';
did you mean 'swappgsout'?
GETSYSCTL("vm.stats.vm.v_swappgsout", new_swappgsout);
^~~~~~~~~~~~~~
swappgsout
mem_freebsd.c:29:61: note: expanded from macro 'GETSYSCTL'
#define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
^
mem_freebsd.c:57:13: note: 'swappgsout' declared here
static int swappgsout = -1;
^
mem_freebsd.c:82:9: error: use of undeclared identifier 'new_swappgsin';
did you mean 'swappgsin'?
(((new_swappgsin > swappgsin) || (new_swappgsout >
swappgsout))
^~~~~~~~~~~~~
swappgsin
mem_freebsd.c:56:13: note: 'swappgsin' declared here
static int swappgsin = -1;
^
mem_freebsd.c:82:23: warning: self-comparison always evaluates to false
[-Wtautological-compare]
(((new_swappgsin > swappgsin) || (new_swappgsout >
swappgsout))
^
mem_freebsd.c:82:40: error: use of undeclared identifier 'new_swappgsout';
did you mean 'swappgsout'?
(((new_swappgsin > swappgsin) || (new_swappgsout >
swappgsout))
^~~~~~~~~~~~~~
swappgsout
mem_freebsd.c:57:13: note: 'swappgsout' declared here
static int swappgsout = -1;
^
mem_freebsd.c:82:55: warning: self-comparison always evaluates to false
[-Wtautological-compare]
(((new_swappgsin > swappgsin) || (new_swappgsout >
swappgsout))
^
mem_freebsd.c:114:14: error: use of undeclared identifier 'new_swappgsin';
did you mean 'swappgsin'?
swappgsin = new_swappgsin;
^~~~~~~~~~~~~
swappgsin
mem_freebsd.c:56:13: note: 'swappgsin' declared here
static int swappgsin = -1;
^
mem_freebsd.c:115:15: error: use of undeclared identifier
'new_swappgsout'; did you mean 'swappgsout'?
swappgsout = new_swappgsout;
^~~~~~~~~~~~~~
swappgsout
mem_freebsd.c:57:13: note: 'swappgsout' declared here
static int swappgsout = -1;
^
mem_freebsd.c:127:2: error: use of undeclared identifier 'mused'
mused = mtotal - mfree;
^
mem_freebsd.c:127:10: error: use of undeclared identifier 'mtotal'
mused = mtotal - mfree;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
...
Is wmmemload still portable?
Regards,
Marco
More information about the freebsd-ports
mailing list