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

i3 doesn't compile on musl #1859

Closed
nmeum opened this issue Aug 24, 2015 · 6 comments
Closed

i3 doesn't compile on musl #1859

nmeum opened this issue Aug 24, 2015 · 6 comments
Labels
missing-log Read the CONTRIBUTING.md file for instructions missing-version

Comments

@nmeum
Copy link

nmeum commented Aug 24, 2015

i3 currently doesn't compile on a musl libc system. The only function that seem to cause troubles is the resolve_tilde function from libi3/resolve_tilde.c. This function uses GLOB_TILDE which is a GNUism and (probably) only available in glibc.

This is the output of make on the next branch:

[libi3] CC libi3/ipc_recv_message.c
[libi3] CC libi3/get_visualtype.c
[libi3] CC libi3/mkdirp.c
[libi3] CC libi3/ipc_send_message.c
[libi3] CC libi3/fake_configure_notify.c
[libi3] CC libi3/strndup.c
[libi3] CC libi3/get_colorpixel.c
[libi3] CC libi3/resolve_tilde.c
[libi3] CC libi3/get_exe_path.c
[libi3] CC libi3/font.c
[libi3] CC libi3/dpi.c
libi3/resolve_tilde.c: In function 'resolve_tilde':
[libi3] CC libi3/ucs2_conversion.c
libi3/resolve_tilde.c:28:26: error: 'GLOB_TILDE' undeclared (first use in this function)
     int res = glob(head, GLOB_TILDE, NULL, &globbuf);
                          ^
libi3/resolve_tilde.c:28:26: note: each undeclared identifier is reported only once for each function it appears in
libi3/libi3.mk:12: recipe for target 'libi3/resolve_tilde.o' failed
make: *** [libi3/resolve_tilde.o] Error 1
make: *** Waiting for unfinished jobs....
@i3bot
Copy link

i3bot commented Aug 24, 2015

I don’t see a link to logs.i3wm.org. Did you follow http://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot
Copy link

i3bot commented Aug 24, 2015

I don’t see a version number. Could you please copy & paste the output of i3 --version into this issue?

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions missing-version labels Aug 24, 2015
@stapelberg
Copy link
Member

GLOB_TILDE is not a GNU-ism, it’s also available on FreeBSD, NetBSD and other systems.

Please send a pull request if you care about getting this fixed.

@Airblader
Copy link
Member

I don't think there's any value in keeping a ticket open for this. As Michael pointed out, if you want this to be fixed, send a pull request.

@lukaslozovski
Copy link

I got this to compile and run for i3status 2.13 on alpine 3.10 by adding
#define GLOB_TILDE GLOB_PERIOD to the bottom of the config.h.in file

This is extremely hacky, but got it to compile and run. What would be the appropriate fix? I can implement it and submit a pull request.

@stapelberg
Copy link
Member

The appropriate fix would be to re-implement the current behavior without using GLOB_TILDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-log Read the CONTRIBUTING.md file for instructions missing-version
Projects
None yet
Development

No branches or pull requests

5 participants