Closed ell1e closed 10 months ago
Okay, so I figured it out. Install gcc/g++ 12 (10 is not enough, although you can leave it around) and then for openSUSE, these commands worked for me:
$ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 80
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 80
$ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-12 80
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 80
Hopefully this will help the next person running into this and searching the issues for what's going on. But yeah, you need gcc and g++ version 12 at least, it seems like.
Hi Ellie,
I use Opensuse as well. Haven't come across this.
Are you using Leap? Or Tumbleweed? What version?
I believe your the second person to come across this. I may have to put some in the cmake file for opensuse.
I'll look into it soon.
OpenSUSE Leap, I imagine this is mainly a distribution issue and the best place to fix this might be either 1. in the README, 2. and/or by providing a distribution independent prebuilt binary e.g. via flatpak or via an ELF binary in a .zip here on GitHub to make it a little easier to get started.
But I figured many searching for this problem will just find this ticket, so hopefully that might be a good starting point already for whoever still runs into this.
I might be able to add a check in the Cmakefile to check the g++ version when Qt6 and OpenSuse are used,
Note for myself.
Qt says it needs C++17 for Qt6. I'll see if I can put something in the CMakefile.txt file to insure this. As well as add a comment to the build instructions.
This should be fixed. I added a check in the CMakefile to print a better message if the c++ compiler isn't the right version.
On OpenSuse, I'm getting the following error building v2.2:
I noticed even though gcc/g++ 10 is installed it picks version 7 which I assume is the problem. But neither did I tell the build process to do that, nor do I know how to switch that out. Is there some common approach to fix that? Maybe in that case a note in the README would be useful. (Nevertheless, this is more of a confused question than a bug report, I realize this is mostly my own mistake of whatever kind!)
Edit: okay, I managed to switch the short hand PATH names gcc and g++ to default to version 10, sadly that didn't fix it. I can't tell from the very limited output cmake provides if it's still managing to use version 7, or what specifically is going on. If someone else knows how to solve this mystery, I'd appreciate hints!