Hi,
I'm implementing CubicSDR on my Linux Mint computer.
I follow the instructions in https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
So far so good. To implement Hamlib I follow the instruction in https://reactivemusic.net/?p=20063
to install Hamlib on my computer. OK so far.
But when i compile Cubic SDR including Hamlib I got the following error, see below.
When I remark line 28 the compilation goes on and CubicSDR is working OK except with the Hamlib rigs...
I hope someone can put me on the right track again...
73's
Rob PA0RWE
Hi,
I'm implementing CubicSDR on my Linux Mint computer.
I follow the instructions in https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
So far so good. To implement Hamlib I follow the instruction in https://reactivemusic.net/?p=20063
to install Hamlib on my computer. OK so far.
But when i compile Cubic SDR including Hamlib I got the following error, see below.
When I remark line 28 the compilation goes on and CubicSDR is working OK except with the Hamlib rigs...
I hope someone can put me on the right track again...
73's
Rob PA0RWE
[ 1%] Building CXX object CMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o
/home/rob/CubicSDR/src/rig/RigThread.cpp: In static member function ‘static RigList& RigThread::enumerate()’:
/home/rob/CubicSDR/src/rig/RigThread.cpp:28:37: error: invalid conversion from ‘int ()(const rig_caps, void)’ to ‘int ()(rig_caps, void)’ [-fpermissive]
28 | rig_list_foreach(RigThread::add_hamlib_rig, nullptr);
| ~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| int ()(const rig_caps, void)
In file included from /home/rob/CubicSDR/src/rig/RigThread.h:8,
from /home/rob/CubicSDR/src/rig/RigThread.cpp:4:
/usr/local/include/hamlib/rig.h:3761:18: note: initializing argument 1 of ‘int rig_list_foreach(int ()(rig_caps, void), void)’
3761 | rig_list_foreach HAMLIB_PARAMS((int (cfunc)(struct rig_caps *, rig_ptr_t),
| ^~~~~~~~~~~~~
Compiler error when compiling CubicSDR with Hamlib included
Thanks Mike for your response.
I already noticed that something was wrong because I didn't see all the rigs with a rigctl --list. I then uninstalled Hamfiles and also deleted any remaining Hamlib files. Then installed it again. After that rigctl worked OK and I could also control my SDR (25011).
However, after compiling CubicSDR I got the same error again. Below I have shown the complete compiler listing after cmake and make. I added the DOpenGL stament but that only removes an OpenGL warning...
Rob, PA0RWE
rob@HP6730:~/CubicSDR/build$cmake../-DOpenGL_GL_PREFERENCE=GLVND-DUSE_HAMLIB=1-DCMAKE_BUILD_TYPE=Release-DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config-- Found hamlib library at: /usr/local/lib/libhamlib.so-- Found hamlib static library at: HAMLIB_STATIC_LIBRARY-NOTFOUND-- Found hamlib static modules: -- Found hamlib include directory at: /usr/local/include64bitcompilerdetectedCMakeWarning(dev)at/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438(message):Thepackagenamepassedto`find_package_handle_standard_args`(LIQUID)doesnotmatchthenameofthecallingpackage(Liquid).Thiscanleadtoproblemsincallingcodethatexpects`find_package`resultvariables(e.g.,`_FOUND`)tofollowacertainpattern.CallStack(mostrecentcallfirst):cmake/Modules/FindLiquid.cmake:20(find_package_handle_standard_args)CMakeLists.txt:172(find_package)Thiswarningisforprojectdevelopers.Use-Wno-devtosuppressit.-- Copying /home/rob/CubicSDR/font/*.fnt to directory /home/rob/CubicSDR/build/x64/fonts-- Configuring file vera_sans_mono12.fnt-- Configuring file vera_sans_mono16.fnt-- Configuring file vera_sans_mono18.fnt-- Configuring file vera_sans_mono24.fnt-- Configuring file vera_sans_mono27.fnt-- Configuring file vera_sans_mono32.fnt-- Configuring file vera_sans_mono36.fnt-- Configuring file vera_sans_mono48.fnt-- Configuring file vera_sans_mono64.fnt-- Configuring file vera_sans_mono72.fnt-- Configuring file vera_sans_mono96.fnt-- Copying /home/rob/CubicSDR/font/*.png to directory /home/rob/CubicSDR/build/x64/fonts-- Configuring file vera_sans_mono12_0.png-- Configuring file vera_sans_mono16_0.png-- Configuring file vera_sans_mono18_0.png-- Configuring file vera_sans_mono24_0.png-- Configuring file vera_sans_mono27_0.png-- Configuring file vera_sans_mono32_0.png-- Configuring file vera_sans_mono36_0.png-- Configuring file vera_sans_mono48_0.png-- Configuring file vera_sans_mono64_0.png-- Configuring file vera_sans_mono72_0.png-- Configuring file vera_sans_mono96_0.png-- Copying /home/rob/CubicSDR/icon/CubicSDR.ico to directory /home/rob/CubicSDR/build/x64-- Configuring file CubicSDR.ico-- Configuring done-- Generating done-- Build files have been written to: /home/rob/CubicSDR/buildrob@HP6730:~/CubicSDR/build$makeConsolidatecompilergenerateddependenciesoftargetCubicSDR[1%]BuildingCXXobjectCMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o/home/rob/CubicSDR/src/rig/RigThread.cpp:Instaticmemberfunction‘staticRigList&RigThread::enumerate()’:/home/rob/CubicSDR/src/rig/RigThread.cpp:28:37:error:invalidconversionfrom‘int(*)(constrig_caps*,void*)’to‘int(*)(rig_caps*,void*)’[-fpermissive]28|rig_list_foreach(RigThread::add_hamlib_rig,nullptr);|~~~~~~~~~~~^~~~~~~~~~~~~~|||int(*)(constrig_caps*,void*)Infileincludedfrom/home/rob/CubicSDR/src/rig/RigThread.h:8,from/home/rob/CubicSDR/src/rig/RigThread.cpp:4:/usr/local/include/hamlib/rig.h:3761:18:note:initializingargument1of‘intrig_list_foreach(int(*)(rig_caps*,void*),void*)’3761|rig_list_foreachHAMLIB_PARAMS((int(*cfunc)(structrig_caps*,rig_ptr_t),|^~~~~~~~~~~~~make[2]:***[CMakeFiles/CubicSDR.dir/build.make:1266:CMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o]Fout1make[1]:***[CMakeFiles/Makefile2:84:CMakeFiles/CubicSDR.dir/all]Fout2make:***[Makefile:136:all]Fout2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Get rid of the "const" in CubicSDR/src/rig/RigThread.h
That was a necessary change in Hamlib to fix another problem -- it's a very minor API change only affecting compilation and easily fixed so I didn't bump up the release number.
Thanks Mike for your response.
I already noticed that something was wrong because I didn't see all the rigs with a rigctl --list. I then uninstalled Hamfiles and also deleted any remaining Hamlib files. Then installed it again. After that rigctl worked OK and I could also control my SDR (25011).
However, after compiling CubicSDR I got the same error again. Below I have shown the complete compiler listing after cmake and make. I added the DOpenGL stament but that only removes an OpenGL warning...
Rob, PA0RWE
rob@HP6730:~/CubicSDR/build$ cmake ../ -DOpenGL_GL_PREFERENCE=GLVND -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
-- Found hamlib library at: /usr/local/lib/libhamlib.so
-- Found hamlib static library at: HAMLIB_STATIC_LIBRARY-NOTFOUND
-- Found hamlib static modules:
-- Found hamlib include directory at: /usr/local/include
64 bit compiler detected
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (LIQUID)
does not match the name of the calling package (Liquid). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/Modules/FindLiquid.cmake:20 (find_package_handle_standard_args)
CMakeLists.txt:172 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
Hi Mike,
Okay that works! After I removed the 'const' in the RigThread.h and .cpp file, the rigs are loaded into CubicSDR. So far so good!
But now the USB connection... When I select Enable Rig I get an I/O error(Open failed). Should I install something like LibUSB?
I use WSJT-X on the same Linux-mint laptop with my SDR and it works fine with USB.
Rob, PA0RWE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sounds like maybe you don't have libusb compiled in with Hamlib.
Are you compiling Hamlib yourself? I would recommend using the latest libusb https://github.com/libusb/libusb
You should be able to see if you have the libraries linked in.
Hi Mike,
Okay that works! After I removed the 'const' in the RigThread.h and .cpp file, the rigs are loaded into CubicSDR. So far so good!
But now the USB connection... When I select Enable Rig I get an I/O error(Open failed). Should I install something like LibUSB?
I use WSJT-X on the same Linux-mint laptop with my SDR and it works fine with USB.
Rob, PA0RWE
Compiler error when compiling CubicSDR with Hamlib included
I had already tried controlling my SDR with rigctl and that went well. I think the problem is in CubicSDR, I already found a few issues on this subject but no solution... https://github.com/cjcliffe/CubicSDR/issues/800
But thanks for your help Mike!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm implementing CubicSDR on my Linux Mint computer.
I follow the instructions in https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
So far so good. To implement Hamlib I follow the instruction in https://reactivemusic.net/?p=20063
to install Hamlib on my computer. OK so far.
But when i compile Cubic SDR including Hamlib I got the following error, see below.
When I remark line 28 the compilation goes on and CubicSDR is working OK except with the Hamlib rigs...
I hope someone can put me on the right track again...
73's
Rob PA0RWE
The instructions at https://reactivemusic.net/?p=20063 missed one point.
Uninstall any hamlib packages first. You have an old rig.h laying around (probably in an installed Hamlib package).
Mike W9MDB
On Tuesday, April 2, 2024 at 08:29:52 AM CDT, Rob Engberts roberto48@users.sourceforge.net wrote:
Hi,
I'm implementing CubicSDR on my Linux Mint computer.
I follow the instructions in https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
So far so good. To implement Hamlib I follow the instruction in https://reactivemusic.net/?p=20063
to install Hamlib on my computer. OK so far.
But when i compile Cubic SDR including Hamlib I got the following error, see below.
When I remark line 28 the compilation goes on and CubicSDR is working OK except with the Hamlib rigs...
I hope someone can put me on the right track again...
73's
Rob PA0RWE
[ 1%] Building CXX object CMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o
/home/rob/CubicSDR/src/rig/RigThread.cpp: In static member function ‘static RigList& RigThread::enumerate()’:
/home/rob/CubicSDR/src/rig/RigThread.cpp:28:37: error: invalid conversion from ‘int ()(const rig_caps, void)’ to ‘int ()(rig_caps, void)’ [-fpermissive]
28 | rig_list_foreach(RigThread::add_hamlib_rig, nullptr);
| ~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| int ()(const rig_caps, void)
In file included from /home/rob/CubicSDR/src/rig/RigThread.h:8,
from /home/rob/CubicSDR/src/rig/RigThread.cpp:4:
/usr/local/include/hamlib/rig.h:3761:18: note: initializing argument 1 of ‘int rig_list_foreach(int ()(rig_caps, void), void)’
3761 | rig_list_foreach HAMLIB_PARAMS((int (cfunc)(struct rig_caps *, rig_ptr_t),
| ^~~~~~~~~~~~~
Compiler error when compiling CubicSDR with Hamlib included
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thanks Mike for your response.
I already noticed that something was wrong because I didn't see all the rigs with a rigctl --list. I then uninstalled Hamfiles and also deleted any remaining Hamlib files. Then installed it again. After that rigctl worked OK and I could also control my SDR (25011).
However, after compiling CubicSDR I got the same error again. Below I have shown the complete compiler listing after cmake and make. I added the DOpenGL stament but that only removes an OpenGL warning...
Rob, PA0RWE
Get rid of the "const" in CubicSDR/src/rig/RigThread.h
That was a necessary change in Hamlib to fix another problem -- it's a very minor API change only affecting compilation and easily fixed so I didn't bump up the release number.
Mike W9MDB
On Thursday, April 4, 2024 at 06:45:58 AM CDT, Rob Engberts roberto48@users.sourceforge.net wrote:
Thanks Mike for your response.
I already noticed that something was wrong because I didn't see all the rigs with a rigctl --list. I then uninstalled Hamfiles and also deleted any remaining Hamlib files. Then installed it again. After that rigctl worked OK and I could also control my SDR (25011).
However, after compiling CubicSDR I got the same error again. Below I have shown the complete compiler listing after cmake and make. I added the DOpenGL stament but that only removes an OpenGL warning...
Rob, PA0RWE
rob@HP6730:~/CubicSDR/build$ cmake ../ -DOpenGL_GL_PREFERENCE=GLVND -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
-- Found hamlib library at: /usr/local/lib/libhamlib.so
-- Found hamlib static library at: HAMLIB_STATIC_LIBRARY-NOTFOUND
-- Found hamlib static modules:
-- Found hamlib include directory at: /usr/local/include
64 bit compiler detected
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to
find_package_handle_standard_args
(LIQUID)does not match the name of the calling package (Liquid). This can lead to
problems in calling code that expects
find_package
result variables(e.g.,
_FOUND
) to follow a certain pattern.Call Stack (most recent call first):
cmake/Modules/FindLiquid.cmake:20 (find_package_handle_standard_args)
CMakeLists.txt:172 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Copying /home/rob/CubicSDR/font/.fnt to directory /home/rob/CubicSDR/build/x64/fonts
-- Configuring file vera_sans_mono12.fnt
-- Configuring file vera_sans_mono16.fnt
-- Configuring file vera_sans_mono18.fnt
-- Configuring file vera_sans_mono24.fnt
-- Configuring file vera_sans_mono27.fnt
-- Configuring file vera_sans_mono32.fnt
-- Configuring file vera_sans_mono36.fnt
-- Configuring file vera_sans_mono48.fnt
-- Configuring file vera_sans_mono64.fnt
-- Configuring file vera_sans_mono72.fnt
-- Configuring file vera_sans_mono96.fnt
-- Copying /home/rob/CubicSDR/font/.png to directory /home/rob/CubicSDR/build/x64/fonts
-- Configuring file vera_sans_mono12_0.png
-- Configuring file vera_sans_mono16_0.png
-- Configuring file vera_sans_mono18_0.png
-- Configuring file vera_sans_mono24_0.png
-- Configuring file vera_sans_mono27_0.png
-- Configuring file vera_sans_mono32_0.png
-- Configuring file vera_sans_mono36_0.png
-- Configuring file vera_sans_mono48_0.png
-- Configuring file vera_sans_mono64_0.png
-- Configuring file vera_sans_mono72_0.png
-- Configuring file vera_sans_mono96_0.png
-- Copying /home/rob/CubicSDR/icon/CubicSDR.ico to directory /home/rob/CubicSDR/build/x64
-- Configuring file CubicSDR.ico
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rob/CubicSDR/build
rob@HP6730:~/CubicSDR/build$ make
Consolidate compiler generated dependencies of target CubicSDR
[ 1%] Building CXX object CMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o
/home/rob/CubicSDR/src/rig/RigThread.cpp: In static member function ‘static RigList& RigThread::enumerate()’:
/home/rob/CubicSDR/src/rig/RigThread.cpp:28:37: error: invalid conversion from ‘int ()(const rig_caps, void)’ to ‘int ()(rig_caps, void)’ [-fpermissive]
28 | rig_list_foreach(RigThread::add_hamlib_rig, nullptr);
| ~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| int ()(const rig_caps, void)
In file included from /home/rob/CubicSDR/src/rig/RigThread.h:8,
from /home/rob/CubicSDR/src/rig/RigThread.cpp:4:
/usr/local/include/hamlib/rig.h:3761:18: note: initializing argument 1 of ‘int rig_list_foreach(int ()(rig_caps, void), void)’
3761 | rig_list_foreach HAMLIB_PARAMS((int (cfunc)(struct rig_caps *, rig_ptr_t),
| ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/CubicSDR.dir/build.make:1266: CMakeFiles/CubicSDR.dir/src/rig/RigThread.cpp.o] Fout 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/CubicSDR.dir/all] Fout 2
make: *** [Makefile:136: all] Fout 2
Compiler error when compiling CubicSDR with Hamlib included
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Hi Mike,
Okay that works! After I removed the 'const' in the RigThread.h and .cpp file, the rigs are loaded into CubicSDR. So far so good!
But now the USB connection... When I select Enable Rig I get an I/O error(Open failed). Should I install something like LibUSB?
I use WSJT-X on the same Linux-mint laptop with my SDR and it works fine with USB.
Rob, PA0RWE
Sounds like maybe you don't have libusb compiled in with Hamlib.
Are you compiling Hamlib yourself? I would recommend using the latest libusb
https://github.com/libusb/libusb
You should be able to see if you have the libraries linked in.
ldd CubicSDR|grep ham
libhamlib.so.4 => /usr/local/lib/libhamlib.so.4 (0x000078de78c00000)
ldd CubicSDR|grep usb
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007bb431c74000)
On Friday, April 5, 2024 at 08:05:18 AM CDT, Rob Engberts roberto48@users.sourceforge.net wrote:
Hi Mike,
Okay that works! After I removed the 'const' in the RigThread.h and .cpp file, the rigs are loaded into CubicSDR. So far so good!
But now the USB connection... When I select Enable Rig I get an I/O error(Open failed). Should I install something like LibUSB?
I use WSJT-X on the same Linux-mint laptop with my SDR and it works fine with USB.
Rob, PA0RWE
Compiler error when compiling CubicSDR with Hamlib included
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Hi Make,
It seems to be OK!
I had already tried controlling my SDR with rigctl and that went well. I think the problem is in CubicSDR, I already found a few issues on this subject but no solution...
https://github.com/cjcliffe/CubicSDR/issues/800
But thanks for your help Mike!