Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error (GCC 14.2.0 on Linux) #17190

Closed
1 task done
maxaehle opened this issue Dec 4, 2024 · 6 comments · Fixed by #17192
Closed
1 task done

Compiler error (GCC 14.2.0 on Linux) #17190

maxaehle opened this issue Dec 4, 2024 · 6 comments · Fixed by #17192
Labels

Comments

@maxaehle
Copy link

maxaehle commented Dec 4, 2024

Check duplicate issues.

  • Checked for duplicates

Description

Compilation fails

Reproducer

Following the instructions from https://root.cern/install/build_from_source/:

git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git src
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../install ../src
make -j 24

on a Rocky Linux 8.10 system with GCC 14.2.0, GLIBC 2.28, Clang 18.1.8 gives a compiler error

[ 62%] Building CXX object interpreter/llvm-project/llvm/tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCRuntime.cpp.o
CMake Error at /home/aehle/g/build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-.cmake:49 (message):
  Command failed: 2

   'make'

  See also

    /home/aehle/g/build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-*.log

The first error in the log referenced here is

/home/aehle/g/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/aehle/g/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~

Logs:
cmake.log
make.log
DAVIX-build-err.log
DAVIX-build-out.log

ROOT version

commit 1b923a4 (current latest-stable)

Installation method

build from source

Operating system

Rocky linux 8.10 (Green Obsidian)

Additional context

Seems to be related to an old rapidjson bug Tencent/rapidjson#2277 that was fixed in 2016 but there has not been a rapidjson release since. ROOT's version of Davix comes with a copy of rapidjson that contains this bug (reported in cern-fts/davix#130).

@maxaehle maxaehle added the bug label Dec 4, 2024
@dpiparo
Copy link
Member

dpiparo commented Dec 4, 2024

@mpatrascoiu Can this be fixed on the Davix side? It is not really a root issue in a sense.

@andresailer
Copy link
Contributor

cf. cern-fts/davix#129

@andresailer
Copy link
Contributor

Hi @maxaehle

can you try with #17192 ?

@maxaehle
Copy link
Author

maxaehle commented Dec 4, 2024

works, thanks!

@mpatrascoiu
Copy link

mpatrascoiu commented Dec 4, 2024

Hello,

Good to hear confirmation that #17192 works!
I have created an internal ticket for this: DMC-1426.

In the long-term, I see us dropping the rapidjson dependency.
For the short-term, we can apply the changes in cern-fts/davix#129 / cern-fts/davix#130

Cheers,
Mihai

Copy link

github-actions bot commented Dec 5, 2024

Hi @dpiparo,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants