No auxcflags set in root-config when building for riscv64 (6.36.02)


ROOT Version: 6.36.02
Platform: riscv64 Debian 13
Compiler: gcc 14


I’ve successfully built ROOT 6.36.02 for several Debian/Ubuntu platforms (Bookworm/Trixie, Jammy/Noble) on amd64 (and arm64 for Debian only) and proceeded to RISC-V (riscv64, new with Trixie).

I found that subsequent code won’t be able to extract the C++ standard used - in detail, root-config returns “-pthread -I/usr/include/root” for riscv64 while that’s “-pthread -std=c++20 -m64 -I/usr/include/root” for amd64 and “-pthread -std=c++20 -fsigned-char -I/usr/include/root” for arm64.

Inspection of /usr/bin/root-config shows two things:

  • there’s only a generic “linuxriscv64” stanza, no “linuxriscv64gcc” one
  • that doesn’t set “auxcflags”

(the same btw holds for “linuxloong64”.) This is unchanged in 6.36.04, afaict.

Can this be easily patched, or do I have to wait for a new release? (I’d prefer to not add another version to build a huge stack of other codes against.)

Thanks, Steffen

Hello Steffen,

I think for now, the RISC-V line in root-config was simply a small test. I’m not aware of a RISC-V machine that we could test on regularly, so we can’t say that we support it officially.

That being said, if you know what kind of auxflags need to be set, here is the template that generates the script:

We would be very happy to accept pull requests if you figure out the required flags.

A bit related with respect to root-config: https://its.cern.ch/jira/browse/ROOT-6984

As the build succeeded I suppose the “default” flags would be sufficient - ad it’s “just” the ${cxxversionflag} that’s missing.

Since this gets added to almost (exceptions: aix5, hiux, win32*) each and every (known) arch/platform’s auxcflags, why not provide it with new archs all over, even ones in testing state?

Thus,


   auxcflags="${cxxversionflag}"

similar to the defaul setting of auxlibs, would be a good starting point. The PR would be simple but atm I’m lacking access (federated login throw errors at me). I’ll test locally…

Btw, I still don’t get the point of the gcc suffix to some entries while others are lacking it (linuxarm64 vs linuxx8664gcc for example), I’m missing some redundancy here…

--- root-cds-6.36.02.orig/config/root-config.in
+++ root-cds-6.36.02/config/root-config.in
@@ -264,10 +264,12 @@ linuxs390xgcc)
    ;;
 linuxriscv64)
    # RISC-V Linux
+   auxcflags="${cxxversionflag}"
    auxlibs="-lm -ldl -rdynamic"
    ;;
 linuxloong64)
    # loong64 Linux
+   auxcflags="${cxxversionflag}"
    auxlibs="-lm -ldl -rdynamic"
    ;;
 freebsd*)

which I’d consider the least intrusive (but also least informed) change - built on riscv64 (Debian Trixie) allows root-config to return information about the C++ standard used, therefore software built on top of ROOTs to retrieve this information and follow suit. (I’ve included loong64 here because that might be next on my list.)

Hello Steffen,

I thought about it and decided to try setting the flag by default. Almost all architectures need it, anyway. The PR is here:

Before the release of ROOT 6.38, I would recommend to set it manually just as in the diff that you posted above.

Thanks a lot for considering this!