NikolaDucak / caps-log

A small TUI journaling tool. πŸ“–
MIT License
130 stars 3 forks source link

Issues with install and launch #54

Open BlueInGreen68 opened 5 months ago

BlueInGreen68 commented 5 months ago

Hi. I encountered some difficulties during installation and startup caps-log:

  1. During the build cmake could not find the path to the OpenSSL:

    CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
      system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY Crypto)
      (found version "3.3.0")

    I fixed it by changing one set(OPENSSL_USE_STATIC_LIBS TRUE) in the file CmakeLists.txt to:

    set(OPENSSL_USE_STATIC_LIBS OFF CACHE BOOL β€œβ€ FORCE)
  2. After a kinda successful installation, running caps-log doesn't output anything, but just blinks the cursor against an empty terminal background.

Can you please tell me what can be done?

NikolaDucak commented 5 months ago

Hi, I've had similar issue before and i've fixed it by broviding the OPENSSL_ROOT_DIR to my cmake command cmake .. -DOPENSSL_ROOT_DIR=/opt/homebrew/etc/openssl@3 (MacOS brew installation path).

Can you passing that to CMake with the path of your openssl installation?

BlueInGreen68 commented 5 months ago

I'm using ArchLinux and I still get the same error. I have tried the following commands:

cmake .. -DOPENSSL_ROOT_DIR=/usr/include/openssl
cmake .. -DOPENSSL_ROOT_DIR=/usr/lib/openssl-1.1/

It is possible that I am specifying the wrong path. I used the following commands with the following output to find it:

pacman -Ql openssl | grep "include"

openssl /usr/include/
openssl /usr/include/openssl/
openssl /usr/include/openssl/aes.h
openssl /usr/include/openssl/asn1.h
openssl /usr/include/openssl/asn1_mac.h
openssl /usr/include/openssl/asn1err.h
openssl /usr/include/openssl/asn1t.h
openssl /usr/include/openssl/async.h
openssl /usr/include/openssl/asyncerr.h
openssl /usr/include/openssl/bio.h
openssl /usr/include/openssl/bioerr.h
openssl /usr/include/openssl/blowfish.h
openssl /usr/include/openssl/bn.h
openssl /usr/include/openssl/bnerr.h
openssl /usr/include/openssl/buffer.h
openssl /usr/include/openssl/buffererr.h
openssl /usr/include/openssl/camellia.h
openssl /usr/include/openssl/cast.h
openssl /usr/include/openssl/cmac.h
openssl /usr/include/openssl/cmp.h
openssl /usr/include/openssl/cmp_util.h
openssl /usr/include/openssl/cmperr.h
openssl /usr/include/openssl/cms.h
openssl /usr/include/openssl/cmserr.h
openssl /usr/include/openssl/comp.h
openssl /usr/include/openssl/comperr.h
openssl /usr/include/openssl/conf.h
openssl /usr/include/openssl/conf_api.h
openssl /usr/include/openssl/conferr.h
openssl /usr/include/openssl/configuration.h
openssl /usr/include/openssl/conftypes.h
openssl /usr/include/openssl/core.h
openssl /usr/include/openssl/core_dispatch.h
openssl /usr/include/openssl/core_names.h
openssl /usr/include/openssl/core_object.h
openssl /usr/include/openssl/crmf.h
openssl /usr/include/openssl/crmferr.h
openssl /usr/include/openssl/crypto.h
openssl /usr/include/openssl/cryptoerr.h
openssl /usr/include/openssl/cryptoerr_legacy.h
openssl /usr/include/openssl/ct.h
openssl /usr/include/openssl/cterr.h
openssl /usr/include/openssl/decoder.h
openssl /usr/include/openssl/decodererr.h
openssl /usr/include/openssl/des.h
openssl /usr/include/openssl/dh.h
openssl /usr/include/openssl/dherr.h
openssl /usr/include/openssl/dsa.h
openssl /usr/include/openssl/dsaerr.h
openssl /usr/include/openssl/dtls1.h
openssl /usr/include/openssl/e_os2.h
openssl /usr/include/openssl/e_ostime.h
openssl /usr/include/openssl/ebcdic.h
openssl /usr/include/openssl/ec.h
openssl /usr/include/openssl/ecdh.h
openssl /usr/include/openssl/ecdsa.h
openssl /usr/include/openssl/ecerr.h
openssl /usr/include/openssl/encoder.h
openssl /usr/include/openssl/encodererr.h
openssl /usr/include/openssl/engine.h
openssl /usr/include/openssl/engineerr.h
openssl /usr/include/openssl/err.h
openssl /usr/include/openssl/ess.h
openssl /usr/include/openssl/esserr.h
openssl /usr/include/openssl/evp.h
openssl /usr/include/openssl/evperr.h
openssl /usr/include/openssl/fips_names.h
openssl /usr/include/openssl/fipskey.h
openssl /usr/include/openssl/hmac.h
openssl /usr/include/openssl/hpke.h
openssl /usr/include/openssl/http.h
openssl /usr/include/openssl/httperr.h
openssl /usr/include/openssl/idea.h
openssl /usr/include/openssl/kdf.h
openssl /usr/include/openssl/kdferr.h
openssl /usr/include/openssl/lhash.h
openssl /usr/include/openssl/macros.h
openssl /usr/include/openssl/md2.h
openssl /usr/include/openssl/md4.h
openssl /usr/include/openssl/md5.h
openssl /usr/include/openssl/mdc2.h
openssl /usr/include/openssl/modes.h
openssl /usr/include/openssl/obj_mac.h
openssl /usr/include/openssl/objects.h
openssl /usr/include/openssl/objectserr.h
openssl /usr/include/openssl/ocsp.h
openssl /usr/include/openssl/ocsperr.h
openssl /usr/include/openssl/opensslconf.h
openssl /usr/include/openssl/opensslv.h
openssl /usr/include/openssl/ossl_typ.h
openssl /usr/include/openssl/param_build.h
openssl /usr/include/openssl/params.h
openssl /usr/include/openssl/pem.h
openssl /usr/include/openssl/pem2.h
openssl /usr/include/openssl/pemerr.h
openssl /usr/include/openssl/pkcs12.h
openssl /usr/include/openssl/pkcs12err.h
openssl /usr/include/openssl/pkcs7.h
openssl /usr/include/openssl/pkcs7err.h
openssl /usr/include/openssl/prov_ssl.h
openssl /usr/include/openssl/proverr.h
openssl /usr/include/openssl/provider.h
openssl /usr/include/openssl/quic.h
openssl /usr/include/openssl/rand.h
openssl /usr/include/openssl/randerr.h
openssl /usr/include/openssl/rc2.h
openssl /usr/include/openssl/rc4.h
openssl /usr/include/openssl/rc5.h
openssl /usr/include/openssl/ripemd.h
openssl /usr/include/openssl/rsa.h
openssl /usr/include/openssl/rsaerr.h
openssl /usr/include/openssl/safestack.h
openssl /usr/include/openssl/seed.h
openssl /usr/include/openssl/self_test.h
openssl /usr/include/openssl/sha.h
openssl /usr/include/openssl/srp.h
openssl /usr/include/openssl/srtp.h
openssl /usr/include/openssl/ssl.h
openssl /usr/include/openssl/ssl2.h
openssl /usr/include/openssl/ssl3.h
openssl /usr/include/openssl/sslerr.h
openssl /usr/include/openssl/sslerr_legacy.h
openssl /usr/include/openssl/stack.h
openssl /usr/include/openssl/store.h
openssl /usr/include/openssl/storeerr.h
openssl /usr/include/openssl/symhacks.h
openssl /usr/include/openssl/thread.h
openssl /usr/include/openssl/tls1.h
openssl /usr/include/openssl/trace.h
openssl /usr/include/openssl/ts.h
openssl /usr/include/openssl/tserr.h
openssl /usr/include/openssl/txt_db.h
openssl /usr/include/openssl/types.h
openssl /usr/include/openssl/ui.h
openssl /usr/include/openssl/uierr.h
openssl /usr/include/openssl/whrlpool.h
openssl /usr/include/openssl/x509.h
openssl /usr/include/openssl/x509_vfy.h
openssl /usr/include/openssl/x509err.h
openssl /usr/include/openssl/x509v3.h
openssl /usr/include/openssl/x509v3err.h
pacman -Ql openssl | grep "lib"

openssl /usr/lib/
openssl /usr/lib/cmake/
openssl /usr/lib/cmake/OpenSSL/
openssl /usr/lib/cmake/OpenSSL/OpenSSLConfig.cmake
openssl /usr/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake
openssl /usr/lib/engines-3/
openssl /usr/lib/engines-3/afalg.so
openssl /usr/lib/engines-3/capi.so
openssl /usr/lib/engines-3/loader_attic.so
openssl /usr/lib/engines-3/padlock.so
openssl /usr/lib/libcrypto.so
openssl /usr/lib/libcrypto.so.3
openssl /usr/lib/libssl.so
openssl /usr/lib/libssl.so.3
openssl /usr/lib/ossl-modules/
openssl /usr/lib/ossl-modules/legacy.so
openssl /usr/lib/pkgconfig/
openssl /usr/lib/pkgconfig/libcrypto.pc
openssl /usr/lib/pkgconfig/libssl.pc
openssl /usr/lib/pkgconfig/openssl.pc
openssl /usr/share/man/man3/BIO_f_zlib.3ssl.gz
openssl /usr/share/man/man3/COMP_zlib.3ssl.gz
openssl /usr/share/man/man3/COMP_zlib_oneshot.3ssl.gz
openssl /usr/share/man/man3/ERR_get_next_error_library.3ssl.gz
openssl /usr/share/man/man3/ERR_lib_error_string.3ssl.gz
openssl /usr/share/man/man3/EVP_PKEY_CTX_get0_libctx.3ssl.gz
openssl /usr/share/man/man3/NCONF_get0_libctx.3ssl.gz
openssl /usr/share/man/man3/OSSL_CMP_CTX_get0_libctx.3ssl.gz
openssl /usr/share/man/man3/SSL_library_init.3ssl.gz
openssl /usr/share/man/man7/ossl-guide-libcrypto-introduction.7ssl.gz
openssl /usr/share/man/man7/ossl-guide-libraries-introduction.7ssl.gz
openssl /usr/share/man/man7/ossl-guide-libssl-introduction.7ssl.gz
NikolaDucak commented 5 months ago

Sorry for the delayed response.

Does /usr/lib/openssl-1.1/ exist on your machine? Maybe you can try to set OPEN_SSL_ROOT_DIR to be just /usr/lib?

Also I see /usr/lib/libcrypto.so but no *.a so I guess you don't have a static library installed. Anyway of install openssl static lib with pacman? According to chat gpt is should be installed with openssl package sudo pacman -S openssl which I assume you already did

Sorry I'm not much of help here, I have no experience with arch & pacman.

Also, perhaps this is not the real issue here, https://github.com/NikolaDucak/caps-log/issues/56 is an issue where caps log receives SIGABRT but does not close the app, just breaks the rendering.. perhaps similar thing is happening to you and that's why you get the blank screen, I'll look into that issue

NikolaDucak commented 5 months ago

@BlueInGreen68 a fix for #56 is on master, can you try running it again?

BlueInGreen68 commented 5 months ago

@NikolaDucak I tried everything you mentioned above, but unfortunately none of it worked. I even tried changing the set(OPENSSL_USE_STATIC_LIBS TRUE) in CmakeLists.txt again to set(OPENSSL_USE_STATIC_LIBS OFF CACHE BOOL β€œβ€ FORCE), but after a β€œsuccessful” installation I still get a dark screen, but I didn't specify the following message last time:

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (libgit2)
  does not match the name of the calling package (LibGit2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.

Perhaps this message has something to do with the black screen, I apologize for my meager knowledge.

In searching for static libraries I came across a couple of packages but they take some unrealistic amount of time to install, however I did manage to install one package but it didn't help either.

But I am willing to try to implement your advice on my machine if any.

NikolaDucak commented 4 months ago

So this message is with the latest version of the master? Are you specifying any command line arguments and do you have anything set int your config? (~/.caps-log/config.ini)

BlueInGreen68 commented 4 months ago

This message appeared after setting set(OPENSSL_USE_STATIC_LIBS TRUE) to set(OPENSSL_USE_STATIC_LIBS OFF CACHE BOOL β€œβ€ FORCE).

And running it with or without the config does not change anything. Still black screen. However, in the ~/.caps-log/ folder an empty day directory is created.

BlueInGreen68 commented 3 months ago

Hi, your tool appeared in the AUR repository, but I'm encountering the same black screen error. https://aur.archlinux.org/packages/caps-log-bin#comment-984570