flipper icon indicating copy to clipboard operation
flipper copied to clipboard

[iOS] Build errors in a React Native app

Open aknad opened this issue 2 years ago • 25 comments
trafficstars

🐛 Bug Report

I've a lot of these types of build errors if I integrate Flipper in my RN app:

  • Could not build module 'Darwin'
  • Redefinition of module 'fmt'
  • Could not build module 'CoreFoundation'
Screenshot 2023-05-25 at 12 23 06

I also found an issue in the React Native GitHub, but I think is somehow related to Flipper because if I comment the integration in the Podfile, the errors disappear

To Reproduce

  • add flipper integration in Podfile :flipper_configuration => ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
  • launch 'pod install'
  • Run the app in XCode

Environment

RN - 0.71.7 Flipper - 0.125.0

aknad avatar May 25 '23 10:05 aknad

Screenshot 2023-05-25 at 2 13 43 PM Similar to me, RN - 0.71.7, Flipper - any version. Without a flipper works fine.

RTGit avatar May 25 '23 19:05 RTGit

The same issue

namhihi237 avatar May 26 '23 08:05 namhihi237

I'm having the same problem

KaappoRaivio avatar May 26 '23 20:05 KaappoRaivio

I resolved this by downgrade Xcode from 14.3 to 14.2, Hope can help.

namhihi237 avatar May 27 '23 18:05 namhihi237

@namhihi237 can you tell us what is the version of RN and flipper you are using?

kabhamo avatar Jun 03 '23 01:06 kabhamo

Same issue

bretep avatar Jun 14 '23 15:06 bretep

ios/Pods/Headers/Private/Flipper-Folly/folly/portability/GFlags.h:66:7: error: redefinition of 'FlagSaver'
class FlagSaver {};
      ^
In file included from ios/Pods/Flipper-Folly/folly/io/async/TimeoutManager.cpp:20:
In file included from  ios/Pods/Headers/Public/Flipper-Glog/glog/logging.h:86:
/opt/homebrew/include/gflags/gflags.h:278:23: note: previous definition is here
class GFLAGS_DLL_DECL FlagSaver {
                      ^


bretep avatar Jun 14 '23 15:06 bretep

When trying to uninstall... image

bretep avatar Jun 14 '23 15:06 bretep

When unsetting the CPATH, which includes the libraries in homebrew, Flipper-Glog now complains.

So this confirms the previous error that Flipper-Folly uses a static library whereas Flipper-Glog is using a shared library.

CPATH=/opt/homebrew/include


unset CPATH

ios/Pods/Headers/Public/Flipper-Glog/glog/logging.h:86:10: fatal error: 'gflags/gflags.h' file not found
#include <gflags/gflags.h>

bretep avatar Jun 14 '23 15:06 bretep

After trying many things, I decided to comment out this line, and the build succeeded.

image

bretep avatar Jun 14 '23 16:06 bretep

same issue

dimitris4 avatar Jun 28 '23 20:06 dimitris4

same issue(2)

chrisariesgonzales avatar Jun 30 '23 15:06 chrisariesgonzales

same issue(3) I thought use_framework! was the reason for this. It's not. Disabling the flipper was the only option.

shanilka-psl avatar Sep 27 '23 10:09 shanilka-psl

same isssue in xcode 15 and react native 0.72.5

huuanhopp avatar Oct 04 '23 10:10 huuanhopp

Same issue

jtdaugh avatar Oct 04 '23 15:10 jtdaugh

Same issue

MKruk1 avatar Oct 11 '23 10:10 MKruk1

SAME ISSUE!

massimilianochiodi avatar Nov 27 '23 14:11 massimilianochiodi

Same issue with xCode 15.0.1 and RN 0.72.7

PaoloSalta avatar Nov 30 '23 14:11 PaoloSalta

Any news on this ?

riamon-v avatar Dec 11 '23 14:12 riamon-v

same issue xcode 15.0.0 and RN 0.73.1

  • Flipper (0.201.0):
  • Flipper-Folly (~> 2.6)

working fine when comment this line flipper_configuration => flipper_config

Jashanpreet1998 avatar Dec 26 '23 07:12 Jashanpreet1998

Any update for it?

kekloon97 avatar Jan 18 '24 08:01 kekloon97

same issue xcode 15.0.0 and RN 0.73.1

  • Flipper (0.201.0):
  • Flipper-Folly (~> 2.6)

working fine when comment this line flipper_configuration => flipper_config

Can you share your pod file ?

EkremBulut01 avatar Jan 19 '24 17:01 EkremBulut01

  1. comment this line :flipper_configuration => flipper_config,
  2. cd ios
  3. pod install --repo-update

Nicat26 avatar May 11 '24 10:05 Nicat26

Same issue with XCode 15.4 and RN 0.73.6

PaoloSalta avatar Jul 01 '24 10:07 PaoloSalta

same issue xcode 15.0.0 and RN 0.73.1

  • Flipper (0.201.0):
  • Flipper-Folly (~> 2.6)

working fine when comment this line flipper_configuration => flipper_config

Can you share your pod file ?

@Jashanpreet1998 may i know what is your xcode version?

tanyisi avatar Jul 03 '24 02:07 tanyisi