Nitrokey / nitrokey-app

Nitrokey's Application (Win, Linux, Mac)
https://www.nitrokey.com/
287 stars 55 forks source link

Cannot build from source, #459

Closed FrostKnight closed 3 years ago

FrostKnight commented 3 years ago

Nitrokey-app 1.4.2 and 1.4.1 do not build from source with make, I have used both qmake and cmake methods and both times it gives me some weird error:

../src/ui/mainwindow.cpp:505:34: fatal error: cppcodec/hex_upper.hpp: No such file or directory

include <cppcodec/hex_upper.hpp>

I have all libraries that I know of... except maybe catch2, not sure if that's needed or where that goes in the files if it is needed.

I can build 1.4.0 easily, its just 1.4.1 and past...

Are the tar.gz/tar/zips and source code missing certain things?

Still using Hyperbola, in a few months it will upgrade a bunch of things to more updated packages,

Although I am curious why versions 1.4.0 and before I can build easily enough but not 1.4.1 or 1.4.2.

Is there any benefit to updating?

szszszsz commented 3 years ago

Hi! This looks like the submodules were not initialized. Could you run the below in the root directory and check again?

git submodules update --init --recursive
FrostKnight commented 3 years ago

I just tried both in the root directory and the build directory, neither worked. Although, git was being a bit odd, and submodules wasn't a command, submodule was however... and that didn't seem to work either.

got this error though anyways:

fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DIS[user@host[user@user nitrokey-app]$ git submodule update --init --recursive

Tried a few times now, I am a bit confused though.

szszszsz commented 3 years ago

Indeed it should have been submodule. I see. You need to clone this repository to build the application since the zip archive with the source code does not contain the git submodules.

Please try this one:

git clone https://github.com/Nitrokey/nitrokey-app.git --recursive

Edit: this will make a fresh copy of the source in the nitrokey-app directory.

Edit: about update benefits, since 1.4.0 there was only a UI change, specifically decreasing height of the main window to fit smaller screens. More about it below:

FrostKnight commented 3 years ago

Ah, thank you, yes I have almost everything fixed at the moment... Now I just need to track down why this happened:
error while loading shared libraries: libhidapi-libusb.so.0: cannot open shared object file: No such file or directory

Odd it is, since I have hidapi installed. hmm... so far so good though!

FrostKnight commented 3 years ago

Nevermind, I got it now, hidapi's newer version has some conflicts at the moment... I used my distro's older one and it works. Solved I would say.