lriggs opened a new issue, #55505: URL: https://github.com/apache/arrow/issues/55505
### Describe the bug, including details regarding any error messages, version, and platform. An incorrect target machine setting leads to an undefined function reference in LLVM resulting in a crash. LLVM's default host triple names the OS "darwin<kernel version>", but LLVM only enables macOS libcalls (e.g. __exp10 for llvm.exp10) for the "macosx" OS. High level RCA: ROUND(c0, scale) on a double compiles to the Gandiva function round_float64_int32. For scale < 20 it reads a lookup table. For any other scale it calls llvm.exp10. LLVM (http://llvm.org/): LLVM version 21.1.8 Optimized build. TRIPLE RESULT arm64-apple-darwin27.2.0 FAIL (no libcall available for fexp10) arm64-apple-darwin FAIL (no libcall available for fexp10) arm64-apple-macosx26.0.0 OK (___exp10) arm64-apple-macosx11.0.0 OK (___exp10) x86_64-apple-darwin19.0.0 FAIL (no libcall available for fexp10) x86_64-apple-macosx10.15.0 OK (___exp10) Gandiva (engine.cc:149-150, ...MakeTargetMachineBuilder( const Configuration& conf)) calls getDefaultTargetTriple() [LLVM: Support/TargetParser] -> llvm::Triple [LLVM: TargetParser/Triple.cpp] -> JITTargetMachineBuilder / TargetMachine [Gandiva builds it (engine.cc:146-244); class is LLVM: ExecutionEngine/Orc + Target/AArch64] -> RuntimeLibcallsInfo [LLVM: IR/RuntimeLibcalls.cpp] -> darwinHasExp10(TT) [LLVM: IR/RuntimeLibcalls.cpp, the decision] -> LegalizeDAG [LLVM: CodeGen/SelectionDAG/LegalizeDAG.cpp:2136, the failure] ### Component(s) C++, Gandiva -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
