Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Segmentation Fault (Signal 11) During Protobuf Compilation with GCC 9.3.0

33 views
Skip to first unread message

Senthil Kumar

unread,
Sep 24, 2024, 8:25:32 AM9/24/24
to Protocol Buffers

Hello everyone,

I’m encountering a segmentation fault (signal 11) while building Protobuf from source on my Linux system. The error occurs during the linking phase when trying to generate the libprotobuf-lite.so shared object file. I’ve included details below about my setup, the commands I used, and the errors I’m seeing.

System Information:

  • OS: CentoS 7
  • GCC Version: 9.3.0
  • CMake Version: 3.27.7
  • Protobuf Version: 28.2 from GitHub 
Steps to Reproduce:  

=> git clone https://github.com/protocolbuffers/protobuf.git
=> cd protobuf/

=> git checkout v28.2

=> git submodule update --init --recursive
=> mkdir cmake_build

=> cd cmake_build/
=> cmake .. -DABSL_PROPAGATE_CXX_STD=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/home/smahalin/protobuf -DCMAKE_C_COMPILER=/path_to/gcc/9.3.0/bin/gcc -DCMAKE_CXX_COMPILER=/path_to/gcc/9.3.0/bin/g++ -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug

=> make 

  During the build process, I received the following error:  
[ 27%] Linking CXX shared library libprotobuf-lited.so
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [libprotobuf-lited.so.28.2.0] Error 1
make[2]: *** Deleting file `libprotobuf-lited.so.28.2.0'
make[1]: *** [CMakeFiles/libprotobuf-lite.dir/all] Error 2
make: *** [all] Error 2

Reply all
Reply to author
Forward
0 new messages