Skip to content

Problems with cling 1.1 on linux-aarch64 in conda-forge #550

@h-vetinari

Description

@h-vetinari
  • Checked for duplicates

Describe the bug

We recently reactivated the publication of cling in conda-forge, which was done as of v1.2 based on clang 18. This seems to work well so far, at least there haven't been any issues raised. Now I'd like to also publish clang v1.1 (and ideally v1.0), because not all dependent projects are ready for clang 18 yet.

However, when running the tests in conda-forge/cling-feedstock#64, I get

+ cling '2+3; 0'
 #0 0x0000400001eac3e0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) ($PREFIX/bin/../lib/libLLVM-16.so+0xe433e0)
 #1 0x0000400001ea9c8c SignalHandler(int) Signals.cpp:0:0
 #2 0x00004000010434ec (linux-vdso.so.1+0x4000010434ec)
 #3 0x00004000104ca014 
 #4 0x00007f80f4ee9be8 cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const ($PREFIX/bin/cling+0xae9be8)
 #5 0x00007f80f4f06428 cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) ($PREFIX/bin/cling+0xb06428)
 #6 0x00007f80f4f06d28 cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) ($PREFIX/bin/cling+0xb06d28)
 #7 0x00007f80f4f07144 cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, cling::Value*, cling::Transaction**, bool) ($PREFIX/bin/cling+0xb07144)
 #8 0x00007f80f4f609c4 cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) ($PREFIX/bin/cling+0xb609c4)
 #9 0x00007f80f4dc5080 main ($PREFIX/bin/cling+0x9c5080)
#10 0x000040000934279c __libc_start_call_main (/lib64/libc.so.6+0x2c79c)
#11 0x000040000934286c __libc_start_main@GLIBC_2.17 (/lib64/libc.so.6+0x2c86c)
#12 0x00007f80f4dd1334 _start ($PREFIX/bin/cling+0x9d1334)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: $PREFIX/bin/cling "2+3; 0"
/home/conda/feedstock_root/build_artifacts/cling_1742204232226/test_tmp/run_test.sh: line 8:  2175 Segmentation fault 

I had commented in that PR:

Hey @vgvassilev, sorry for the ping out of the blue. I was wondering if you're aware of any problems on aarch64 before cling 1.2 (where things seem to work fine, c.f. #62). Both v1.1 and v1.0 (#65) run into a segfault on aarch for cling '2+3; 0', while the other architectures are fine (including ppc64le, which - like aarch64 - is cross-compiled and then tested through emulation).

I guess the llvm 13 branch for cling 1.0 isn't being updated anymore, but for cling 1.1, https://github.com/root-project/llvm-project/tree/cling-llvm16-20250207-01 is only slightly over a month old.

I don't mind carrying more patches for clang and/or cling, but I don't know where to start looking (there's >1100 patches with "aarch64" in the title that landed between llvm 16 and llvm 18), so I was hoping people here have a feeling (or even a concrete idea) for what might be going wrong.

Expected behavior

No segfaults

To Reproduce

Build conda-forge recipe in conda-forge/cling-feedstock#64

Setup

cling v1.1, linux, conda-forge

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions