티스토리 뷰
한국어는 아래에
I faced a below error, while I was building my C++ project with CMake(Which contains proto buffer as a dependency)
[libprotobuf FATAL google/protobuf/generated_message_util.cc:794] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
Technically, the error occurred by Makefiles.
Without further ado, You could fix this error simply by appending
a "-pthread" to your CMAKE_CXX_FLAGS that is written in your CMakeLists.txt likes a below example.
SET(CMAKE_CXX_FLAGS "-g -Wall -pthread -Werror -Wno-dev -std=c++11")
You don't need to care about other flags, "-pthread" plays important role to handle this issue.
proto buffer를 dependency로 사용하는 프로젝트를 빌드하면서 아래와 같은 build issue 가 발생했습니다,
[libprotobuf FATAL google/protobuf/generated_message_util.cc:794] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
엄밀히 말하면, Makefile 과정에서 난 오류겠지만.
어쨌든, CMake에 CMAKE_CXX_FLAGS 에 -pthread를 덧붙여주면 됩니다.
SET(CMAKE_CXX_FLAGS "-g -Wall -pthread -Werror -Wno-dev -std=c++
다른 플래그들은 신경쓸 필요 없고, -pthread가 핵심입니다.
- Total
- Today
- Yesterday
- 14714 공부법 어플리케이션
- CMake for
- buffer-over-flow
- 14714 어플리케이션
- CMake probouf
- 함수포인터 오버라이트
- function pointer overflow
- aws 청구문의
- CMake get_filename_Component
- 복습 계획어플
- CMake run protoc
- review reminder
- CMAke 파일이름 추출
- 14714 앱
- 토리파 공부법
- react-native
- CMake get file name
- 14714 어플
- 14714 공부법
- 복습 어플
- CMake run proto compiler
- 14714 플래너
- get_filename_component
- aws 프리티어 요금청구
- 14714 review
- CMake 반복문
- CMake for문
- CMake 기초
- 14714 복습법
- CMake 강좌
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |