Skip to content

On a case-sensitive filesystem, React Native fails to build #33648

Description

@ackerleytng

Description

Some issues with building yoga were discovered while using expo: expo/expo#16283 but the root cause is in the way the Yoga pod is installed.

The build failure has the error

Use of undeclared identifier 'YGValue`

On a case-sensitive filesystem, the symlinks Yoga-umbrella.h and Yoga.modulemap are created in ios/Pods/Headers/Public/yoga instead of ios/Pods/Headers/Public/Yoga (note the case of yoga), which causes the build failure.

If I change https://github.com/facebook/react-native/blob/main/ReactCommon/yoga/Yoga.podspec#L30 from 'yoga' to 'Yoga', everything builds fine.

Version

0.63.0

Output of npx react-native info

$ npx react-native info                                                                                                                                                                                                                                                                                                                                      info Fetching system and libraries information...
System:
    OS: macOS 12.3
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 883.43 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.11 - ~/.volta/tools/image/node/12.22.11/bin/node
    Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn
    npm: 6.14.16 - ~/.volta/tools/image/node/12.22.11/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/tngacker/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8193401
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.3 => 0.64.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

I believe this happens on multiple versions of react native, see expo/expo#16283

I can follow up again if necessary.

Snack, code example, screenshot, or link to a repository

No response

Activity

  1. ajouve commented on May 5, 2022

    @ajouve

    Same issue for me, any update ?

  2. cortinico commented on May 5, 2022

    @cortinico
    Contributor

    On a case-sensitive filesystem

    Out of curiosity, on which file system are you?

  3. fondue-tech commented on May 16, 2022

    @fondue-tech

    This is still issue.
    @cortinico In my case I have encrypted case sensitive drive (Mac)

  4. emiller commented on May 17, 2022

    @emiller

    Same issue for us (pretty painful timesink). We are working around it by simply having a step after yarn and before pod installs:

    sed -i -e "s/spec.module_name = 'yoga'/spec.module_name = 'Yoga'/g" node_modules/react-native/ReactCommon/yoga/Yoga.podspec
    
  5. kelset commented on Jun 23, 2022

    @kelset
    Contributor

    If I change https://github.com/facebook/react-native/blob/main/ReactCommon/yoga/Yoga.podspec#L30 from 'yoga' to 'Yoga', everything builds fine.

    I'm not sure why noone made a PR to do this fix before now, but I went ahead and made one: #34058 so that at least we can test that it's actually that and there are no other side effects

  6. github-actions commented on Feb 16, 2023

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  7. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Feb 16, 2023
  8. locked as resolved and limited conversation to collaborators on Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions