margelo / react-native-filament

🐧 A real-time physically based 3D rendering engine for React Native
https://margelo.github.io/react-native-filament/
MIT License
889 stars 15 forks source link

Error during app build: Multiple commands produce #251

Open JustJoostNL opened 1 month ago

JustJoostNL commented 1 month ago

I installed react-native-filament according the docs, but I receive this error:

Multiple commands produce '/Users/expo/Library/Developer/Xcode/DerivedData/MyApp-ghhktuklewzjozbubcwfbrzgmmoa/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/react_native_filament.framework/Headers/compiler.h'

    duplicate output file '/Users/expo/Library/Developer/Xcode/DerivedData/MyApp-ghhktuklewzjozbubcwfbrzgmmoa/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/react_native_filament.framework/Headers/compiler.h' on task: CpHeader /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-ghhktuklewzjozbubcwfbrzgmmoa/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/react_native_filament.framework/Headers/compiler.h /Users/expo/workingdir/build/node_modules/react-native-filament/ios/libs/filament/include/math/compiler.h (in target 'react-native-filament' from project 'Pods')

Just FYI, I don't use the new architecture.

Thanks in advance for help!

hannojg commented 1 month ago

Are you able to provide a reproduction example? (I tested RNF in another expo app a few days ago and everything was working there)

Seems like filament and expo both have a header file called compiler.h and those are conflicting 🤔

JustJoostNL commented 1 month ago

I will provide a repo with an example soon 🙂

JustJoostNL commented 1 month ago

@hannojg https://github.com/JustJoostNL/rn-filament-example

The app fails building with the above errors from earlier.

hannojg commented 1 month ago

Do you get the build error on iOS or android?

JustJoostNL commented 1 month ago

iOS, didn't test Android yet.

JustJoostNL commented 1 month ago

@hannojg

I've done some more research, and I don't think the issue is on Expo's side here.

/Users/expo/workingdir/build/node_modules/react-native-filament/ios/libs/filament/include/camutils/compiler.h /Users/expo/workingdir/build/node_modules/react-native-filament/ios/libs/filament/include/math/compiler.h

If you look at the paths, you can see that math and camutils both produce an output file with the same name. https://github.com/margelo/react-native-filament/blob/main/package/ios/libs/filament/include/camutils/compiler.h https://github.com/margelo/react-native-filament/blob/main/package/ios/libs/filament/include/math/compiler.h

These are the only libraries that have a compiler.h too. So I guess something has to be changed here?

antochan commented 1 month ago

same issue here