Skip to content

ACLiC compilation confuses compiled binaries with shared objects, breaking compilation in some cases #7366

@eguiraud

Description

@eguiraud
  • Checked for duplicates

Describe the bug

Building ROOT on Arch Linux and then running ctest -R "(dataframe|datasource)" -- -j8 results in several test failures.
There are various possible failure modes -- the command above typically results in these kind of errors:

1369: Processing /home/jalopezg/CERN/roottest/root/dataframe/test_snapshot.C+...
1369: Info in <TUnixSystem::ACLiC>: creating shared library /home/jalopezg/CERN/build/roottest/root/dataframe/test_snapshot_C.so
1369: /usr/bin/ld: /home/jalopezg/CERN/build/roottest/root/dataframe/test_readFcc: _ZSt4cout: invalid version 6 (max 0)
1369: /usr/bin/ld: /home/jalopezg/CERN/build/roottest/root/dataframe/test_readFcc: error adding symbols: bad value
1369: collect2: error: ld returned 1 exit status
1369: Error in <ACLiC>: Executing 'cd "/home/jalopezg/CERN/build/roottest/root/dataframe" ; c++ -fPIC -c -O3 -DNDEBUG -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -W -Woverloaded-virtual -fsigned-char -pthread  -I$ROOTSYS/include -I/home/jalopezg/CERN/build/roottest/root/dataframe -I"/home/jalopezg/CERN/build/etc/" -I"/home/jalopezg/CERN/build/etc//cling" -I"/home/jalopezg/CERN/build/include/" -I"/home/jalopezg/CERN/build/include" -I"/home/jalopezg/CERN/build/roottest/root/dataframe"   -D__ACLIC__ "/home/jalopezg/CERN/build/roottest/root/dataframe/test_snapshot_C_ACLiC_dict.cxx" ; c++ -O3 -DNDEBUG "/home/jalopezg/CERN/build/roottest/root/dataframe/test_snapshot_C_ACLiC_dict.o" -shared   "/usr/lib/libdl.so" "/usr/lib/libc.so" "/usr/lib/libgcc_s.so" "/usr/lib/libm.so" "/usr/lib/libstdc++.so" "/home/jalopezg/CERN/build/lib/libRint.so" "/home/jalopezg/CERN/build/lib/libCore.so" "/usr/lib/libpthread.so.0" "/usr/lib/libpcre.so.1" "/usr/lib/liblzma.so.5" "/usr/lib/liblz4.so.1" "/usr/lib/libz.so.1" "/usr/lib/libzstd.so.1" "/usr/lib/libnss_files.so.2" "/home/jalopezg/CERN/build/lib/libRIO.so" "/home/jalopezg/CERN/build/lib/libThread.so" "/home/jalopezg/CERN/build/lib/libCling.so" "/usr/lib/librt.so.1" "/usr/lib/libncursesw.so.6" "/usr/lib/ld-2.33.so" "/home/jalopezg/CERN/build/lib/libMathCore.so" "/home/jalopezg/CERN/build/lib/libImt.so" "/home/jalopezg/CERN/build/lib/libMultiProc.so" "/home/jalopezg/CERN/build/lib/libNet.so" "/usr/lib/libtbb.so.2" "/usr/lib/libssl.so.1.1" "/usr/lib/libcrypto.so.1.1" "/usr/lib/libnss_systemd.so.2" -o "/home/jalopezg/CERN/build/roottest/root/dataframe/test_snapshot_C.so" /home/jalopezg/CERN/build/lib/libROOTDataFrame.so /home/jalopezg/CERN/build/lib/libTreePlayer.so /home/jalopezg/CERN/build/lib/libTree.so /home/jalopezg/CERN/build/roottest/root/dataframe/test_readFcc /home/jalopezg/CERN/build/roottest/root/dataframe/par' failed!
1369: terminate called after throwing an instance of 'std::logic_error'
1369:   what():  basic_string::_M_construct null not valid

I did not manage to reproduce the problem outside of ctest and without running multiple tests concurrently -- it also seems that one of the tests "has" to be roottest-root-dataframe-test_snapshot_manytasks.

To Reproduce

The following repository provides a Dockerfile to reproduce the issue in a container https://gitlab.cern.ch/eguiraud/arch_aclic_bug .

Setup

ROOT master (but 6.22 also has issues) and arch linux.

I tried building from source (6.22 and master) as well as installing from the system repos -- failure modes are different but none can run all tests without problems.

Gentoo seems to also be affected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions