kou commented on PR #39098:
URL: https://github.com/apache/arrow/pull/39098#issuecomment-1852726071

   Sorry for not working on this yet...
   
   It seems that this is related to 
https://github.com/llvm/llvm-project/issues/61289 .
   
   I tried the following ad-hoc change on local, the test is passed:
   
   ```diff
   diff --git a/cpp/src/gandiva/engine.cc b/cpp/src/gandiva/engine.cc
   index a36fb05b97..a3903e812e 100644
   --- a/cpp/src/gandiva/engine.cc
   +++ b/cpp/src/gandiva/engine.cc
   @@ -143,6 +143,11 @@ static void AddProcessSymbol(llvm::orc::LLJIT& lljit) {
      lljit.getMainJITDylib().addGenerator(
          
llvm::cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
              lljit.getDataLayout().getGlobalPrefix())));
   +  llvm::orc::SymbolMap symbols;
   +  symbols[lljit.mangleAndIntern("atexit")] = llvm::JITEvaluatedSymbol(
   +      
static_cast<llvm::JITTargetAddress>(reinterpret_cast<uintptr_t>(&atexit)),
   +      llvm::JITSymbolFlags::Exported);
   +  
llvm::cantFail(lljit.getMainJITDylib().define(llvm::orc::absoluteSymbols(symbols)));
    }
    
    static Result<std::unique_ptr<llvm::orc::LLJIT>> BuildJIT(
   ```
   
   I think that this is needed only when:
   * ASAN is enabled (Some additional codes for it may use `atexit()` 
internally?)
   * Old LLVM (I hope that this is already fixed (`atexit()` can be used 
without additional code) in upstream.)
   * `libc` is used


-- 
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]

Reply via email to