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

Build for musl archs #20

Closed
stacyharper opened this issue Dec 23, 2020 · 1 comment
Closed

Build for musl archs #20

stacyharper opened this issue Dec 23, 2020 · 1 comment

Comments

@stacyharper
Copy link

Hello there,

I'm trying to package wtype for VoidLinux but I'm stuck on musl builds.

2020-12-23T14:51:33.4743356Z ../main.c: In function 'get_key_code':
2020-12-23T14:51:33.4744681Z ../main.c:143:18: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
2020-12-23T14:51:33.4746032Z   143 |  wtype->keymap = reallocarray(
2020-12-23T14:51:33.4746482Z       |                  ^~~~~~~~~~~~
2020-12-23T14:51:33.4747476Z ../main.c:143:16: warning: assignment to 'wchar_t *' {aka 'int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
2020-12-23T14:51:33.4748842Z   143 |  wtype->keymap = reallocarray(
2020-12-23T14:51:33.4749277Z       |                ^
2020-12-23T14:51:33.6557793Z [7/7] Linking target wtype
2020-12-23T14:51:33.6558364Z FAILED: wtype 
2020-12-23T14:51:33.6561173Z cc  -o wtype wtype.p/main.c.o -flto -Wl,--as-needed -Wl,--no-undefined -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,--start-group protocol/libclient_protos.a /usr/lib/libwayland-client.so /usr/lib/libwayland-cursor.so -lrt /usr/lib/libxkbcommon.so -Wl,--end-group
2020-12-23T14:51:33.6564580Z /usr/bin/ld: /tmp/wtype.GbOLde.ltrans0.ltrans.o: in function `get_key_code':
2020-12-23T14:51:33.6565802Z <artificial>:(.text+0x1c0): undefined reference to `reallocarray'
2020-12-23T14:51:33.6566845Z collect2: error: ld returned 1 exit status
2020-12-23T14:51:33.6567431Z ninja: build stopped: subcommand failed.
2020-12-23T14:51:33.6580145Z => ERROR: wtype-0.3_1: do_build: '${make_cmd} -C ${meson_builddir} ${makejobs} ${make_build_args} ${make_build_target}' exited with 1
2020-12-23T14:51:33.6581335Z => ERROR:   in do_build() at common/build-style/meson.sh:122
2020-12-23T14:51:33.7040138Z ##[error]Process completed with exit code 1.

It seems that reallocarray is the source of the issue here.

Am I missing something ?

Thanks a lot !

@atx atx closed this as completed in fb8cb52 Dec 28, 2020
@atx
Copy link
Owner

atx commented Dec 28, 2020

Right --- reallocarray is not available in musl. Switched to plain realloc. Seems to build in musl Void now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants