Created attachment 222263 [details] Diff file WMScript is a system monitoring dock app for Window Maker. It allows you to specify a command and have the numeric result of that command displayed in the dock app's window. You may specify up to 5 things to monitor and the interval is configurable.
Hi Igor, Thanks for the patch of this interesting port! I tried to build it on Poudriere and got the following errors: ===> Building for wmscript-1.0 gmake[1]: Entering directory '/wrkdirs/usr/ports/sysutils/wmscript/work/wmscript.app/wmscript' cc -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -c -Wall wmscript.c -o wmscript.o wmscript.c:533:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf (stderr, buff); ^~~~ wmscript.c:533:22: note: treat the string as an argument to avoid this fprintf (stderr, buff); ^ "%s", wmscript.c:543:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf (stderr, buff); ^~~~ wmscript.c:543:22: note: treat the string as an argument to avoid this fprintf (stderr, buff); ^ "%s", 2 warnings generated. cc -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -c -Wall ../wmgeneral/wmgeneral.c -o ../wmgeneral/wmgeneral.o cc -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -c -Wall ../wmgeneral/misc.c -o ../wmgeneral/misc.o In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:43:27: warning: inline function 'list_cons' is not defined [-Wundefined-inline] extern INLINE LinkedList* list_cons(void* head, LinkedList* tail); ^ ../wmgeneral/misc.c:122:13: note: used here list = list_cons(token, list); ^ In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:45:19: warning: inline function 'list_length' is not defined [-Wundefined-inline] extern INLINE int list_length(LinkedList* list); ^ ../wmgeneral/misc.c:126:13: note: used here count = list_length(list); ^ In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:49:20: warning: inline function 'list_remove_head' is not defined [-Wundefined-inline] extern INLINE void list_remove_head(LinkedList** list); ^ ../wmgeneral/misc.c:131:2: note: used here list_remove_head(&list); ^ 3 warnings generated. cc -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -c -Wall ../wmgeneral/list.c -o ../wmgeneral/list.o cc -o wmscript wmscript.o ../wmgeneral/wmgeneral.o ../wmgeneral/misc.o ../wmgeneral/list.o -lXext -L/usr/local/lib -lXpm -lXext -lX11 ld: error: duplicate symbol: display >>> defined at wmscript.c >>> wmscript.o:(display) >>> defined at wmgeneral.c >>> ../wmgeneral/wmgeneral.o:(.bss+0x8) cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[1]: *** [Makefile:15: wmscript] Error 1 gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/wmscript/work/wmscript.app/wmscript' *** Error code 1 Stop. make: stopped in /usr/ports/sysutils/wmscript =>> Cleaning up wrkdir ===> Cleaning for wmscript-1.0 build of sysutils/wmscript | wmscript-1.0 ended at Tue Feb 9 15:21:03 CET 2021 build time: 00:00:03 !!! build failure encountered !!! Could you please have a look at it? Thanks in advance :)
Created attachment 222300 [details] Diff file Hi Rainer, It is strange, I'm not getting such error on my -STABLE system. Hopefully I have fixed this problem. Please try the next patch.
Hi Igor, Thanks for the quick fix. I can confirm, that it builds now within and outside of Poudriere :) There are a few warnings, but they all seem harmless: In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:43:27: warning: inline function 'list_cons' is not defined [-Wundefined-inline] extern INLINE LinkedList* list_cons(void* head, LinkedList* tail); ^ ../wmgeneral/misc.c:122:13: note: used here list = list_cons(token, list); ^ In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:45:19: warning: inline function 'list_length' is not defined [-Wundefined-inline] extern INLINE int list_length(LinkedList* list); ^ ../wmgeneral/misc.c:126:13: note: used here count = list_length(list); ^ In file included from ../wmgeneral/misc.c:24: ../wmgeneral/list.h:49:20: warning: inline function 'list_remove_head' is not defined [-Wundefined-inline] extern INLINE void list_remove_head(LinkedList** list); ^ ../wmgeneral/misc.c:131:2: note: used here list_remove_head(&list); ^ wmscript.c:533:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf (stderr, buff); ^~~~ wmscript.c:533:22: note: treat the string as an argument to avoid this fprintf (stderr, buff); ^ "%s", wmscript.c:543:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf (stderr, buff); ^~~~ wmscript.c:543:22: note: treat the string as an argument to avoid this fprintf (stderr, buff); ^ "%s", 3 warnings generated. 2 warnings generated. My next step is to prepare a review on Phabricator. Will report back ...
Just opend review D28558 on Phabricator, waiting on mentors approval now ;)
Hi Rainer, I agree, they seem harmless. That's why I have not fixed them. Moreover, I afraid I will rewrite large part of the program once I will dig into it :) And I guess there is no reason to do so, since it just works. Thank you!
A commit references this bug: Author: rhurlin Date: Wed Feb 10 17:04:20 UTC 2021 New revision: 564878 URL: https://svnweb.freebsd.org/changeset/ports/564878 Log: New port: sysutils/wmscript: System monitoring dockapp for Window Maker WMScript allows to specify a command and have the numeric result of that command displayed in the dock app's window. Up to 5 things to monitor, the interval is configurable. See http://freshmeat.sourceforge.net/projects/wmscript for details. PR: 253346 Submitted by: Igor Pokrovsky <ip@unixway.org> (maintainer) Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D28558 Changes: head/sysutils/Makefile head/sysutils/wmscript/ head/sysutils/wmscript/Makefile head/sysutils/wmscript/distinfo head/sysutils/wmscript/files/ head/sysutils/wmscript/files/patch-wmgeneral_list.h head/sysutils/wmscript/files/patch-wmgeneral_wmgeneral.c head/sysutils/wmscript/files/patch-wmgeneral_wmgeneral.h head/sysutils/wmscript/files/patch-wmscript_Makefile head/sysutils/wmscript/files/patch-wmscript_wmscript.c head/sysutils/wmscript/pkg-descr head/sysutils/wmscript/pkg-plist
Committed, thanks :)
Thanks, Rainer!