niyue commented on PR #38116:
URL: https://github.com/apache/arrow/pull/38116#issuecomment-1774116453

   @kou after adding the new APIs to `FunctionRegistry`, the 
`function_registry.h` now needs to include `<llvm/Support/MemoryBuffer.h>`, and 
this makes `gandiva/configuration.h` and `gandiva/projector.h` to depend on 
`<llvm/Support/MemoryBuffer.h>` as well since they uses `function_registry.h`. 
This makes some CI env failed to build:
   
   
https://github.com/apache/arrow/actions/runs/6604119745/job/17937912954?pr=38116
   ```
   [71/122] Compiling C++ object 
gandiva-glib/libgandiva-glib.so.1400.0.0.p/filter.cpp.o
   FAILED: gandiva-glib/libgandiva-glib.so.1400.0.0.p/filter.cpp.o 
   sccache c++ -Igandiva-glib/libgandiva-glib.so.1400.0.0.p -I. 
-I../../arrow/c_glib -I/usr/local/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=always 
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O0 -g 
-Wmissing-declarations -DARROW_NO_DEPRECATED_API -fPIC -MD -MQ 
gandiva-glib/libgandiva-glib.so.1400.0.0.p/filter.cpp.o -MF 
gandiva-glib/libgandiva-glib.so.1400.0.0.p/filter.cpp.o.d -o 
gandiva-glib/libgandiva-glib.so.1400.0.0.p/filter.cpp.o -c 
../../arrow/c_glib/gandiva-glib/filter.cpp
   In file included from /usr/local/include/gandiva/configuration.h:24,
                    from /usr/local/include/gandiva/filter.h:29,
                    from ../../arrow/c_glib/gandiva-glib/filter.hpp:24,
                    from ../../arrow/c_glib/gandiva-glib/filter.cpp:28:
   /usr/local/include/gandiva/function_registry.h:26:10: fatal error: 
llvm/Support/MemoryBuffer.h: No such file or directory
      26 | #include <llvm/Support/MemoryBuffer.h>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   ```
   
   It seems to me now the gandiva-glib should be linked to LLVM to make the CI 
build passed. Is this understanding correct? Do you think if this is acceptable 
and do you have any idea on addressing this issue? Thanks.
   
   
   `function_registry.h`:
   ```
   #include <llvm/Support/MemoryBuffer.h>
   ....
   /// \brief register a set of functions into the function registry from a 
given bitcode
     /// buffer
     arrow::Status Register(const std::vector<NativeFunction>& funcs,
                            std::unique_ptr<llvm::MemoryBuffer> bitcode_buffer);
   
     /// \brief get a list of LLVM bitcode memory buffers saved in the registry
     const std::vector<std::unique_ptr<llvm::MemoryBuffer>>& 
GetBitcodeBuffers() const;
   ```


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