From c98a88a977efa6976636832f48de02f8d1f64de9 Mon Sep 17 00:00:00 2001 From: GameTec_live Date: Sat, 25 Nov 2023 13:51:17 +0100 Subject: [PATCH] doc: add troubleshooting entry and python notice --- docs/cli.md | 4 +++- docs/troubleshooting.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index 06f90658..cdfa83f0 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -74,7 +74,7 @@ Building natively is a bit more advanced and not recommended for beginners 4. Download and install [cmake](https://cmake.org/download/). Again, when asked, add to your path -5. Download and install [python](https://www.python.org/downloads/). When asked, add to your path (small checkbox in the bottom left) +5. Download and install [python](https://www.python.org/downloads/). When asked, add to your path (small checkbox in the bottom left). Python 3.9 or above is required. 6. Choose a suitable location and open a terminal. Clone the repository with `git clone https://github.com/RfidResearchGroup/ChameleonUltra.git` @@ -110,6 +110,8 @@ Install the dependencies - Arch: `sudo pacman -S git cmake base-devel python3` +Python 3.9 or above is required. + Run the following script to clone the Repository, compile the tools and install Python dependencies in a virtual environment. ```sh diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index ae9e9251..15cee06a 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -82,6 +82,39 @@ pacman -R ninja --noconfirm pacman -S mingw-w64-x86_64-ninja --noconfirm ``` +## cmake: Undefined reference to "pthread_create" + +It has been reported that on some Linux systems cmake doesnt find pthread. + +Make sure to have libpthread installed, the package may be named differently on your distro. + +On ubuntu and same based systems it is the following command: +``` +sudo apt install libpthread-stubs0-dev +``` + +If this doesnt fix it, you may need to set pthread in the LDFLAGS enviroment variable, this can be done by running the command with the enviroment variable at the beginning: + +``` +LDFLAGS=-pthread cmake .. +``` + +If the error still persists you may also need to provide a specific compiler version, you do that by adding the -DCMAKE_C_COMPILER argument: + +``` +LDFLAGS=-pthread cmake -DCMAKE_C_COMPILER=gcc-11 .. +``` + +The compiler needs to be installed too ofcourse, the package name may be differently on your distro. + +On ubuntu and same based systems its the following command: + +``` +sudo apt install gcc-11 g++-11 +``` + +The following ```cmake --build . --config Release``` should work again without modification. + # CLI usage ## InvalidException: Device unsupported cmd