91861 / wayst

A simple terminal emulator
MIT License
289 stars 9 forks source link

Build fails on musl #1

Closed sdsddsd1 closed 4 years ago

sdsddsd1 commented 4 years ago

Aloha, I am on a musl based distro and the build fails with the following. Are you planning to add support?

/tmp/wayst$ ➜  make
gcc -c src/gfx_gl21.c -std=c18 -s -O3 -fomit-frame-pointer -mtune=native -ffast-math -mfpmath=sse -DVERSION=\""0.1.0"\" -Wall -Wextra -Wno-unused-parameter -Wno-address -Wno-unused-function -Werror=implicit-function-declaration -I"/usr/include/freetype2/" -o build/gfx_gl21.o
gcc -c src/main.c -std=c18 -s -O3 -fomit-frame-pointer -mtune=native -ffast-math -mfpmath=sse -DVERSION=\""0.1.0"\" -Wall -Wextra -Wno-unused-parameter -Wno-address -Wno-unused-function -Werror=implicit-function-declaration -I"/usr/include/freetype2/" -o build/main.o
gcc -c src/vt.c -std=c18 -s -O3 -fomit-frame-pointer -mtune=native -ffast-math -mfpmath=sse -DVERSION=\""0.1.0"\" -Wall -Wextra -Wno-unused-parameter -Wno-address -Wno-unused-function -Werror=implicit-function-declaration -I"/usr/include/freetype2/" -o build/vt.o
gcc -c src/wl.c -std=c18 -s -O3 -fomit-frame-pointer -mtune=native -ffast-math -mfpmath=sse -DVERSION=\""0.1.0"\" -Wall -Wextra -Wno-unused-parameter -Wno-address -Wno-unused-function -Werror=implicit-function-declaration -I"/usr/include/freetype2/" -o build/wl.o
In file included from src/wl.c:8:
src/timing.h: In function 'TimePoint_subtract':
src/timing.h:52:9: error: unknown type name '__syscall_slong_t'
   52 |         __syscall_slong_t rest = other.tv_nsec - self->tv_nsec;
      |         ^~~~~~~~~~~~~~~~~
In file included from src/vt.h:26,
                 from src/gfx.h:8,
                 from src/gfx_gl21.h:5,
                 from src/main.c:8:
src/timing.h: In function 'TimePoint_subtract':
In file included from src/vt.h:26,
                 from src/gfx.h:8,
                 from src/gfx_gl21.h:5,
                 from src/gfx_gl21.c:5:
src/timing.h: In function 'TimePoint_subtract':
src/timing.h:52:9: error: unknown type name '__syscall_slong_t'
   52 |         __syscall_slong_t rest = other.tv_nsec - self->tv_nsec;
      |         ^~~~~~~~~~~~~~~~~
src/timing.h:52:9: error: unknown type name '__syscall_slong_t'
   52 |         __syscall_slong_t rest = other.tv_nsec - self->tv_nsec;
      |         ^~~~~~~~~~~~~~~~~
In file included from src/vt.h:26,
                 from src/vt.c:5:
src/timing.h: In function 'TimePoint_subtract':
src/timing.h:52:9: error: unknown type name '__syscall_slong_t'
   52 |         __syscall_slong_t rest = other.tv_nsec - self->tv_nsec;
      |         ^~~~~~~~~~~~~~~~~
In file included from src/vt.c:17:
src/wcwidth/wcwidth.h: At top level:
src/wcwidth/wcwidth.h:6:14: error: expected ';' before 'int'
    6 | __BEGIN_DECLS
      |              ^
      |              ;
    7 |
    8 | int wcwidth(wchar_t ucs);
      | ~~~
src/wcwidth/wcwidth.h:10:1: error: unknown type name '__END_DECLS'
   10 | __END_DECLS
      | ^~~~~~~~~~~
src/vt.c:23:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'space'
   23 | VtRune space;
      |        ^~~~~
src/vt.c: In function 'Vt_new':
src/vt.c:842:30: error: 'space' undeclared (first use in this function); did you mean 'isspace'?
  842 |     self.parser.char_state = space = (VtRune) {
      |                              ^~~~~
      |                              isspace
src/vt.c:842:30: note: each undeclared identifier is reported only once for each function it appears in
src/vt.c: In function 'Vt_insert_char_at_cursor':
src/vt.c:2465:70: error: 'space' undeclared (first use in this function); did you mean 'isspace'?
 2465 |         Vector_push_VtRune(&self->lines.buf[self->active_line].data, space);
      |                                                                      ^~~~~
      |                                                                      isspace
make: *** [Makefile:61: build/vt.o] Error 1
make: *** Waiting for unfinished jobs....
src/wl.c: In function 'WindowWl_clipboard_send':
src/wl.c:175:38: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  175 |     windowWl(self)->data_source_text = text;
      |                                      ^
make: *** [Makefile:61: build/main.o] Error 1
In file included from src/gfx_gl21.c:32:
src/wcwidth/wcwidth.h: At top level:
src/wcwidth/wcwidth.h:6:14: error: expected ';' before 'int'
    6 | __BEGIN_DECLS
      |              ^
      |              ;
    7 |
    8 | int wcwidth(wchar_t ucs);
      | ~~~
src/wcwidth/wcwidth.h:10:12: error: expected ';' before 'typedef'
   10 | __END_DECLS
      |            ^
      |            ;
make: *** [Makefile:61: build/wl.o] Error 1
src/gfx_gl21.c: In function 'create_squiggle_texture':
src/gfx_gl21.c:515:32: warning: comparison of integer expressions of different signedness: 'int_fast32_t' {aka 'int'} and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare]
  515 |     for (int_fast32_t x = 0; x < w; ++x)
      |                                ^
src/gfx_gl21.c:516:36: warning: comparison of integer expressions of different signedness: 'int_fast32_t' {aka 'int'} and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare]
  516 |         for (int_fast32_t y = 0; y < h; ++y) {
      |                                    ^
make: *** [Makefile:61: build/gfx_gl21.o] Error 1
91861 commented 4 years ago

Should build now.

sdsddsd1 commented 4 years ago

It builds now. Thank you!