gnunn1 / tilix

A tiling terminal emulator for Linux using GTK+ 3
https://gnunn1.github.io/tilix-web
Mozilla Public License 2.0
5.39k stars 294 forks source link

Build of 1.8.7 fails on musl #1624

Open Cogitri opened 5 years ago

Cogitri commented 5 years ago

Hello,

since 1.8.7 Tilix fails to build:

...
rce/secretc/secrettypes.d source/x11/X.d source/x11/Xlib.d -oftilix.o
source/gx/tilix/terminal/terminal.d(2839): Error: module `core.sys.posix.stdlib` import `grantpt` not found
source/gx/tilix/terminal/terminal.d(2839): Error: module `core.sys.posix.stdlib` import `unlockpt` not found
source/gx/tilix/terminal/terminal.d(2839): Error: module `core.sys.posix.stdlib` import `ptsname` not found
make[1]: *** [Makefile:1037: tilix.o] Error 1
make[1]: Leaving directory '/builddir/tilix-1.8.7'

See https://travis-ci.org/void-linux/void-packages/jobs/475338660 for a full build log

gnunn1 commented 5 years ago

Unfortunately I am not familiar with musl since none of my container work involves alpine and I have no plans to start officially supporting or testing tilix with musl.

Having said that, the code that seems to be causing the issue was added to support flatpak, it would be possible to add a switch to compile tilix without flatpak support. I can look at adding this at some point but it's not something that would be a priority for me, happy to accept a PR for it though.

Cogitri commented 5 years ago

Alright, thanks for answering so quickly. I'll see what I can do with my (very) limited D knowledge :)

gnunn1 commented 5 years ago

You can try asking on the dlang forums, I know there was some work done around musl previously and the D guys are pretty friendly and helpful.

https://forum.dlang.org/group/general

Cogitri commented 5 years ago

Yeah. 1.8.5 worked just fine, so I guess this should be easy to fix :)

Cogitri commented 5 years ago

Alright, as can be seen here https://github.com/dlang/druntime/blob/a59c3832fc00ab127018d9a570ba03520437524f/src/core/sys/posix/stdlib.d#L298

It seems like grantpt can't be used on musl. I'll just try to patch it back to 1.8.5 behavior for musl for our purposes.

Cogitri commented 5 years ago

We've patched it locally for now, we'll just keep that patch downstream. Would be great if you could fix it properly somewhere down the line though!