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

build with vcpkg for ARM64:Android is getting errors #134

Closed
vlovch01 opened this issue Jun 10, 2021 · 3 comments
Closed

build with vcpkg for ARM64:Android is getting errors #134

vlovch01 opened this issue Jun 10, 2021 · 3 comments

Comments

@vlovch01
Copy link

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();
}

@poletti-marco
Copy link
Contributor

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

@poletti-marco
Copy link
Contributor

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).

@vlovch01
Copy link
Author

vcpkg.exe install fruit:arm64-android

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

No branches or pull requests

2 participants