Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Installation on Oracle Linux 8

64 views
Skip to first unread message

Nate Carlson

unread,
Mar 11, 2025, 2:33:17 PMMar 11
to Protocol Buffers
Hello,

I've been trying to install Protobuf on Oracle Linux 8 for a few days with no luck. I'm using GCC 12. I have abseil and protobuf installed, and protoc works correctly, but another project will not link. Does anyone have any CMake linking suggestions?

installation:
git clone https://github.com/abseil/abseil-cpp.git
cd abseil-cpp
git checkout lts_2024_07_22
mkdir build
cd build
cmake ..
cmake --build . -j 20
cmake --install .
cd ../..
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git checkout v5.29.3
mkdir build
cd build
cmake -Dprotobuf_BUILD_TESTS=OFF ..
cmake --build . -j 20
cmake --install .

cmake:
find_package(absl REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
target_include_directories(protocols PRIVATE
${Protobuf_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(protocols PUBLIC
${Protobuf_LIBRARIES}
)

Nate Carlson

unread,
Mar 11, 2025, 3:31:15 PMMar 11
to Protocol Buffers
I accidentally hit Post. the linker prints about 1000 lines of errors, but they mostly look like these:
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: extension_set.cc:(.text+0xf9a9): undefined reference to `absl::lts_20250127::log_internal::LogMessageFatal::~LogMessageFatal()'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: extension_set.cc:(.text+0xf9e1): undefined reference to `absl::lts_20250127::log_internal::LogMessageFatal::~LogMessageFatal()'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /usr/local/lib64/libprotobuf.a(extension_set.cc.o): in function `google::protobuf::internal::ExtensionSet::InternalInsertIntoLargeMap(int)':
extension_set.cc:(.text+0xfbff): undefined reference to `absl::lts_20250127::log_internal::LogMessageFatal::LogMessageFatal(char const*, int, char const*)'

Adam Cozzette

unread,
Mar 14, 2025, 5:44:59 PMMar 14
to Nate Carlson, Protocol Buffers
It looks like CMake is trying to link against a different Abseil installation from the one you built. I see you built the 2024-07-22 LTS but the linker error messages mention 2025-01-27. I wonder if maybe you have a broken 2025-01-27 Abseil installation on your system?
Reply all
Reply to author
Forward
0 new messages