IW0HDV / airspyhf

Code repository for AirspyHF+
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

can't build the tools #1

Closed hemna closed 6 years ago

hemna commented 6 years ago

I'm trying to build the tools in the 'tools' branch and it seems that cmake builds makefiles that can't find the header files in /usr/local/include

┌─[waboring@airspy] - [~/new/airspyhf-2/tools/src] - [Fri Aug 17, 13:25]
└─[$] <git:(tools*)> mkdir build
┌─[waboring@airspy] - [~/new/airspyhf-2/tools/src] - [Fri Aug 17, 13:25]
└─[$] <git:(tools*)> cd build 
┌─[waboring@airspy] - [~/new/airspyhf-2/tools/src/build] - [Fri Aug 17, 13:25]
└─[$] <git:(tools*)> 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
-- Configuring done
-- Generating done
-- Build files have been written to: /home/waboring/new/airspyhf-2/tools/src/build
┌─[waboring@airspy] - [~/new/airspyhf-2/tools/src/build] - [Fri Aug 17, 13:26]
└─[$] <git:(tools*)> make
Scanning dependencies of target airspyhf_lib_version
[ 12%] Building C object CMakeFiles/airspyhf_lib_version.dir/airspyhf_lib_version.c.o
/home/waboring/new/airspyhf-2/tools/src/airspyhf_lib_version.c:26:22: fatal error: airspyhf.h: No such file or directory
 #include <airspyhf.h>
                      ^
compilation terminated.
CMakeFiles/airspyhf_lib_version.dir/build.make:62: recipe for target 'CMakeFiles/airspyhf_lib_version.dir/airspyhf_lib_version.c.o' failed
make[2]: *** [CMakeFiles/airspyhf_lib_version.dir/airspyhf_lib_version.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/airspyhf_lib_version.dir/all' failed
make[1]: *** [CMakeFiles/airspyhf_lib_version.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
└─[$] <git:(tools*)> ls -al /usr/local/include
total 36
drwxrwsr-x  4 root staff  4096 Aug 16 16:21 .
drwxrwsr-x 10 root staff  4096 Jun 26 20:03 ..
drwxr-sr-x  2 root staff  4096 Aug 16 16:26 libairspy
drwxr-sr-x  2 root staff  4096 Aug 17 13:03 libairspyhf
-rw-r--r--  1 root staff 12947 Aug 16 15:41 rtl-sdr.h
-rw-r--r--  1 root staff  1436 Aug 16 15:41 rtl-sdr_export.h
└─[$] <git:(tools*)> ls -al /usr/local/include/libairspyhf 
total 24
drwxr-sr-x 2 root staff 4096 Aug 17 13:03 .
drwxrwsr-x 4 root staff 4096 Aug 16 16:21 ..
-rw-r--r-- 1 root staff 5967 Aug 17 11:28 airspyhf.h
-rw-r--r-- 1 root staff 2528 Aug 17 11:28 airspyhf_commands.h
-rw-r--r-- 1 root staff 2667 Aug 17 11:28 iqbalancer.h
amontefusco commented 6 years ago

It should find it in the clone, at least this what it is doing here.

Anyway, uninstall and delete any previously built version of the lib and try that:

git clone https://github.com/IW0HDV/airspyhf.git -b tools cd airspyhf/ mkdir build cd build cmake ../ -DINSTALL_UDEV_RULES=ON make VERBOSE=1

hemna commented 6 years ago

ok my mistake, I was building from the src/tools/ dir. that seems to have fixed it.

amontefusco commented 6 years ago

Anyway, clone again, as in the meantime I updated from the upstream with all the new features and fixed a bug in -a parameter (airspyhf_rx).