-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
protobuf: Update to the latest version #25194
Comments
It introduced a new dependency, abseil, openwrt doen't have this |
I managed to compile protobuf, I will submit a pull request as soon as I can |
Yeah I also did it, just need to get a copy abseil and place it under index 7e60e8498..9cb94b726 100644
--- a/libs/protobuf/Makefile
+++ b/libs/protobuf/Makefile
@@ -8,19 +8,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
-PKG_VERSION:=3.17.3
-PKG_RELEASE:=2
+PKG_VERSION:=28.3
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=51cec99f108b83422b7af1170afd7aeb2dd77d2bcbb7b6bad1f92509e9ccf8cb
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/protocolbuffers/protobuf/releases/download/v$(PKG_VERSION)
+PKG_HASH:=7c3ebd7aaedd86fa5dc479a0fda803f602caaf78d8aff7ce83b89e1b8ae7442a
PKG_MAINTAINER:=Ken Keys <[email protected]>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:google:protobuf
-CMAKE_SOURCE_SUBDIR:=cmake
+# CMAKE_SOURCE_SUBDIR:=cmake
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk |
You don't need that, protobuff automatically pulls, compiles and installs abseil, I can share the makefile in a pull request later today, I'd appreciate your input 😁 |
How about separating abseil-cpp dependency from protobuf ? , this will make version pinning and updating easier without dependent to each other :
I suggest to use protobuf version 25.3 or 26.0 as version above it is not supported by protobuf-c Above Makefile changes has been tested by compiling frr and netdata v2.0.0. |
You managed to compile netdata 2.0? 😲 |
I fixed the patch for protobuf 28.3, if anyone needs it
Might need refreshing if you are updating to a different version --- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -35,8 +35,8 @@ endif ()
foreach(_library ${_protobuf_libraries})
if (UNIX AND NOT APPLE)
- set_property(TARGET ${_library}
- PROPERTY INSTALL_RPATH "$ORIGIN")
+ # set_property(TARGET ${_library}
+ # PROPERTY INSTALL_RPATH "$ORIGIN")
elseif (APPLE)
set_property(TARGET ${_library}
PROPERTY INSTALL_RPATH "@loader_path")
@@ -62,8 +62,8 @@ if (protobuf_BUILD_PROTOC_BINARIES)
endif ()
foreach (binary IN LISTS _protobuf_binaries)
if (UNIX AND NOT APPLE)
- set_property(TARGET ${binary}
- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+ # set_property(TARGET ${binary}
+ # PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
set_property(TARGET ${binary}
PROPERTY INSTALL_RPATH "@loader_path/../lib") |
@tiagogaspar8 About your post on that PR, i am not encountering the same thing on glibc. You could open up protobuf PR based on my finding if you want. Here is the rough draft for netdata 2.0 package and libs package : The netdata 2.0 package from me is different, it using cmake build system instead. |
@tiagogaspar8 [EDIT] Stuck with :
Even tough I have set LD_LIBRARY_PATH [EDIT#2] Need to add the following to protobuf Makefile :
|
Hey @vortexilation, I was trying your suggestion but it's not working, and now I noticed you mentioned it's working for you when targeting x86/64, could you try your setup targeting another arch besides x86?
Thanks! |
@tiagogaspar8 Could you try to locate "ld-musl-aarch64.so.1" in your staging_dir directory?. I assume it's on $(STAGING_DIR_ROOT)/lib ?. [EDIT]
|
Tried it but no luck unfortunately 😢 |
I think it failed to run protoc successfully because of could not found ld-musl-aarch64.so.1 dependency. Where do you put the line ?
|
BTW, forgot to say I found the mentioned lib in
Yes, I just thought it was looking for it in the wrong place because the error states it's looking for it in the /lib, which for me means root filesystem of the building host, am I wrong?
I put it above the CMAKE_OPTIONS as in your makefile |
Yes that's exactly what $(STAGING_DIR_ROOT)/lib is.
Yes, you are correct, the netdata build system is not also looking at the OpenWrt toolchain, $(STAGING_DIR_ROOT)/lib , which is ld-musl-aarch64.so.1 located. Btw what is your target device? |
The device I'm currently building for is Gl.inet MT6000, Mediatek Filogic. |
Yes, my build is succeed (NXP i.MX8M), even with latest netdata 2.0.3. Changes :
Netdata Makefile :
|
My solution with export LD_LIBRARY_PATH=$(STAGING_DIR_ROOT)/lib is wrong for aarch64 cross-compiling, it should be fixed with protoc binary which build for host (x86_64) not current protoc binary (/mnt/openwrt/ss_mod/staging_dir/target-aarch64_cortex-a53_musl/usr/bin/protoc-28.3.0) which build for aarch64, my latest changes above should fixes it up. protoc for host (x86_64) need to be re-build with :
Note : The new protoc for host (x86_64) will exist at /mnt/openwrt/ss_mod/staging_dir/hostpkg/bin directory. |
Good news! after some testing, I managed to compile! |
Glad that you can build it.
This is happening when running the netdata? Regarding separate abseil-cpp, If i am not mistaken it was about a package failed to compile if using bundled abseil-cpp, but I cannot recall exactly which package is it. About protobuf, I suggest to keep it with version 25.3, as above 26.0 will make libprotobuf-c problematic when compiling it. |
Yes, when installed on my router and trying to claim the agent in netdata cloud with the token.
If you remember let me know so I can find it and troubleshoot it
I'll keep it in version 25 for now, but I'll push it to 25.5, which is the latest bugfix release. |
Haven't tested netdata thoroughly , I don't experiencing it in here x86_64, maybe you could try to upgrade OpenSSL lib. There are quite a lot of package depending on protobuf-c , for protobuf 25.3 supports in protobuf-c you need this specific branch. |
Node 22.11.0 seems has issue with bundled abseil-cpp from protobuf 25.3. |
Maintainer: Ken Keys [email protected] @kenkeys
Environment: All
Description:
The protobuf package is extremely out of date. I have tried to update it but unfortunately, I don't have enough knowledge to do it myself, and as I'm trying to update the netdata package, it needs the latest version.
The text was updated successfully, but these errors were encountered: