Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

[iOS] Build errors in a React Native app #4770

Open
aknad opened this issue May 25, 2023 · 25 comments
Open

[iOS] Build errors in a React Native app #4770

aknad opened this issue May 25, 2023 · 25 comments

Comments

@aknad
Copy link

aknad commented May 25, 2023

🐛 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

@RTGit
Copy link

RTGit commented May 25, 2023

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

@namhihi237
Copy link

The same issue

@KaappoRaivio
Copy link

I'm having the same problem

@namhihi237
Copy link

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

@kabhamo
Copy link

kabhamo commented Jun 3, 2023

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

@bretep
Copy link

bretep commented Jun 14, 2023

Same issue

@bretep
Copy link

bretep commented Jun 14, 2023

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
Copy link

bretep commented Jun 14, 2023

When trying to uninstall...
image

@bretep
Copy link

bretep commented Jun 14, 2023

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
Copy link

bretep commented Jun 14, 2023

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

image

@dimitris4
Copy link

same issue

@chrisariesgonzales
Copy link

same issue(2)

@shanilka-psl
Copy link

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

@huuanhopp
Copy link

same isssue in xcode 15 and react native 0.72.5

@jtdaugh
Copy link

jtdaugh commented Oct 4, 2023

Same issue

1 similar comment
@MKruk1
Copy link

MKruk1 commented Oct 11, 2023

Same issue

@massimilianochiodi
Copy link

SAME ISSUE!

@PaoloSalta
Copy link

Same issue with xCode 15.0.1 and RN 0.72.7

@riamon-v
Copy link

Any news on this ?

@Jashanpreet1998
Copy link

Jashanpreet1998 commented Dec 26, 2023

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

@kekloon97
Copy link

Any update for it?

@EkremBulut01
Copy link

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 ?

@Nicat26
Copy link

Nicat26 commented May 11, 2024

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

@PaoloSalta
Copy link

Same issue with XCode 15.4 and RN 0.73.6

@tanyisi
Copy link

tanyisi commented Jul 3, 2024

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests