OpenHantek / openhantek

OpenHantek is a DSO software for Hantek (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes
http://openhantek.org/
GNU General Public License v3.0
763 stars 199 forks source link

Hantek raspberry pi 3B+ cmake failure #254

Closed gregq18 closed 6 years ago

gregq18 commented 6 years ago

followed the install instructions on a raspberry pi 3B+ with lastest SW updates and compilation fails with:

pi@raspberrypi:~/openhantek-master/build $ sudo cmake ../ CMake Error at CMakeLists.txt:4 (cmake_policy): Policy "CMP0072" is not known to this version of CMake.

-- Found libfftw3: -- - Includes: /usr/include -- - Libraries: /usr/lib/arm-linux-gnueabihf/libfftw3.so -- Configuring incomplete, errors occurred! See also "/home/pi/openhantek-master/CMakeFiles/CMakeOutput.log". See also "/home/pi/openhantek-master/CMakeFiles/CMakeError.log".

I have attached a txt file with the install and log files and the issue seems to be: undefined reference to `pthread_create' ?

HantekLogs.txt

bikermikem commented 6 years ago

This worked for me

$ cmake ../ -- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:4 (cmake_policy): Policy "CMP0072" is not known to this version of CMake. <----- !!!!!! Comment out or remove line 4 in CMakeLists.txt

-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so -- Found libusb: /usr/lib/arm-linux-gnueabihf/libusb-1.0.so -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found libfftw3: -- - Includes: /usr/include -- - Libraries: /usr/lib/arm-linux-gnueabihf/libfftw3.so -- Configuring incomplete, errors occurred! See also "/home/pi/openhantek/OpenHantek-openhantek-7862387/build/CMakeFiles/CMakeOutput.log". See also "/home/pi/openhantek/OpenHantek-openhantek-7862387/build/CMakeFiles/CMakeError.log".

gregq18 commented 6 years ago

Thank you for your prompt response.

This still did not compile until I deleted the openhantek-master directory and created new copy and then edited CMakeLists.txt.

Now seems to be compiling ok now.

Thanks greg

ruphman commented 6 years ago

this works for me: open /openhantek-master/CMakeList.txt delete or change line 4:

cmake_policy(SET CMP0072 NEW)

LameLefty commented 6 years ago

So I see this is a closed item yet after installing all the required packages from the Linux build instructions, and then commenting out the offending line in CMakeLists.txt, I still get errors trying to install on my Raspberry Pi machines. In each case (an RPi3 and just for fun an Pi Zero W:

CMake Error at OpenHantek/CMakeLists.txt:12 (message): Minimum supported Qt5 version is 5.4.0!

image

I suspect it's some kind of a path issue but I just don't grok enough bash and don't use Linux enough routinely to figure it out. Pointers welcome.

EDIT: Never mind. The files installed by apt on my Raspberry Pi units give me Qt 5.3. Bah. Gotta grab a newer Raspbian image, looks like.

ruphman commented 6 years ago

you need minimum Debian stretch for raspberry. In Jessy you have only qt 5.3!