Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++][CI] AppVeyor build is failed by "Non-compatible flatbuffers version included" #40500

Closed
kou opened this issue Mar 13, 2024 · 8 comments
Closed

Comments

@kou
Copy link
Member

kou commented Mar 13, 2024

Describe the bug, including details regarding any error messages, version, and platform.

#40446 may be related.

https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/49371331#L1739

[315/445] Building CXX object src\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx.obj
FAILED: src/arrow/ipc/CMakeFiles/arrow-ipc-read-write-test.dir/Unity/unity_0_cxx.cxx.obj 
C:\Miniconda38-x64\envs\arrow\Library\bin\ccache.exe C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DPROTOBUF_USE_DLLS -DUSE_IMPORT_EXPORT -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -IC:\projects\arrow\cpp\build\src -IC:\projects\arrow\cpp\src -IC:\projects\arrow\cpp\src\generated -external:IC:\Miniconda38-x64\envs\arrow\Library\include -external:IC:\projects\arrow\cpp\thirdparty\flatbuffers\include -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING  /EHsc /wd5105 /bigobj /utf-8 /W3 /wd4800 /wd4996 /wd4065  /WX /MP /MD /Od /UNDEBUG -std:c++17 -MD /showIncludes /Fosrc\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx.obj /Fdsrc\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\ /FS -c C:\projects\arrow\cpp\build\src\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx
C:\projects\arrow\cpp\src\generated/Message_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\Schema_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\SparseTensor_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\Tensor_generated.h(12): error C2338: Non-compatible flatbuffers version included
[316/445] Building CXX object src\arrow\engine\CMakeFiles\arrow_substrait_shared.dir\Unity\unity_1_cxx.cxx.obj
ninja: build stopped: subcommand failed.

Component(s)

C++, Continuous Integration

@jorisvandenbossche
Copy link
Member

The nightly test-build-vcpkg-win build shows the same issue (eg https://github.com/ursacomputing/crossbow/actions/runs/8257464501/job/22588060118)

@pitrou
Copy link
Member

pitrou commented Mar 13, 2024

Hmm, I think we could simply remove flatbuffers from our external dependencies, since we use a vendored version of the header files, and we don't link against the libraries.

@pitrou
Copy link
Member

pitrou commented Mar 13, 2024

It started failing simply because the flatbuffers version on conda-forge was bumped from 23.5.26, which is the version of our vendored header files, to 24.3.27.

24.3.27 was release 5 days ago: https://github.com/google/flatbuffers/releases/tag/v24.3.7

@pitrou
Copy link
Member

pitrou commented Mar 13, 2024

(we can also update our vendored headers and generated files, but there doesn't seem to be a pressing need given the changelog)

kou added a commit to kou/arrow that referenced this issue Mar 14, 2024
Use `arrow::flatbuffers` as the first link library to prioritize
bundled FlatBuffers than system FlatBuffers.
@kou
Copy link
Member Author

kou commented Mar 14, 2024

Thanks for the FlatBuffers' version information. I agree with its related but our build must not be failed even when we have different system FlatBuffers.

@kou
Copy link
Member Author

kou commented Mar 14, 2024

#40521 for vendored FlatBuffers update.

@kou
Copy link
Member Author

kou commented Mar 14, 2024

#40540 for not installing FlatBuffers.

kou added a commit that referenced this issue Mar 14, 2024
### Rationale for this change

We'rebundling FlatBuffers and generated files by FlatBuffers. If we use system FlatBuffers that is different version of bundled one, we got a build error. 

### What changes are included in this PR?

Use `arrow::flatbuffers` as the first link library to prioritize bundled FlatBuffers than system FlatBuffers.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #40500

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 16.0.0 milestone Mar 14, 2024
@kou
Copy link
Member Author

kou commented Mar 14, 2024

Issue resolved by pull request 40519
#40519

@kou kou closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants