본문 바로가기

카테고리 없음

CompileC fail 에러

문제 상황

RN을 처음 시작하며,  yarn react-native run-ios 를 실행시켜봤다. 그리고는 다음과 같은 에러를 만났다.

 

The following build commands failed: CompileC /Users/Library/Developer/Xcode/DerivedData/apps-bahatcgtvijnqphadwcgmvidwcjr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/work/wehuddle/coding_test/apps/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

해결 과정

일단 뭔가 에러 코드도 없고, 에러 상황도 모르겠어서 바로 구글링을 했다. 그 결과 다음사이트를 찾았다.

stackoverflow.com/questions/66062663/react-native-npx-react-native-run-ios-doesnt-work-after-initializing-the-proj/66130332#66130332

 

React Native - npx react-native run-ios doesn't work after initializing the project

After reading https://reactnative.dev/docs/environment-setup, I created a react-natie project using npx react-native init ***. It was successful, so, I tried to run the project using npx react-nati...

stackoverflow.com

여기서 시키는 대로 pod file을 수정했다.

  1. 기존 PodFile 20번 라인

 

use_flipper!

 

 2. 변경한 Podfile 20번 라인

 

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

 

그리고는 댓글에 달린 말에 따라 PodFile.lock 파일을 지운 뒤,  pod install 명령어를 수행했다. 그러자 아주 잘 되었다.

 

Installing CocoaLibEvent (1.0.0)
Installing Flipper-Folly 2.3.0 (was 2.5.1)
Installing Flipper-RSocket 1.1.1 (was 1.3.0)
Installing OpenSSL-Universal 1.0.2.20 (was 1.1.180)
Removing libevent
Generating Pods project
Integrating client project
Pod installation complete! There are 47 dependencies from the Podfile and 38 total pods installed.

 

이후  yarn react-native run-ios  명령어를 입력하자, 앱 컴파일 및 번들이 끝났다.

동작 결과


Filpper?

조금 검색을 해보니, 모바일 어플을 디버그 할 수 있게 만들어 주는 도구였다. 아래는 Flipper의 공식 사이트이다.

fbflipper.com/

 

Extensible mobile app debugger | Flipper

Tools Mobile development Flipper aims to be your number one companion for mobile app development on iOS and Android. Therefore, we provide a bunch of useful tools including a log viewer, interactive layout inspector, and network inspector. Learn more Plugi

fbflipper.com

Flipper-Folly?

조금 찾아 보니 다음 사이트를 찾을 수 있었다. 

cocoapods.org/pods/Flipper-Folly

 

Flipper-Folly

An open-source C++ library developed and used at Facebook.

cocoapods.org

처음에는 folly만 말하길래 뭔가 했다. Folly 는 facebook에서 개발한 확장에 용이한 C++ 모듈을 모아놓은 라이브러리이다.

Flipper의 정의에서 보건데, Filpper-Folly는 Folly를 사용한 Filpper같다.