You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android libraries fail to build on macOS case-insensitive filesystem when using a release/pre-release version.
android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/limits includes version at line 121.
The root folder, which contains a file named VERSION is added as an include path via -I..
The case insensitivity on the macOS filesystem, makes the compiler think that VERSION, which resides in the root folder, is the file that should be included.
To reproduce:
wget https://github.com/libsdl-org/SDL/releases/download/prerelease-2.25.1/SDL2-2.25.1.zip
unzip SDL2-2.25.1.zip
cd SDL2-2.25.1
./build-scripts/androidbuildlibs.sh V=1
Logs:
[armeabi-v7a] Compile++ thumb: SDL2 <= hid.cpp
rm -f build/android/obj/local/armeabi-v7a/objs/SDL2/src/hidapi/android/hid.o
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -MMD -MP -MF build/android/obj/local/armeabi-v7a/objs/SDL2/src/hidapi/android/hid.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -mthumb -Oz -DNDEBUG -I./include -I/Users/mirko/.buildozer/android/platform/android-ndk-r25/sources/android/cpufeatures -I. -DANDROID -DGL_GLEXT_PROTOTYPES -Wall -Wextra -Wdocumentation -Wdocumentation-unknown-command -Wmissing-prototypes -Wunreachable-code-break -Wunneeded-internal-declaration -Wmissing-variable-declarations -Wfloat-conversion -Wshorten-64-to-32 -Wunreachable-code-return -Wshift-sign-overflow -Wstrict-prototypes -Wkeyword-macro -Wno-unused-parameter -Wno-sign-compare -Wformat -Werror=format-security -c ./src/hidapi/android/hid.cpp -o build/android/obj/local/armeabi-v7a/objs/SDL2/src/hidapi/android/hid.o
In file included from ./src/hidapi/android/hid.cpp:21:
In file included from ./src/hidapi/android/../../SDL_internal.h:123:
In file included from ./include/SDL_assert.h:25:
In file included from ./include/SDL_stdinc.h:46:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/stdlib.h:100:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:311:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/type_traits:417:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/cstddef:37:
./version:1:1: error: unknown type name 'prerelease'
prerelease-2.25.1-0-g78ea6af2c
^
./version:1:11: error: expected unqualified-id
prerelease-2.25.1-0-g78ea6af2c
^
In file included from ./src/hidapi/android/hid.cpp:21:
In file included from ./src/hidapi/android/../../SDL_internal.h:123:
In file included from ./include/SDL_assert.h:25:
In file included from ./include/SDL_stdinc.h:46:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/stdlib.h:100:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:311:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/type_traits:418:
./version:1:1: error: unknown type name 'prerelease'
prerelease-2.25.1-0-g78ea6af2c
^
./version:1:11: error: expected unqualified-id
prerelease-2.25.1-0-g78ea6af2c
^
In file included from ./src/hidapi/android/hid.cpp:21:
In file included from ./src/hidapi/android/../../SDL_internal.h:123:
In file included from ./include/SDL_assert.h:25:
In file included from ./include/SDL_stdinc.h:46:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/stdlib.h:100:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:312:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/limits:121:
./version:1:1: error: unknown type name 'prerelease'
prerelease-2.25.1-0-g78ea6af2c
^
./version:1:11: error: expected unqualified-id
prerelease-2.25.1-0-g78ea6af2c
^
In file included from ./src/hidapi/android/hid.cpp:21:
In file included from ./src/hidapi/android/../../SDL_internal.h:123:
In file included from ./include/SDL_assert.h:25:
In file included from ./include/SDL_stdinc.h:46:
In file included from /Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/stdlib.h:100:
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:1377:93: error: no member named 'log2f' in the global namespace
inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return ::log2f(__lcpp_x);}
~~^
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:1378:93: error: no member named 'log2l' in the global namespace
inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
~~^
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:1383:38: error: call to 'log2' is ambiguous
log2(_A1 __lcpp_x) _NOEXCEPT {return ::log2((double)__lcpp_x);}
^~~~~~
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:1377:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return ::log2f(__lcpp_x);}
^
/Users/mirko/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/math.h:1378:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
^
9 errors generated.
make: *** [/Users/mirko/.buildozer/android/platform/android-ndk-r25/build/core/build-binary.mk:424: build/android/obj/local/armeabi-v7a/objs/SDL2/src/hidapi/android/hid.o] Error 1
The text was updated successfully, but these errors were encountered:
Android libraries fail to build on macOS case-insensitive filesystem when using a release/pre-release version.
android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/limits
includesversion
at line121
.The root folder, which contains a file named
VERSION
is added as an include path via-I.
.The case insensitivity on the macOS filesystem, makes the compiler think that
VERSION
, which resides in the root folder, is the file that should be included.To reproduce:
Logs:
The text was updated successfully, but these errors were encountered: