Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Xcode 16 #316

Closed
tibbe opened this issue Sep 18, 2024 · 12 comments
Closed

Fails to build on Xcode 16 #316

tibbe opened this issue Sep 18, 2024 · 12 comments

Comments

@tibbe
Copy link

tibbe commented Sep 18, 2024

Describe the bug
After upgrading to Xcode 16 the library doesn't seem to build:

    builtin-ScanDependencies -o /Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/RNZipArchive.o.scan -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/tibbe/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/tibbe/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Index.noindex/DataStore @/Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp -GCC_PREPROCESSOR_DEFINITIONS\=HAVE_INTTYPES_H\ HAVE_PKCRYPT\ HAVE_STDINT_H\ HAVE_WZAES\ HAVE_ZLIB\ MZ_ZIP_NO_SIGNING\  -include /Users/tibbe/work/benetics/app/ios/Pods/Target\ Support\ Files/RNZipArchive/RNZipArchive-prefix.pch -MMD -MT dependencies -MF /Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/RNZipArchive.d --serialize-diagnostics /Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/RNZipArchive.dia -c /Users/tibbe/work/benetics/app/node_modules/react-native-zip-archive/ios/RNZipArchive.m -o /Users/tibbe/Library/Developer/Xcode/DerivedData/benetics-dwyvcyxnastihafuyuudjmkkrlue/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/RNZipArchive.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/x86_64/RNZipArchive.o
error: unsupported option '-G' for target 'x86_64-apple-ios13.4-simulator' (in target 'RNZipArchive' from project 'Pods')

The issue might be similar to invertase/react-native-firebase#8020.

To Reproduce
Steps to reproduce the behavior:

  1. Depend on this library from a RN project.
  2. Try to build project with Xcode 16.

Expected behavior
No compilation error.

Env (please complete the following information):

  • Device: MacBook Pro (iOS simulator in Xcode)
  • OS: macOS
  • OS Version: Sonoma 14.6.1
  • Package Version: 6.1.0

Additional context
Add any other context about the problem here.

@tibbe
Copy link
Author

tibbe commented Sep 18, 2024

Removing react-native-zip-archive from the dependencies of my (large) project fixes the compilation issues and thus provides further evidence that there's a problem here.

@mikehardy
Copy link

@tibbe you mentioned in the react-native-firebase issue that there was perhaps a problem with messaging as well?
I am unaware of a problem with messaging but wanted to confirm with you that you have things compiling now before I hide that comment.

I'm only aware of the need to:

  • bump the firebase-ios-sdk (either with patch to @react-native-firebase/app/package.json or with a an override https://rnfirebase.io/#ios)
  • patch @react-native-firebase/firestore to remove the transitive dep on nanopb (assuming you use firestore)
  • patch @react-native-firebase/crashlytics to remove dependencies param from init provider (assuming you use crashlytics)

I'm not aware of anything with messaging at the moment ?

@tibbe
Copy link
Author

tibbe commented Sep 18, 2024

@tibbe you mentioned in the react-native-firebase issue that there was perhaps a problem with messaging as well?
I am unaware of a problem with messaging but wanted to confirm with you that you have things compiling now before I hide that comment.

I'm only aware of the need to:

  • bump the firebase-ios-sdk (either with patch to @react-native-firebase/app/package.json or with a an override https://rnfirebase.io/#ios)
  • patch @react-native-firebase/firestore to remove the transitive dep on nanopb (assuming you use firestore)
  • patch @react-native-firebase/crashlytics to remove dependencies param from init provider (assuming you use crashlytics)

I'm not aware of anything with messaging at the moment ?

I managed to get it to compile by cleaning/recompiling harder so no issue with messaging I believe.

@mikehardy
Copy link

Great, thanks for replying, I'm going to hide that comment then to make the issue as easy to digest for people that need the workaround since build breaks are typically "panic mode" for people, but hiding the comment isn't "with prejudice" or anything. I think we've got the full set of workarounds in there but if you see anything else that is a build break obviously + please post it up. Cheers

@tibbe
Copy link
Author

tibbe commented Sep 19, 2024

It's not clear to me where '-G' sneaks in. When I do my react native build there's a very long list of EXPORT statements logged somewhere near the top of the build output and one of these contains GCC_WARN_INHIBIT_ALL_WARNINGS. I'm not sure how it gets there. That identifier isn't anywhere in my code base and I can't find it in react-native-zip-archive's either.

@kptp
Copy link

kptp commented Sep 19, 2024

I had the same issue. I think this is due to the GCC_PREPROCESSOR_DEFINITIONS compiler flags that was removed in the latest 7.0.1 version. It was removed in this commit: 9ea6406 If you are using version 6.1.0, it is still in the pod spec.

Note that updating to 7.0.1 might require you to raise the minimum iOS version to 15.5 as per this repos README.md.

@ankitjpk
Copy link

@kptp Do you think upgrading to 7.0.1 will resolve this issue?

@kptp
Copy link

kptp commented Sep 19, 2024

@ankitjpk I think it is worth trying, if you are able to upgrade it. The release note specifically mentions the XCode 16 issue: https://github.com/mockingbot/react-native-zip-archive/releases/tag/v7.0.1

@ankitjpk
Copy link

ankitjpk commented Sep 19, 2024

@kptp
Upgrading it causes Invalid react-native-config.podspec file: undefined method visionos' for #<Pod::Specification name="react-native-config">`. for this reason I stopped at 6.1.0 strict.

@kptp
Copy link

kptp commented Sep 19, 2024

@ankitjpk Are you using the react-native-config library? It sounds like an issue with that library, but I don't know anything about it

@mgroeneweg
Copy link

I had the same on XCode 16 with an app build that works just fine on XCode 15. Updating to 7.0.1 fixed the issue for me.

@plrthink
Copy link
Collaborator

So for forks facing this issue, as mentioned before, please upgrade to the v7.0.1, if it is still not working, it's better to clear your pod.lock, and run pod install again.

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

No branches or pull requests

6 participants