facebook / flipper

A desktop debugging platform for mobile developers.
https://fbflipper.com/
MIT License
13.34k stars 954 forks source link

duplicate symbol 'folly::detail::str_to_bool(folly::Range<char const*>*)' .... #3694

Open ErlendFax opened 2 years ago

ErlendFax commented 2 years ago

šŸ› Bug Report

We have a react-native ios app running in a simulator. I want to run Flipper but when trying to config it in the Podfile we get an error.

To Reproduce

  1. cd ios && pod deintegrate && pod cache clean -all && pod install && cd ..
  2. `react-native run-ios``

Error:

āŒ  duplicate symbol 'folly::detail::str_to_bool(folly::Range<char const*>*)' in
> libFlipper-Folly.a(Conv.o)
> libRCT-Folly.a(Conv.o)

āŒ  duplicate symbol 'folly::makeConversionError(folly::ConversionCode, folly::Range<char const*>)' in
> libFlipper-Folly.a(Conv.o)
> libRCT-Folly.a(Conv.o)

āŒ  ld: 2 duplicate symbols for architecture x86_64

āŒ  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment

Flipper Desktop 0.144.0 MacOS: 12.3.1 Cocoapods: 1.11.3 React-Native: 0.68.0

Click here to see Podfile!
``` platform :ios, '11.0' install! 'cocoapods', :deterministic_uuids => false require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' target 'app' do permissions_path = '../node_modules/react-native-permissions/ios' config = use_native_modules! # Flags change depending on the env values. flags = get_default_flags() use_react_native!( :path => config[:reactNativePath], # to enable hermes on iOS, change `false` to `true` and then install pods :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec" pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec" # you should disable the next line. use_flipper!({'Flipper' => '0.144.0'}) #use_flipper!({ "Flipper-DoubleConversion" => "1.1.7" }) target 'appTests' do inherit! :complete # Pods for testing end end post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) flipper_post_install(installer) end ```
marf commented 2 years ago

Same here.

Kirank212 commented 2 years ago

Same for me

ld: warning: duplicate symbol 'folly::detail::str_to_bool(folly::Range<char const>)' in: biepiyhazhylykghzgiyjlucflss/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(Conv.o) biepiyhazhylykghzgiyjlucflss/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(Conv.o) ld: warning: duplicate symbol 'folly::makeConversionError(folly::ConversionCode, folly::Range<char const*>)' in:

ld: warning: method '+UIStatusBarAnimation:' in category from

Gauravs1995 commented 2 years ago

Same here

maluramichael commented 2 years ago

I have the same Problem right now. Had to upgrade our Codebase to react-native 0.68.2. Fixed a couple of other dependencies and now i am stuck at this problem.

duplicate symbol 'folly::detail::str_to_bool(folly::Range<char const*>*)' in:
    /Users/michael/Library/Developer/Xcode/DerivedData/x-cncjbmcqjxponsgsmxfqkpwkriyo/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(Conv.o)
    /Users/michael/Library/Developer/Xcode/DerivedData/x-cncjbmcqjxponsgsmxfqkpwkriyo/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(Conv.o)
duplicate symbol 'folly::makeConversionError(folly::ConversionCode, folly::Range<char const*>)' in:
    /Users/michael/Library/Developer/Xcode/DerivedData/x-cncjbmcqjxponsgsmxfqkpwkriyo/Build/Products/Debug-iphonesimulator/Flipper-Folly/libFlipper-Folly.a(Conv.o)
    /Users/michael/Library/Developer/Xcode/DerivedData/x-cncjbmcqjxponsgsmxfqkpwkriyo/Build/Products/Debug-iphonesimulator/RCT-Folly/libRCT-Folly.a(Conv.o)
ld: 2 duplicate symbols for architecture arm64
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

target 'x' do
    # Comment the next line if you don't want to use dynamic frameworks
    #use_frameworks!

    config = use_native_modules!

    # Flags change depending on the env values.
    flags = get_default_flags()

    use_react_native!(
        :path => config[:reactNativePath],
        # to enable hermes on iOS, change `false` to `true` and then install pods
        :hermes_enabled => flags[:hermes_enabled],
        :fabric_enabled => flags[:fabric_enabled],
        # An absolute path to your application root.
        :app_path => "#{Pod::Config.instance.installation_root}/.."
    )

    pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
    pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
    pod 'react-native-orientation', :path => '../node_modules/react-native-orientation'
    pod 'RNI18n', :path => '../node_modules/react-native-i18n'
    pod 'react-native-sensitive-info', :path => '../node_modules/react-native-sensitive-info'
    pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
    pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
    pod 'RNReactNativeHapticFeedback', :path => '../node_modules/react-native-haptic-feedback'
    pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
    pod 'RCTRestart', :path => '../node_modules/react-native-restart/ios'
    pod 'react-native-geolocation', :path => '../node_modules/@react-native-community/geolocation'
    pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
    pod 'RNSVG', :path => '../node_modules/react-native-svg'
    pod 'lottie-ios', :path => '../node_modules/lottie-ios'
    pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
    pod 'RNScreens', :path => '../node_modules/react-native-screens'
    pod 'RNTouchThroughView', :path => '../node_modules/react-native-touch-through-view'
    pod 'react-native-maps', :path => '../node_modules/react-native-maps'
    pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'
    pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker'
    pod 'RNInAppBrowser', :path => '../node_modules/react-native-inappbrowser-reborn'

    target 'xTests' do
        inherit! :search_paths
        # Pods for testing
    end

    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    #   use_flipper!({ "Flipper-DoubleConversion" => "1.1.7" })
    use_flipper!()

    post_install do |installer|
        react_native_post_install(installer)
        __apply_Xcode_12_5_M1_post_install_workaround(installer)
    end
end
bekatd commented 2 years ago

@maluramichael have you found any solution?

lwmouneyrac commented 2 years ago

same here

cdans commented 2 years ago

Same here :)

Kirank212 commented 2 years ago
Screen Shot 2022-08-30 at 11 01 05 AM

select pods project and Architecture then changing build active architecture only Release to - YES worked for me.

hellforever commented 1 year ago

Same issue here, this issue has been open for half a year

Sassar88 commented 1 year ago

Same issue here RN 0.69.6

AwesomeAndrewMK commented 1 year ago

Guys, this can probably help DEAD_CODE_STRIPPING = YES for debug in project.pbxproj

tungduonghgg123 commented 1 year ago

DEAD_CODE_STRIPPING

it works for me

DutchFrankNL commented 9 months ago

Guys, this can probably help DEAD_CODE_STRIPPING = YES for debug in project.pbxproj

this resolved the issue. It changes the errors into warnings and the build completes