Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build without Catch2/cppcodec being available #463

Open
daringer opened this issue Jan 25, 2021 · 5 comments
Open

Cannot build without Catch2/cppcodec being available #463

daringer opened this issue Jan 25, 2021 · 5 comments

Comments

@daringer
Copy link
Contributor

  • Application version: 1.4.2
  • Operating system: Arch Linux, latest, 64 bits, kernel version: 5.10.9-arch1
  • Device model and firmware version: all (build)
  • Connected USB port type: n/a
  • Issue occurrency: always

Expected behaviour

It's possible to build w/o Catch2 / cppcodec

Current behaviour

cppcodec and Catch2 not available, leads to the output below during a default build. If cppcodec is available and Catch2 is not, then the build fails due to a missing Catch2.

Steps for reproduction

make sure cppcodec is not available and try to build

Logs

[ 60%] Building CXX object CMakeFiles/nitrokey-app.dir/src/systemutils.cpp.o
/run/build/nitrokey-app/src/hotpslot.cpp:38:10: fatal error: cppcodec/base32_crockford.hpp: No such file or directory
   38 | #include <cppcodec/base32_crockford.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nitrokey-app.dir/build.make:200: CMakeFiles/nitrokey-app.dir/src/hotpslot.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/run/build/nitrokey-app/src/ui/mainwindow.cpp:505:10: fatal error: cppcodec/hex_upper.hpp: No such file or directory
  505 | #include <cppcodec/hex_upper.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nitrokey-app.dir/build.make:239: CMakeFiles/nitrokey-app.dir/src/ui/mainwindow.cpp.o] Error 1
^Cmake: *** [Makefile:2: local-install] Interrupt

@jeremiah
Copy link

This hits me too. Trying to build the app for Debian based systems but get the same error.

Scanning dependencies of target nitrokey-app
[ 22%] Building CXX object CMakeFiles/nitrokey-app.dir/src/ui/nitrokey-applet.cpp.o
[ 25%] Building CXX object CMakeFiles/nitrokey-app.dir/src/ui/aboutdialog.cpp.o
[ 27%] Building CXX object CMakeFiles/nitrokey-app.dir/src/main.cpp.o
[ 32%] Building CXX object CMakeFiles/nitrokey-app.dir/src/hotpslot.cpp.o
[ 32%] Building CXX object CMakeFiles/nitrokey-app.dir/nitrokey-app_autogen/mocs_compilation.cpp.o
[ 35%] Building CXX object CMakeFiles/nitrokey-app.dir/src/ui/mainwindow.cpp.o
[ 37%] Building CXX object CMakeFiles/nitrokey-app.dir/src/ui/pindialog.cpp.o
[ 40%] Building CXX object CMakeFiles/nitrokey-app.dir/src/core/SecureString.cpp.o
/home/jeremiah/packaging/nitrokey-app-v1.4.2/src/hotpslot.cpp:38:10: fatal error: cppcodec/base32_crockford.hpp: No such file or directory
   38 | #include <cppcodec/base32_crockford.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nitrokey-app.dir/build.make:200: CMakeFiles/nitrokey-app.dir/src/hotpslot.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/jeremiah/packaging/nitrokey-app-v1.4.2/src/ui/mainwindow.cpp:505:10: fatal error: cppcodec/hex_upper.hpp: No such file or directory
  505 | #include <cppcodec/hex_upper.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nitrokey-app.dir/build.make:239: CMakeFiles/nitrokey-app.dir/src/ui/mainwindow.cpp.o] Error 1
/home/jeremiah/packaging/nitrokey-app-v1.4.2/src/main.cpp: In function ‘void configureRandomGenerator()’:
/home/jeremiah/packaging/nitrokey-app-v1.4.2/src/main.cpp:179:75: warning: ‘void qsrand(uint)’ is deprecated: use QRandomGenerator instead [-Wdeprecated-declarations]
  179 |     qsrand(static_cast<uint> (local.currentMSecsSinceEpoch() % 2000000000));
      |                                                                           ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QMainWindow:1,
                 from /home/jeremiah/packaging/nitrokey-app-v1.4.2/src/ui/mainwindow.h:28,
                 from /home/jeremiah/packaging/nitrokey-app-v1.4.2/src/main.cpp:23:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1278:81: note: declared here
 1278 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") void qsrand(uint seed);
      |                                                                                 ^~~~~~
make[1]: *** [CMakeFiles/Makefile2:116: CMakeFiles/nitrokey-app.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Weird because I can build 1.4.1 without issues.

@jeremiah
Copy link

I guess the solution is perhaps to include cppcodec in official releases of nitrokey-app. Otherwise, one has to use the git submodule to pull it in or download cppcode separately as cppcode is not packaged for Debian. It's not listed as a dependency in the README either.

@szszszsz
Copy link
Member

I am not sure I understand the problem.
@daringer Why do you need that? For general case the Readme clearly states that submodules are required:

@jeremiah Nothing has changed since v1.4.1 though - could you confirm?

Readme indeed is missing dependencies list.

@daringer
Copy link
Contributor Author

daringer commented May 17, 2021

@daringer Why do you need that? For general case the Readme clearly states that submodules are required:

well, the obvious reason is that building without tests might be a nice-to-have.

Generally, revisited this and I believe the issue is simply the source-packaging I was using - you are totally right, the README clearly states the need for sub modules. But for the flatpak release I was using the .tgz provided in "releases" and inside this archive the sub-modules (i.e., cppcodec, but also libnitrokey) are not included.

Means for the git repository itself this is not an issue, but for the source-releases nitrokey-app should either include cppcodec or provide a way to build without it...

@jeremiah
Copy link

@szszszsz The only change from 1.4.1 to 1.4.2 I believe is the addition of bash auto-completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants