Skip to content

Conversation

@olliwang
Copy link

This PR fixes Android compile error due to failing to identify cpu-features.h. Once this PR accepted, I will update the corresponded hunter package.

  % cmake --build Build
  [0/11] Performing build step for 'cryptopp-Release'
  [1/157] Building CXX object CMakeFiles/cryptopp-static.dir/cpu.cpp.o
  FAILED: CMakeFiles/cryptopp-static.dir/cpu.cpp.o 
  /Users/username/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=x86_64-none-linux-android24 --gcc-toolchain=/Users/username/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/username/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot  -I/Users/username/.hunter/_Base/4231132/49e328c/fe0ebc2/Build/cryptopp/Source -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -O2 -DNDEBUG  -fPIC -DCRYPTOPP_DISABLE_MIXED_ASM -DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSSE3 -std=gnu++17 -MD -MT CMakeFiles/cryptopp-static.dir/cpu.cpp.o -MF CMakeFiles/cryptopp-static.dir/cpu.cpp.o.d -o CMakeFiles/cryptopp-static.dir/cpu.cpp.o -c /Users/username/.hunter/_Base/4231132/49e328c/fe0ebc2/Build/cryptopp/Source/cpu.cpp
  /Users/username/.hunter/_Base/4231132/49e328c/fe0ebc2/Build/cryptopp/Source/cpu.cpp:51:11: fatal error: 'cpu-features.h' file not found
  # include "cpu-features.h"
            ^~~~~~~~~~~~~~~~
  1 error generated.
  [16/157] Building CXX object CMakeFiles/cryptopp-static.dir/blake2.cpp.o
  ninja: build stopped: subcommand failed.
  FAILED: cryptopp-Release-prefix/src/cryptopp-Release-stamp/cryptopp-Release-build 
  cd /Users/username/.hunter/_Base/4231132/49e328c/fe0ebc2/Build/cryptopp/Build/cryptopp-Release-prefix/src/cryptopp-Release-build && /Users/username/Library/Android/sdk/cmake/3.18.1/bin/cmake --build . --config Release -- -j16 && /Users/username/Library/Android/sdk/cmake/3.18.1/bin/cmake -E touch /Users/username/.hunter/_Base/4231132/49e328c/fe0ebc2/Build/cryptopp/Build/cryptopp-Release-prefix/src/cryptopp-Release-stamp/cryptopp-Release-build
  ninja: build stopped: subcommand failed.

@NeroBurner
Copy link

These changes look minimal enough to be accepted upstream at https://github.com/weidai11/cryptopp
Could you try to create a PR upstream? Or maybe a newer version has the fix already incorporated? (latest release seems to be 8.6)

@olliwang
Copy link
Author

olliwang commented Nov 29, 2021

These changes look minimal enough to be accepted upstream at https://github.com/weidai11/cryptopp
Could you try to create a PR upstream? Or maybe a newer version has the fix already incorporated? (latest release seems to be 8.6)

It seems that upstream doesn't have the CMakeLists.cmake file. Since NDK requires cmake to work I can only fix the issue in this repository.

@NeroBurner NeroBurner merged commit 6ac7ac4 into cpp-pm:hunter-8.2.0 Nov 29, 2021
@NeroBurner
Copy link

created new tag https://github.com/cpp-pm/cryptopp/releases/tag/v8.2.0-p1 for you to use

@NeroBurner
Copy link

thanks for checking upstream

@olliwang
Copy link
Author

created new tag https://github.com/cpp-pm/cryptopp/releases/tag/v8.2.0-p1 for you to use

Thanks. Just submitted a PR to hunter. cpp-pm/hunter#496

@olliwang
Copy link
Author

olliwang commented Dec 6, 2021

thanks for checking upstream

Hi, I just found that the tag you created is pointing to the old version. Can you fix it? Thanks.

Screen Shot 2021-12-06 at 19 02 57

@NeroBurner
Copy link

sorry about that, should be fixed now

@olliwang
Copy link
Author

olliwang commented Dec 6, 2021

sorry about that, should be fixed now

Thanks for the quick fix. I updated the SHA1 of my corresponded PR for hunter as well. I also tested building cryptopp with NDK 22.1 and the latest NDK 23.1 and they all work fine. Can you help to merge the PR, too? Thanks. cpp-pm/hunter#496

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

Successfully merging this pull request may close these issues.

2 participants