Open hellysmile opened 4 years ago
I looked around a little and it looks like it's a common problem with Python binary distributions (and libprotobuf in general) to randomly collapse when the same library is loaded more than once.
The best advice that I've found in these cases is to compile both modules from scratch making sure that they use the same version of the shared protobuf library.
That'd be the first thing I would try, but it might be unfeasible in this situation.
Thanks a lot for quick answer, as for now going to use optional libprotobuf in https://github.com/claws/aioprometheus/pull/42 , which solves my specific case, but not problem in general
i met the same case,do you solves the problem?
@noirello could you list the versions of libprotobuf used to build the pypi wheels? Following the chain in setup.py suggests pyorc 0.4.0 -> ORC 1.6.6 -> protobuf 3.5.1
, but protobuf 3.5.1 is four years old at this point and seems unlikely to have been used to build the wheels.
@skearnes that looks correct. I use the same version that the ORC lib uses. They're still using 3.5.1 for 1.7.0 as well.
I just discovered that pyarrow has an (undocumented) ORC writer that uses Cython and doesn't seem to have the same conflicts: https://github.com/apache/arrow/blob/master/python/pyarrow/orc.py
Hi @noirello I have raised https://github.com/apache/orc/issues/1425 to see if we can get some consistency in the version of protobuf used in Apache orc & the version used in Apache arrow. However, would you be open to patching
deps/orc-1.8.1/cmake_modules/ThirdpartyToolchain.cmake
such that the version set it 21.3
as part of the build process ?
--- deps/orc-1.8.1/cmake_modules/ThirdpartyToolchain.cmake.orig 2023-03-01 01:54:15
+++ deps/orc-1.8.1/cmake_modules/ThirdpartyToolchain.cmake 2023-03-01 01:53:50
@@ -14,7 +14,7 @@
set(SNAPPY_VERSION "1.1.7")
set(ZLIB_VERSION "1.2.11")
set(GTEST_VERSION "1.8.0")
-set(PROTOBUF_VERSION "3.5.1")
+set(PROTOBUF_VERSION "21.3")
set(ZSTD_VERSION "1.5.2")
option(ORC_PREFER_STATIC_PROTOBUF "Prefer static protobuf library, if available" ON)
TBH, I'm kind of lost about this issue. I'm not sure how Apache Arrow solved it to avoid collision with other protobuf using modules. I'll try to look into it a little bit more.
Hey @noirello, thanks for the awesome lib
I have found an issue, which is really hard to debug:
will fail in two different ways randomly
Is there any chance that You will be able to take a look on it?