kuravih / gllock

not so simple opengl based X display locker utility
Other
197 stars 9 forks source link

make error #15

Open manjaroblack opened 5 years ago

manjaroblack commented 5 years ago
gllock build options:
CFLAGS   = -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="0.1-alpha" -DHAVE_SHADOW_H -DSHADER_LOCATION="/root/.gllock" -DFRGMNT_SHADER="circle.fragment.glsl"
LDFLAGS  = -s -L/usr/lib -lc -lcrypt -L/usr/X11R6/lib -lX11 -lGL -lGLEW -lpthread
CC       = cc
CC gllock.c
gllock.c: In function ‘readpw’:
gllock.c:172:26: warning: implicit declaration of function ‘crypt’ [-Wimplicit-function-declaration]
  172 |         running = strcmp(crypt(passwd, pws), pws);
      |                          ^~~~~
gllock.c:172:26: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  172 |         running = strcmp(crypt(passwd, pws), pws);
      |                          ^~~~~~~~~~~~~~~~~~
      |                          |
      |                          int
In file included from gllock.c:15:
/usr/include/string.h:136:32: note: expected ‘const char *’ but argument is of type ‘int’
  136 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
CC common.c
CC -o gllock
installing executable file to /usr/local/bin
ln: failed to create symbolic link '/root/.gllock': File exists
make: *** [Makefile:45: install] Error 1
mytalala commented 5 years ago

symlink already exist ln: failed to create symbolic link '/root/.gllock': File exists run sudo rm /root/.gllock

manjaroblack commented 5 years ago

After removing the file:

╰─>$ sudo make clean install
cleaning
gllock build options:
CFLAGS   = -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="0.1-alpha" -DHAVE_SHADOW_H -DSHADER_LOCATION="/root/.gllock" -DFRGMNT_SHADER="circle.fragment.glsl"
LDFLAGS  = -s -L/usr/lib -lc -lcrypt -L/usr/X11R6/lib -lX11 -lGL -lGLEW -lpthread
CC       = cc
CC gllock.c
gllock.c: In function ‘readpw’:
gllock.c:172:26: warning: implicit declaration of function ‘crypt’ [-Wimplicit-function-declaration]
  172 |         running = strcmp(crypt(passwd, pws), pws);
      |                          ^~~~~
gllock.c:172:26: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  172 |         running = strcmp(crypt(passwd, pws), pws);
      |                          ^~~~~~~~~~~~~~~~~~
      |                          |
      |                          int
In file included from gllock.c:15:
/usr/include/string.h:136:32: note: expected ‘const char *’ but argument is of type ‘int’
  136 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
CC common.c
CC -o gllock
installing executable file to /usr/local/bin
manjaroblack commented 5 years ago

It was working without issue before I updated my libraries and systemd and some other things. After that, it didn't work at all. I am not sure exactly what broke gllock. I rebuilt gllock and it works again minus the crypt function. Pressing enter unlocks my computer with or without any additional characters.