Unable to compile on Raspberry Pi4 running on Raspberry Pi OS 64 Beta
Compilation fails with several type conversion errors. I'm assuming ARM64 is not supported.
Linux rpi 5.10.60-v8+ #1449 SMP PREEMPT Wed Aug 25 15:01:33 BST 2021 aarch64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
In file included from ../../src/audio/base/DspHost.cpp:1:
../../src/config/DspConfig.h:141:35: error: could not convert ‘variant.QVariant::toFloat(0)’ from ‘float’ to ‘QString’
return variant.toFloat();
~~~~~~~~~~~~~~~^~
../../src/config/DspConfig.h:144:34: error: could not convert ‘variant.QVariant::toBool()’ from ‘bool’ to ‘QString’
return variant.toBool();
~~~~~~~~~~~~~~^~
../../src/config/DspConfig.h: In instantiation of ‘T DspConfig::get(const DspConfig::Key&, bool*) [with T = bool]’:
../../src/audio/base/DspHost.cpp:117:76: required from here
../../src/config/DspConfig.h:129:20: error: cannot convert ‘QVariant’ to ‘bool’ in return
return variant;
^~~~~~~
../../src/config/DspConfig.h:132:51: error: cannot convert ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘bool’ in return
return variant.toString().toStdString();
^
../../src/config/DspConfig.h:135:37: error: cannot convert ‘QString’ to ‘bool’ in return
return variant.toString();
^
../../src/config/DspConfig.h: In instantiation of ‘T DspConfig::get(const DspConfig::Key&, bool*) [with T = int]’:
../../src/audio/base/DspHost.cpp:203:5: required from here
../../src/config/DspConfig.h:129:20: error: cannot convert ‘QVariant’ to ‘int’ in return
return variant;
^~~~~~~
../../src/config/DspConfig.h:132:51: error: cannot convert ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘int’ in return
return variant.toString().toStdString();
^
../../src/config/DspConfig.h:135:37: error: cannot convert ‘QString’ to ‘int’ in return
return variant.toString();
^
../../src/config/DspConfig.h: In instantiation of ‘T DspConfig::get(const DspConfig::Key&, bool*) [with T = QVariant]’:
../../src/audio/base/DspHost.cpp:429:63: required from here
../../src/config/DspConfig.h:132:51: error: could not convert ‘QString::toStdString() const()’ from ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘QVariant’
return variant.toString().toStdString();
^
make[1]: *** [Makefile:1634: DspHost.o] Error 1
make[1]: Leaving directory '/home/pi/JDSP4Linux/build/src'
make: *** [Makefile:97: sub-src-make_first] Error 2
ARM64 (although I only tested 32bit ARM) is generally supported and should compile. I'll check what could cause this when I'm home later.
I also ran into this issue on a jetson (nvidia tregra sbc) when digging through the code there were no definitions for arm64 that causes the errors
I've successfully compiled it on the Raspberry Pi 3 running Debian ARM32 (with Qt 5.15.2). I'll try to set up and test arm64 as well, but I don't think there will be any difference.
There shouldn't be any compilation issues unless one of the dependencies is outdated. If you have installed a Qt version older than 5.12.8, compilation issues are guaranteed.
@ThePBone did anything happen when building for aarch64?
I only had time to switch my existing armv7 installation into aarch64 mode. This switched to the linux kernel compiled for aarch64; however all packages were still compiled for armv7. It did compile successfully, although that doesn't.really prove anything.
I'll need to set up a 'pure' aarch64 environment first, to check whether I can reproduce these compilation issues on aarch64.
I used arch linux with yay to get the GitHub version. I currently can't recreate any logs or build errors due to nvidia breaking the X server
@ThePBone Just curious there any news regarding aarch64?, I got exactly the same error on pinephone pro
@the-cave-dweller I don't know why this happens on some ARM-based devices. Today, someone in our Telegram group managed to compile it on his Pinephone (running ArchLinux on ARM). He didn't run into this issue, as far as I know.
EDIT: Wait, I just noticed that was you 😅
Perhaps the compiler is too old and doesn't support the C++17 standard correctly? Anyway, I pushed a new commit (ed08202) that attempts to fix the compiler error mentioned in this issue. It is possible that more errors are going to pop up, though.
Btw, I can reproduce this issue now; it's not related to the CPU architecture. It was related to an outdated compiler version, as I mentioned earlier. Also, this app now requires C++20 support (=> GCC version 11.0 or later is required now).