Fail to build under GCC15
While Debian has not yet shifted to gcc15 for its build framework, they are starting testing in Experimental.
Currently XCA fails to build against GCC15 which defaults to and enforces C23/C++23 standards which seem to expose build errors.
This link is to the current build logs on Debian Experimental when builds run against GCC15. http://qa-logs.debian.net/2025/02/16/amd64exp/xca_2.8.0-1_unstable_gccexp.log.gz
Note upcoming Trixie release of Debian is not impacted but later releases will be.
My https://github.com/chris2511/xca/blob/29f8d7dc8f32e62c33877695223eab89a7289417/CMakeLists.txt#L60 enforces C++17
The error is always the same for many different xca cpp files: multiple definition of QtPrivate::IsFloatType_v<_Float16>'`
Maybe a missing include ....
@chris2511 any chance you can dig? Because this is using the same Debian build process that worked until GCC15 was in place. If there's a missing include, you'd know where it is. This may also be GCC15 specific/related. (The Debian builds use the tagged releases and tarballs here to get the source code)
Just to check, by setting CMAKE_CXX_STANDARD 17, would that be the same as --std=c++17 in the command line options for build options? (Not as fluent with C/C++ as I am other languages, so just checking)
Just to check, by setting CMAKE_CXX_STANDARD 17, would that be the same as --std=c++17 in the command line options for build options?
Yes: https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html
any chance you can dig?
I tried and I successfully compiled xca in a debian:unstable docker container (which identifies itself as trixie):
root@b24d1499245c:~/xca# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
root@b24d1499245c:~/xca# apt show qt6-base-dev
Package: qt6-base-dev
Version: 6.8.2+dfsg-5+b1
root@b24d1499245c:~/xca# gcc --version
gcc (Debian 14.2.0-17) 14.2.0
root@ffde55fbb718:/# apt install gcc-15
Error: Unable to locate package gcc-15
Please tell me how to get a debian image with gcc-15
Sorry about being late to the party, just happened to notice this.
You'd need to explicitly enable the experimental suite in the sources first. In other words, something like:
root@c5515f8892a0:/# sed -i -e 's/^Suites: unstable/Suites: unstable experimental/' /etc/apt/sources.list.d/debian.sources
root@c5515f8892a0:/# apt update
Hit:1 http://deb.debian.org/debian unstable InRelease
Hit:2 http://deb.debian.org/debian experimental InRelease
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
after which gcc-15 and so on can be installed by setting the target release for the apt invocation to experimental:
root@c5515f8892a0:/# apt -t=experimental install gcc-15 g++-15
The following package was automatically installed and is no longer required:
gcc-14-base
Use 'apt autoremove' to remove it.
Upgrading:
libc-bin libc6 libgcc-s1 libstdc++6
Installing:
g++-15 gcc-15
Installing dependencies:
binutils binutils-gold-x86-64-linux-gnu cpp-15-x86-64-linux-gnu gcc-15-x86-64-linux-gnu libbinutils libcc1-0 libctf0 libgprofng0 libitm1 libmpc3 libsframe1 libubsan1 manpages-dev
binutils-common binutils-x86-64-linux-gnu g++-15-x86-64-linux-gnu libasan8 libc-dev-bin libcrypt-dev libgcc-15-dev libhwasan0 libjansson4 libmpfr6 libstdc++-15-dev linux-libc-dev rpcsvc-proto
binutils-gold cpp-15 gcc-15-base libatomic1 libc6-dev libctf-nobfd0 libgomp1 libisl23 liblsan0 libquadmath0 libtsan2 manpages
Suggested packages:
binutils-doc gprofng-gui gcc-15-locales cpp-15-doc g++-15-multilib gcc-15-doc gcc-15-multilib libc-devtools glibc-doc libstdc++-15-doc man-browser
Summary:
Upgrading: 4, Installing: 40, Removing: 0, Not Upgrading: 14
Download size: 312 MB
Space needed: 1315 MB / 278 GB available
Continue? [Y/n]