nqminds / brski Goto Github PK
View Code? Open in Web Editor NEWBRSKI protocol - reference implementation
License: MIT License
BRSKI protocol - reference implementation
License: MIT License
After failing to install on Kali, I decided to do it also to give a try on WSL running Debian.
However, when I try to build this time I cannot let cmake understand that I have openssl3 installed, and that openssl1.1 is not even in my pc.
CMake Error at /usr/share/cmake-3.25/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: Found unsuitable version "1.1.1n", but required is at least "3" (found /usr/lib/x86_64-linux-gnu/libcrypto.so, found components: Crypto SSL) Call Stack (most recent call first): /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.25/Modules/FindOpenSSL.cmake:613 (find_package_handle_standard_args) lib/openssl3.cmake:85 (find_package) CMakeLists.txt:168 (include)
openssl version -a OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) built on: Wed May 17 09:51:47 2023 UTC platform: linux-x86_64 options: bn(64,64) compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG OPENSSLDIR: "/usr/local/ssl" ENGINESDIR: "/usr/local/ssl/lib64/engines-3" MODULESDIR: "/usr/local/ssl/lib64/ossl-modules" Seeding source: os-specific CPUINFO: OPENSSL_ia32cap=0xfffab2235f8bffff:0x18405fc6f1bf27ab
Also the libraries are in the correct place:
which openssl /usr/local/ssl/bin/openssl
I have no iedea how to solve this problem, given also by the fact that I am not familiar with cmake.
Thanks in advance for all your support
Unable to complete the installation process following the steps provided with the cmake presets. Most of the problems I had revolved around cmocka.
At first I tried to build the stable 0.20 release. However I was not able to build it.
Then I cloned the repository as per its latest update, and I was able to build. However, I keep stumbling accross cmocka errors when running make --build --preset linux -j4
I followed the steps illustrated form the repo.
Thanks in advance for your time and consideration
[ 62%] Building C object _deps/cmocka-build/src/CMakeFiles/cmocka.dir/cmocka.c.o
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c: In function ‘_assert_ptr_equal’:
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2116:10: error: ‘a’ may be used uninitialized [-Werror=maybe-uninitialized]
2116 | if (!ptr_values_equal_display_error(a, b)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2111:36: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
2111 | void _assert_ptr_equal(const void *a,
| ~~~~~~~~~~~~^
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2116:10: error: ‘b’ may be used uninitialized [-Werror=maybe-uninitialized]
2116 | if (!ptr_values_equal_display_error(a, b)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2112:36: note: accessing argument 2 of a function declared with attribute ‘access (none, 2)’
2112 | const void *b,
| ~~~~~~~~~~~~^
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c: In function ‘_assert_ptr_not_equal’:
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2126:10: error: ‘a’ may be used uninitialized [-Werror=maybe-uninitialized]
2126 | if (!ptr_values_not_equal_display_error(a, b)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2121:40: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
2121 | void _assert_ptr_not_equal(const void *a,
| ~~~~~~~~~~~~^
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2126:10: error: ‘b’ may be used uninitialized [-Werror=maybe-uninitialized]
2126 | if (!ptr_values_not_equal_display_error(a, b)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marco/Desktop/brski/build/linux/_deps/cmocka-src/src/cmocka.c:2122:40: note: accessing argument 2 of a function declared with attribute ‘access (none, 2)’
2122 | const void *b,
| ~~~~~~~~~~~~^
cc1: some warnings being treated as errors
Kali linux distro
The brski CLI is extremely difficult to debug if anything goes wrong.
For example, I've encountered errors like:
2023-06-20 01:38:04.961 ERROR httplib_wrapper.cpp:251: httplib::Client fail with "Success"
I've also encountered times where the brski
CLI seems to crash, but there are no logs, and brski
returns 0
(aka SUCCESS) instead of an error exit code.
It seems like most of these issues are caused by the lack of error handling/logging capabilities in the HTTP library that brski
uses: cpp-httplib.
cpp-httplib seems like a simple and easy-to-use library, but it doesn't have good error handling capabilities. In my opinion, we need to replace the http library used by brski
to a different library, or even spin up our own HTTP handling.
await
/async
)debian/unstable
.libqt6network6
.According to the tutorial, I should be supposed to be able to run the brski command with a configuration file with the command:
./build/src/brski -c ./build/dev-config.ini
However there are a couple of issue with this:
tree -d ./
./
├── build
│ ├── dl
│ └── linux
There are two additional folders. It is not a big deal, just confusing and a little fix that can make the user experience a little more smooth.
./build/src/brski -c ./build/dev-config.ini
, although is changed the paths to the correct one there is a discrepanncy. Specifically the dev-config.ini
is not present in the build direcotry:Although in the wrong places, I was able to locate the dev-config.ini
file in the path …/build/linux/src/brski
Then, from the same brski folder I tried to run the command: brski -c ./dev-config.ini
.
This created the following output:
└─$ brski -c ./dev-config.ini
Command-line usage error: Unrecognized command "(null)"
I even tried from different locations and using the correct path, however I got always the same error.
Is there a reason why this happens? the building and installation process went fine.
Is there anything that I missed during the installation process?
Thanks in advance for your time
Kali linux with zsh terminal
Same problem even in bash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.