google / fruit

Fruit, a dependency injection framework for C++

Home Page:https://github.com/google/fruit/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build with vcpkg for ARM64:Android is getting errors

vlovch01 opened this issue · comments

Please advice for below error:

Performing C++ SOURCE FILE Test FRUIT_HAS_CLANG_ARBITRARY_OVERLOAD_RESOLUTION_BUG failed with the following output:
Change Dir: /vcpkg/buildtrees/fruit/arm64-android-dbg/CMakeFiles/CMakeTmp

Run Build Command(s):/vcpkg/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_d4084 && [1/2] Building CXX object CMakeFiles/cmTC_d4084.dir/src.cxx.o

FAILED: CMakeFiles/cmTC_d4084.dir/src.cxx.o

android-ndk-r22b-windows-x86_64\android-ndk-r22b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=/core/external/tools/download/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFRUIT_HAS_CLANG_ARBITRARY_OVERLOAD_RESOLUTION_BUG -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -O0 -fno-limit-debug-info -std=c++11 -W -Wall -Wno-unknown-warning-option -Wno-missing-braces -fPIE -MD -MT CMakeFiles/cmTC_d4084.dir/src.cxx.o -MF CMakeFiles\cmTC_d4084.dir\src.cxx.o.d -o CMakeFiles/cmTC_d4084.dir/src.cxx.o -c src.cxx

src.cxx:11:3: error: no matching function for call to 'f'

f((Map*)0);

^

src.cxx:8:7: note: candidate template ignored: failed template argument deduction

Value f(Pair<int, Value>*) { return Value(); }

  ^

1 error generated.

ninja: build stopped: subcommand failed.

Source file was:

template <typename T, typename U>
struct Pair {};

struct Map : public Pair<int, float>, Pair<int, char> {};

template
Value f(Pair<int, Value>*) { return Value(); }

int main() {
f((Map*)0);
}

Performing C++ SOURCE FILE Test FRUIT_HAS_DECLSPEC_DEPRECATED failed with the following output:
Change Dir: /vcpkg/buildtrees/fruit/arm64-android-dbg/CMakeFiles/CMakeTmp

Run Build Command(s):/vcpkg/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_6f62d && [1/2] Building CXX object CMakeFiles/cmTC_6f62d.dir/src.cxx.o

FAILED: CMakeFiles/cmTC_6f62d.dir/src.cxx.o

android-ndk-r22b-windows-x86_64\android-ndk-r22b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFRUIT_HAS_DECLSPEC_DEPRECATED -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -O0 -fno-limit-debug-info -std=c++11 -W -Wall -Wno-unknown-warning-option -Wno-missing-braces -fPIE -MD -MT CMakeFiles/cmTC_6f62d.dir/src.cxx.o -MF CMakeFiles\cmTC_6f62d.dir\src.cxx.o.d -o CMakeFiles/cmTC_6f62d.dir/src.cxx.o -c src.cxx

src.cxx:2:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes

__declspec(deprecated) void f();

^

1 error generated.

ninja: build stopped: subcommand failed.

Source file was:

__declspec(deprecated) void f();

int main() {
return 0;
}

Performing C++ SOURCE FILE Test FRUIT_HAS_MSVC_ASSUME failed with the following output:
Change Dir: /vcpkg/buildtrees/fruit/arm64-android-dbg/CMakeFiles/CMakeTmp

Run Build Command(s):/vcpkg/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_0fc71 && [1/2] Building CXX object CMakeFiles/cmTC_0fc71.dir/src.cxx.o

FAILED: CMakeFiles/cmTC_0fc71.dir/src.cxx.o

android-ndk-r22b-windows-x86_64\android-ndk-r22b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=/external/tools/download/android-ndk-r22b-windows-x86_64/android-ndk-r22b/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DFRUIT_HAS_MSVC_ASSUME -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fPIC -O0 -fno-limit-debug-info -std=c++11 -W -Wall -Wno-unknown-warning-option -Wno-missing-braces -fPIE -MD -MT CMakeFiles/cmTC_0fc71.dir/src.cxx.o -MF CMakeFiles\cmTC_0fc71.dir\src.cxx.o.d -o CMakeFiles/cmTC_0fc71.dir/src.cxx.o -c src.cxx

src.cxx:7:5: error: use of undeclared identifier '__assume'

__assume(0);

^

1 error generated.

ninja: build stopped: subcommand failed.

Source file was:

int f() {
static int x = 1;
if (x == 1) {
return 0;
} else {
__assume(0);
// Note: the lack of return here is intentional
}
}

int main() {
return f();
}

Hi, can you please explain step by step how can I reproduce the error?
Then I can take a look.

Oh, I found this:

https://github.com/google/fruit/wiki/install#with-vcpkg-on-windows-not-officially-supported

Please file a bug against vcpkg instead.
I imagine the steps to reproduce will be useful to them too (unless for ppl familiar with vcpkg it's obvious).

vcpkg.exe install fruit:arm64-android