SillyBoyenjoy opened a new issue, #2025:
URL: https://github.com/apache/incubator-brpc/issues/2025
**Describe the bug (描述bug)**
请问为什么我用cmake编译example里echo_c++里的echo_server进程启动即Segmentation fault:
11,但是直接用Makefile的make编译正常?
**Versions (各种版本)**
OS:macOS Monterey 12.2.1
Compiler:Clang
brpc:1.3.0
protobuf:3.17.3
cmake version 3.21.3
**Additional context/screenshots (更多上下文/截图)**
MacBook-Pro:echo_c++ sillyboyenjoy$ cmake -B build && cmake --build build &&
./build/echo_server
CMake Deprecation Warning at CMakeLists.txt:18 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler:
/Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler:
/Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Protobuf: /opt/homebrew/lib/libprotobuf.dylib (found version
"3.17.3")
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- CMAKE_CXX_FLAGS: -DGFLAGS_NS=google -DNDEBUG -O2 -D__const__=__unused__
-pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer
-Wno-deprecated-declarations -Wno-inconsistent-missing-override
-- CMAKE_CXX_COMPILER_ID:Clang
-- Found OpenSSL: /opt/homebrew/Cellar/openssl@3/3.0.0/lib/libcrypto.dylib
(found version "3.0.0")
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/sillyboyenjoy/Project/incubator-brpc/example/echo_c++/build
[ 12%] Running cpp protocol buffer compiler on echo.proto
[ 25%] Building CXX object CMakeFiles/echo_server.dir/server.cpp.o
[ 37%] Building CXX object CMakeFiles/echo_server.dir/echo.pb.cc.o
[ 50%] Linking CXX executable echo_server
[ 50%] Built target echo_server
[ 62%] Building CXX object CMakeFiles/echo_client.dir/client.cpp.o
[ 75%] Building CXX object CMakeFiles/echo_client.dir/echo.pb.cc.o
[ 87%] Linking CXX executable echo_client
[100%] Built target echo_client
Segmentation fault: 11
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]