Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation fails on openbsd-current due to safemalloc.h (va_list) #231

Closed
rwp0 opened this issue Sep 23, 2020 · 5 comments · Fixed by #232
Closed

compilation fails on openbsd-current due to safemalloc.h (va_list) #231

rwp0 opened this issue Sep 23, 2020 · 5 comments · Fixed by #232
Labels
type:bug Something's broken!

Comments

@rwp0
Copy link

rwp0 commented Sep 23, 2020

compiling release 1.0.0 (tarball) and master (clone) on openbsd-current with gmake from devel/gmake port results in:

gmake  all-recursive
gmake[1]: Entering directory 'fvwm3-1.0.0'
Making all in default-config

gmake[2]: Entering directory 'fvwm3-1.0.0/default-config'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory 'fvwm3-1.0.0/default-config'
Making all in libs

gmake[2]: Entering directory 'fvwm3-1.0.0/libs'
  CC       gravity.o
In file included from fvwmlib.h:13,
                 from gravity.c:23:
safemalloc.h:8: error: expected declaration specifiers or '...' before 'va_list'

gmake[2]: *** [Makefile:583: gravity.o] Error 1
gmake[2]: Leaving directory 'fvwm3-1.0.0/libs'

gmake[1]: *** [Makefile:509: all-recursive] Error 1
gmake[1]: Leaving directory 'fvwm3-1.0.0'

gmake: *** [Makefile:450: all] Error 2

file: safemalloc.h: va_list

is openbsd supported with fvwm3?

nb. running autogen.sh was required for installing scripts (eg. install-sh) into ./etc/ for building of release tarball

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the type:bug Something's broken! label Sep 23, 2020
@rwp0 rwp0 changed the title cannot compile on openbsd compilation fails on openbsd-current due to safemalloc.h (va_list) Sep 23, 2020
@ThomasAdam
Copy link
Member

ThomasAdam commented Sep 23, 2020

safemalloc.h:8: error: expected declaration specifiers or '...' before 'va_list'

Try this:

diff --git a/libs/safemalloc.h b/libs/safemalloc.h
index 69ac08221..b05ea3cde 100644
--- a/libs/safemalloc.h
+++ b/libs/safemalloc.h
@@ -1,5 +1,8 @@
 #ifndef _SAFEMALLOC_H
 #define _SAFEMALLOC_H
+
+#include <stdarg.h>
+
 void   *fxmalloc(size_t);
 void   *fxcalloc(size_t, size_t);
 void   *fxrealloc(void *, size_t, size_t);

is openbsd supported with fvwm3?

Ask the ports maintainer(s), but I'll certainly make every effort.

nb. running [autogen.sh](https://github.com/fvwmorg/fvwm3/blob/master/dev-docs/INSTALL.md) was required for installing scripts (eg. install-sh) into ./etc/ for building of release tarball

Then you didn't download the correct tarball? Because I certainly didn't need to do that, and the release tarballs assume as such. This is what's linked from the release notes:

https://github.com/fvwmorg/fvwm3/releases/download/1.0.0/fvwm3-1.0.0.tar.gz

./configure && make && doas make install

@rwp0
Copy link
Author

rwp0 commented Sep 23, 2020

@ThomasAdam thanks

now, compiling release tarball:

Making all in FvwmMFL
gmake[3]: Entering directory 'fvwm3-1.0.0/modules/FvwmMFL'
  CC       FvwmMFL.o
FvwmMFL.c:30:23: error: bson/bson.h: No such file or directory
FvwmMFL.c:32:26: error: event2/event.h: No such file or directory
FvwmMFL.c:36:33: error: event2/event_struct.h: No such file or directory
FvwmMFL.c:37:27: error: event2/buffer.h: No such file or directory
FvwmMFL.c:38:32: error: event2/bufferevent.h: No such file or directory
FvwmMFL.c:39:39: error: event2/bufferevent_compat.h: No such file or directory
FvwmMFL.c:40:29: error: event2/listener.h: No such file or directory
FvwmMFL.c:41:25: error: event2/util.h: No such file or directory
FvwmMFL.c:70: error: expected specifier-qualifier-list before 'bson_t'
FvwmMFL.c:107: warning: 'struct event_base' declared inside parameter list
FvwmMFL.c:107: warning: its scope is only this definition or declaration, which is probably not what you want
FvwmMFL.c: In function 'fvwm_msg_free':
FvwmMFL.c:130: warning: implicit declaration of function 'bson_destroy'
FvwmMFL.c:130: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c: At top level:
FvwmMFL.c:143: warning: 'struct event_base' declared inside parameter list
FvwmMFL.c:144: error: conflicting types for 'setup_signal_handlers'
FvwmMFL.c:107: error: previous declaration of 'setup_signal_handlers' was here
FvwmMFL.c: In function 'setup_signal_handlers':
FvwmMFL.c:148: warning: implicit declaration of function 'evsignal_new'
FvwmMFL.c:148: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:149: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:150: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:151: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:152: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:153: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:155: warning: implicit declaration of function 'evsignal_add'
FvwmMFL.c: In function 'send_version_info':
FvwmMFL.c:171: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:171: warning: implicit declaration of function 'BCON_NEW'
FvwmMFL.c:173: warning: implicit declaration of function 'BCON_UTF8'
FvwmMFL.c:177: warning: implicit declaration of function 'bson_as_relaxed_extended_json'
FvwmMFL.c:177: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:177: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:188: warning: implicit declaration of function 'bufferevent_write'
FvwmMFL.c:189: warning: implicit declaration of function 'bufferevent_flush'
FvwmMFL.c:189: error: 'EV_WRITE' undeclared (first use in this function)
FvwmMFL.c:189: error: (Each undeclared identifier is reported only once
FvwmMFL.c:189: error: for each function it appears in.)
FvwmMFL.c:189: error: 'BEV_NORMAL' undeclared (first use in this function)
FvwmMFL.c: In function 'handle_packet':
FvwmMFL.c:216: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:226: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:229: warning: implicit declaration of function 'BCON_INT64'
FvwmMFL.c:265: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:273: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:292: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:302: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:305: warning: implicit declaration of function 'BCON_INT32'
FvwmMFL.c:311: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:332: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:344: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c: In function 'broadcast_to_client':
FvwmMFL.c:516: error: 'struct fvwm_msg' has no member named 'msg'
FvwmMFL.c:516: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:529: error: 'EV_WRITE' undeclared (first use in this function)
FvwmMFL.c:529: error: 'BEV_NORMAL' undeclared (first use in this function)
FvwmMFL.c: In function 'client_read_cb':
FvwmMFL.c:538: warning: implicit declaration of function 'bufferevent_get_input'
FvwmMFL.c:538: warning: initialization makes pointer from integer without a cast
FvwmMFL.c:540: warning: implicit declaration of function 'evbuffer_get_length'
FvwmMFL.c:543: warning: implicit declaration of function 'evbuffer_remove'
FvwmMFL.c:558: error: 'struct fvwm_msg' has no member named 'fw'
FvwmMFL.c: In function 'client_err_cb':
FvwmMFL.c:577: error: 'BEV_EVENT_EOF' undeclared (first use in this function)
FvwmMFL.c:577: error: 'BEV_EVENT_ERROR' undeclared (first use in this function)
FvwmMFL.c:581: warning: implicit declaration of function 'bufferevent_free'
FvwmMFL.c: At top level:
FvwmMFL.c:589: error: expected declaration specifiers or '...' before 'evutil_socket_t'
FvwmMFL.c:590: warning: 'struct evconnlistener' declared inside parameter list
FvwmMFL.c: In function 'accept_conn_cb':
FvwmMFL.c:594: warning: implicit declaration of function 'evconnlistener_get_base'
FvwmMFL.c:594: warning: initialization makes pointer from integer without a cast
FvwmMFL.c:598: warning: implicit declaration of function 'bufferevent_socket_new'
FvwmMFL.c:598: error: 'fd' undeclared (first use in this function)
FvwmMFL.c:598: error: 'BEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
FvwmMFL.c:598: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:603: warning: implicit declaration of function 'bufferevent_setcb'
FvwmMFL.c:605: warning: implicit declaration of function 'bufferevent_enable'
FvwmMFL.c:605: error: 'EV_READ' undeclared (first use in this function)
FvwmMFL.c:605: error: 'EV_WRITE' undeclared (first use in this function)
FvwmMFL.c:605: error: 'EV_PERSIST' undeclared (first use in this function)
FvwmMFL.c: At top level:
FvwmMFL.c:612: warning: 'struct evconnlistener' declared inside parameter list
FvwmMFL.c: In function 'accept_error_cb':
FvwmMFL.c:614: warning: initialization makes pointer from integer without a cast
FvwmMFL.c:615: warning: implicit declaration of function 'EVUTIL_SOCKET_ERROR'
FvwmMFL.c:617: warning: implicit declaration of function 'evutil_socket_error_to_string'
FvwmMFL.c:617: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
FvwmMFL.c:619: warning: implicit declaration of function 'event_base_loopexit'
FvwmMFL.c: In function 'main':
FvwmMFL.c:651: warning: implicit declaration of function 'event_base_new'
FvwmMFL.c:651: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:655: warning: passing argument 1 of 'setup_signal_handlers' from incompatible pointer type
FvwmMFL.c:662: warning: implicit declaration of function 'evconnlistener_new_bind'
FvwmMFL.c:663: error: 'LEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
FvwmMFL.c:664: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:669: warning: implicit declaration of function 'evconnlistener_set_error_cb'
FvwmMFL.c:675: warning: implicit declaration of function 'evutil_make_socket_nonblocking'
FvwmMFL.c:680: warning: implicit declaration of function 'event_new'
FvwmMFL.c:680: error: 'EV_READ' undeclared (first use in this function)
FvwmMFL.c:680: error: 'EV_PERSIST' undeclared (first use in this function)
FvwmMFL.c:680: warning: assignment makes pointer from integer without a cast
FvwmMFL.c:681: warning: implicit declaration of function 'event_add'
FvwmMFL.c:687: warning: implicit declaration of function 'event_base_dispatch'
gmake[3]: *** [Makefile:526: FvwmMFL.o] Error 1
gmake[3]: Leaving directory 'fvwm3-1.0.0/modules/FvwmMFL'
gmake[2]: *** [Makefile:450: all-recursive] Error 1
gmake[2]: Leaving directory 'fvwm3-1.0.0/modules'
gmake[1]: *** [Makefile:510: all-recursive] Error 1
gmake[1]: Leaving directory 'fvwm3-1.0.0'
gmake: *** [Makefile:451: all] Error 2

i downloaded wrong tarball, which lacked ./configure script

i believe fvwm3 is not ported to openbsd, although x11/fvwm2 exists

@ThomasAdam
Copy link
Member

Hi @rwp0,

You're missing libbson (mongo-c-driver), which ./configure would have complained about.

@ThomasAdam
Copy link
Member

Hii @rwp0,

You're also missing libevent-2 as well.

ThomasAdam added a commit that referenced this issue Sep 23, 2020
Needed for variadic operations.

Fixes #231
ThomasAdam added a commit that referenced this issue Sep 23, 2020
Needed for variadic operations.

Fixes #231
mikeandmore pushed a commit to mikeandmore/fvwm3 that referenced this issue Nov 28, 2020
Needed for variadic operations.

Fixes fvwmorg#231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants