kernc / logkeys

:memo: :keyboard: A GNU/Linux keylogger that works!
Other
748 stars 251 forks source link

Build/Installation issue #220

Closed vadorvatsal closed 3 years ago

vadorvatsal commented 3 years ago

I tried to follow install guide and after cd build; ../configure; make; su; make install it shows that please check logfile and config.log has following in the content.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by logkeys configure 0.1.1b-svn, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = 35bacad60b87
uname -m = x86_64
uname -r = 4.19.76-linuxkit
uname -s = Linux
uname -v = #1 SMP Tue May 26 11:42:35 UTC 2020

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2257: checking for a BSD-compatible install
configure:2325: result: /usr/bin/install -c
configure:2336: checking whether build environment is sane
configure:2391: result: yes
configure:2427: WARNING: 'missing' script is too old or missing
configure:2540: checking for a thread-safe mkdir -p
configure:2579: result: /bin/mkdir -p
configure:2586: checking for gawk
configure:2616: result: no
configure:2586: checking for mawk
configure:2602: found /usr/bin/mawk
configure:2613: result: mawk
configure:2624: checking whether make sets $(MAKE)
configure:2650: result: no
configure:2675: checking whether make supports nested variables
configure:2692: result: no
configure:2881: checking for g++
configure:2911: result: no
configure:2881: checking for c++
configure:2911: result: no
configure:2881: checking for gpp
configure:2911: result: no
configure:2881: checking for aCC
configure:2911: result: no
configure:2881: checking for CC
configure:2911: result: no
configure:2881: checking for cxx
configure:2911: result: no
configure:2881: checking for cc++
configure:2911: result: no
configure:2881: checking for cl.exe
configure:2911: result: no
configure:2881: checking for FCC
configure:2911: result: no
configure:2881: checking for KCC
configure:2911: result: no
configure:2881: checking for RCC
configure:2911: result: no
configure:2881: checking for xlC_r
configure:2911: result: no
configure:2881: checking for xlC
configure:2911: result: no
configure:2935: checking for C++ compiler version
configure:2944: g++ --version >&5
../configure: line 2946: g++: command not found
configure:2955: $? = 127
configure:2944: g++ -v >&5
../configure: line 2946: g++: command not found
configure:2955: $? = 127
configure:2944: g++ -V >&5
../configure: line 2946: g++: command not found
configure:2955: $? = 127
configure:2944: g++ -qversion >&5
../configure: line 2946: g++: command not found
configure:2955: $? = 127
configure:2975: checking whether the C++ compiler works
configure:2997: g++    conftest.cpp  >&5
../configure: line 2999: g++: command not found
configure:3001: $? = 127
configure:3039: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "logkeys"
| #define PACKAGE_TARNAME "logkeys"
| #define PACKAGE_VERSION "0.1.1b-svn"
| #define PACKAGE_STRING "logkeys 0.1.1b-svn"
| #define PACKAGE_BUGREPORT "kerncece+logkeys@gmail.com"
| #define PACKAGE_URL "https://github.com/kernc/logkeys/"
| #define PACKAGE "logkeys"
| #define VERSION "0.1.1b-svn"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3044: error: in `/root/logkeys/build':
configure:3046: error: C++ compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_make_make_set=no
am_cv_make_support_nested_variables=no

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='aclocal-1.16'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='1'
AM_DEFAULT_VERBOSITY='1'
AM_V='1'
AUTOCONF='autoconf'
AUTOHEADER='autoheader'
AUTOMAKE='automake-1.16'
AWK='mawk'
CPPFLAGS=''
CXX='g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FOUND_DUMPKEYS=''
FOUND_GREP=''
FOUND_PS=''
FOUND_WHICH=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT=''
PACKAGE='logkeys'
PACKAGE_BUGREPORT='kerncece+logkeys@gmail.com'
PACKAGE_NAME='logkeys'
PACKAGE_STRING='logkeys 0.1.1b-svn'
PACKAGE_TARNAME='logkeys'
PACKAGE_URL='https://github.com/kernc/logkeys/'
PACKAGE_VERSION='0.1.1b-svn'
PATH_SEPARATOR=':'
SET_MAKE='MAKE=make'
SHELL='/bin/bash'
STRIP=''
VERSION='0.1.1b-svn'
ac_ct_CXX=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=' -I$(srcdir)'
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /root/logkeys/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "logkeys"
#define PACKAGE_TARNAME "logkeys"
#define PACKAGE_VERSION "0.1.1b-svn"
#define PACKAGE_STRING "logkeys 0.1.1b-svn"
#define PACKAGE_BUGREPORT "kerncece+logkeys@gmail.com"
#define PACKAGE_URL "https://github.com/kernc/logkeys/"
#define PACKAGE "logkeys"
#define VERSION "0.1.1b-svn"

configure: exit 77

I am running new Debian docker container and installing in it.

kernc commented 3 years ago

I assume the issue is:

configure:2881: checking for g++
configure:2911: result: no
configure:2935: checking for C++ compiler version
configure:2944: g++ --version >&5
../configure: line 2946: g++: command not found
configure:2975: checking whether the C++ compiler works
configure:2997: g++    conftest.cpp  >&5
../configure: line 2999: g++: command not found

In other words, there is no C++ compiler available.

The installation guide does mention installing some dependencies: https://github.com/kernc/logkeys/blob/0427dec4ecfd4e8a7844c3e7deb45404f0416cd3/INSTALL#L10-L17 If autotools-dev and autoconf happen to not also pull in package build-essential and, by extension, g++, that's a valid bug report.

vadorvatsal commented 3 years ago

Yes I followed installation for debian-based distros step by step and sudo apt-get install autotools-dev autoconf was successful but still I ran into this error state.

Hope that helps you to find out the issue. I can share you other logs (if any) required.

kernc commented 3 years ago

Try also sudo apt install build-essential. :grimacing:

vadorvatsal commented 3 years ago

after doing sudo apt-get install build-essential and running ../configure

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/logkeys/missing: Unknown `--is-lightweight' option
Try `/root/logkeys/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for which... yes
checking for grep... yes
checking for ps... no
configure: error: Required program 'ps' is missing.

Please also include check and install for gcc. So, it is simple install.

Now when I read current log and checking directory structure I find that directory named missing is actually not generated.

My understanding that plain debian docker do not have program ps and maybe you also want to include that installation as well.

kernc commented 3 years ago

configure: error: Required program 'ps' is missing.

:point_right: sudo apt install procps libprocps-dev

I don't know about that missing script. It seems to be just a warning.

vadorvatsal commented 3 years ago

Right you have included check for it but not installation.

kernc commented 3 years ago

Right you have included check for it but not installation.

This is not how configure works.

This is about building a program from source, not installing a prebuilt package along with its dependencies. ICBA to install packages on your (every, arbitrary) system?

vadorvatsal commented 3 years ago
root@35bacad60b87:~/logkeys/build# ../configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/logkeys/missing: Unknown `--is-lightweight' option
Try `/root/logkeys/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for which... yes
checking for grep... yes
checking for ps... yes
checking for dumpkeys... no
configure: error: Required program 'dumpkeys' is missing.

So I'll go ahead and install all no programs and see if I get it working.

kernc commented 3 years ago

Regarding the missing warning: can you try to delete the missing file from project root and then re-run ./autogen.sh? :grimacing: https://github.com/kernc/logkeys/blob/0427dec4ecfd4e8a7844c3e7deb45404f0416cd3/INSTALL#L32-L36

kernc commented 3 years ago

configure: error: Required program 'dumpkeys' is missing.

Yeah apt install dumpkeys is also required. I wonder how that was left out from the documentation. I guess nobody ever installed in a out-of-the-box light container. :thinking:

vadorvatsal commented 3 years ago
root@35bacad60b87:~/logkeys# cd build; ../configure; make; su; make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for which... yes
checking for grep... yes
checking for ps... yes
checking for dumpkeys... yes
checking for /dev/input... no
configure: error: Input event interface devices not found in expected location /dev/input/eventX !
make: *** No targets specified and no makefile found.  Stop.
root@35bacad60b87:~/logkeys/build#

Sorry for too much trouble but I think now I'll need your help.

kernc commented 3 years ago

It fails due to this configure check: https://github.com/kernc/logkeys/blob/02ad0021d7b4f84adefceb1cdd8e85bcd31226e7/configure.ac#L44-L48

/dev/input is part of the kernel, I think one of the modules (§2) or udev might populate it (apt install udev libinput-dev). In either case, it won't work without bare-metal access (i.e. in a container). You first have to expose the relevant device to the container, see: https://stackoverflow.com/questions/50789172/libinput-in-a-docker-container/50789862#50789862

vadorvatsal commented 3 years ago

It fails due to this configure check:

https://github.com/kernc/logkeys/blob/02ad0021d7b4f84adefceb1cdd8e85bcd31226e7/configure.ac#L44-L48

/dev/input is part of the kernel, I think one of the modules (§2) or udev might populate it (apt install udev libinput-dev). In either case, it won't work without bare-metal access (i.e. in a container). You first have to expose the relevant device to the container, see: https://stackoverflow.com/questions/50789172/libinput-in-a-docker-container/50789862#50789862

Correct so, this is NOT a bug. Thank you for quick response and all the great work. I'll now try exposing my device and will share good news with you. :)

kernc commented 3 years ago

I appreciate it! Glad you're not running Docker on Windos. That would unquestionably complicate stuff much further. :joy: