react-native-gesture-handler
react-native-gesture-handler copied to clipboard
error building on windows due to long paths
Task :react-native-gesture-handler:buildNdkBuildDebug[arm64-v8a][rngesturehandler_modules] C/C++: C:/android-ndk-r21e/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find C:\Cliqueon\node_modules\react-native-gesture-handler\android\build\intermediates\cxx\Debug\3x5p2864/obj/local/arm64-v8a/objs-debug/rngesturehandler_modules/C_/Cliqueon/node_modules/react-native-gesture-handler/android/src/main/jni/RNGestureHandlerComponentsRegistry.o: No such file or directory C/C++: clang++: error: linker command failed with exit code 1 (use -v to see invocation) C/C++: make: *** [C:/android-ndk-r21e/build//../build/core/build-binary.mk:725: C:\Cliqueon\node_modules\react-native-gesture-handler\android\build\intermediates\cxx\Debug\3x5p2864/obj/local/arm64-v8a/librngesturehandler_modules.so] Error
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Description, Platforms, Steps To Reproduce, Snack or minimal code example and Package versions sections.
check out Fix building RN with new architecture on Windows boxes by using relative paths for C++ sources https://github.com/facebook/react-native/pull/33784 this technique was used for react native to fix long path limitation on windows
Hi @aleluiah, could you check if the above PR solves the issue for you?
@j-piasecki Hi, I tried to add NDK_APP_SHORT_COMMANDS to android/build.gradle as you suggested in PR, it still resulted with same behavior with current issue.
then I tried solution like in react-native PR #33784 it solved the problem
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(GENERATED_SRC_DIR)/codegen/jni
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(GENERATED_SRC_DIR)/codegen/jni
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Great that you solved the problem! In the meantime, we've replaced NDK with CMake in the Gesture Handler 2.6.0. It would be great if you could check if it works for you out of the box.
Great that you solved the problem! In the meantime, we've replaced NDK with CMake in the Gesture Handler 2.6.0. It would be great if you could check if it works for you out of the box.
Yes, its working without long-path issue in windows
Great! In that case I believe the issue is solved.