Skip to content

cmake build failed #18

Closed
Closed

Description

@myweak
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fvp:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using /Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/womo/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=16 -DANDROID_PLATFORM=android-16 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/womo/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/womo/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/womo/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/womo/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/womo/news_app/build/fvp/intermediates/cxx/Debug/6t1v4n5x/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/womo/news_app/build/fvp/intermediates/cxx/Debug/6t1v4n5x/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -B/Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android/.cxx/Debug/6t1v4n5x/arm64-v8a -GNinja -DANDROID_STL=c++_shared}
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/womo/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring incomplete, errors occurred!
  See also "/Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android/.cxx/Debug/6t1v4n5x/arm64-v8a/CMakeFiles/CMakeOutput.log".

  CMake Error at CMakeLists.txt:67 (include):
    include could not find load file:

      /Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android/mdk-sdk/lib/cmake/FindMDK.cmake
2

  CMake Error at CMakeLists.txt:74 (get_filename_component):
    get_filename_component called with incorrect number of arguments
4

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
Exception: Gradle task assembleDebug failed with exit code 1
[!] Flutter (Channel stable, 3.10.6, on macOS 13.4 22F66 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.10.6 on channel stable at /Users/womo/Documents/flutter/flutter
    ! Warning: `flutter` on your path resolves to /Users/womo/Documents/flutter/flutter_likeU/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/womo/Documents/flutter/flutter. Consider adding /Users/womo/Documents/flutter/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/womo/Documents/flutter/flutter_likeU/bin/dart, which is not inside your current Flutter SDK checkout at /Users/womo/Documents/flutter/flutter. Consider adding /Users/womo/Documents/flutter/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (6 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/womo/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • Pixel 2 XL (mobile) • 803KPPB1657976 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)     • macos          • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)        • chrome         • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
exit code 0

Activity

  1. wang-bin commented on Aug 23, 2023

    @wang-bin
    Owner

    add a line before execute_process https://github.com/wang-bin/fvp/blob/master/android/CMakeLists.txt#L57

    if(NOT EXISTS ${MDK_SDK_SAVE})
        message("Downloading mdk-sdk from ${MDK_SDK_URL}")
        file(DOWNLOAD ${MDK_SDK_URL} ${MDK_SDK_SAVE} SHOW_PROGRESS)
      endif()
      message("extract mdk-sdk")  # ADD THIS LINE
      execute_process(
    

    then show me the output again.

    Does /Users/womo/.pub-cache/hosted/pub.dev/fvp-0.2.1/android/mdk-sdk-android.7z exist?

  2. AnonymHK commented on Aug 23, 2023

    @AnonymHK

    His question should also be the same as mine, mdk sdk android.7z is empty when downloaded back!

  3. wang-bin commented on Aug 23, 2023

    @wang-bin
    Owner

    #17 (comment)

    i need to see the log. are you in china? you may need a vpn to download.

  4. abdelaziz-mahdy commented on Aug 24, 2023

    @abdelaziz-mahdy
    Contributor

    #17 (comment)

    i need to see the log. are you in china? you may need a vpn to download.

    do you think its a good idea to set GitHub releases and get the archives from it? or there is a limitation to it?

    maybe as a fallback?

  5. wang-bin commented on Aug 24, 2023

    @wang-bin
    Owner

    #17 (comment)
    i need to see the log. are you in china? you may need a vpn to download.

    do you think its a good idea to set GitHub releases and get the archives from it? or there is a limitation to it?

    maybe as a fallback?

    A fallback is a good idea. But I still need the log to known the STATUS value when download failed.

  6. abdelaziz-mahdy commented on Aug 24, 2023

    @abdelaziz-mahdy
    Contributor

    #17 (comment)
    i need to see the log. are you in china? you may need a vpn to download.

    do you think its a good idea to set GitHub releases and get the archives from it? or there is a limitation to it?
    maybe as a fallback?

    A fallback is a good idea. But I still need the log to known the STATUS value when download failed.

    yes i dont mind the logs to keep track of what happens, can a check for md5 or sha256 be added or you think it will be a not needed work?

  7. wang-bin commented on Aug 24, 2023

    @wang-bin
    Owner

    #17 (comment)
    i need to see the log. are you in china? you may need a vpn to download.

    do you think its a good idea to set GitHub releases and get the archives from it? or there is a limitation to it?
    maybe as a fallback?

    A fallback is a good idea. But I still need the log to known the STATUS value when download failed.

    yes i dont mind the logs to keep track of what happens, can a check for md5 or sha256 be added or you think it will be a not needed work?

    i upload sdk to the same url, so the content changes, md5 is not an option

  8. iamv4g commented on Sep 5, 2023

    @iamv4g

    @wang-bin
    I added line message("extract mdk-sdk") and saw it logged
    Screenshot 2023-09-05 at 14 17 22

  9. iamv4g commented on Sep 5, 2023

    @iamv4g

    This is full log

    [CXX1405] error when building with cmake using /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/CMakeLists.txt: -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring incomplete, errors occurred!
    See also "/Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/.cxx/Debug/3zb46495/arm64-v8a/CMakeFiles/CMakeOutput.log".
    
    C++ build system [configure] failed while executing:
        /Users/tastech-sakura/Library/Android/sdk/cmake/3.18.1/bin/cmake \
          -H/Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android \
          -DCMAKE_SYSTEM_NAME=Android \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_SYSTEM_VERSION=16 \
          -DANDROID_PLATFORM=android-16 \
          -DANDROID_ABI=arm64-v8a \
          -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
          -DANDROID_NDK=/Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620 \
          -DCMAKE_ANDROID_NDK=/Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620 \
          -DCMAKE_TOOLCHAIN_FILE=/Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \
          -DCMAKE_MAKE_PROGRAM=/Users/tastech-sakura/Library/Android/sdk/cmake/3.18.1/bin/ninja \
          -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/tastech-sakura/Sakura/Dev/triptube/trimo/build/fvp/intermediates/cxx/Debug/3zb46495/obj/arm64-v8a \
          -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/tastech-sakura/Sakura/Dev/triptube/trimo/build/fvp/intermediates/cxx/Debug/3zb46495/obj/arm64-v8a \
          -DCMAKE_BUILD_TYPE=Debug \
          -B/Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/.cxx/Debug/3zb46495/arm64-v8a \
          -GNinja \
          -DANDROID_STL=c++_shared
      from /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android
    CMake Warning at /Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
      An old version of CMake is being used that cannot automatically detect
      compiler attributes.  Compiler identification is being bypassed.  Some
      values may be wrong or missing.  Update to CMake 3.19 or newer to use
      CMake's built-in compiler identification.
    Call Stack (most recent call first):
      /Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
      /Users/tastech-sakura/Library/Android/sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
      CMakeLists.txt:8 (project)
    
    
    CMake Warning at /Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
      An old version of CMake is being used that cannot automatically detect
      compiler attributes.  Compiler identification is being bypassed.  Some
      values may be wrong or missing.  Update to CMake 3.19 or newer to use
      CMake's built-in compiler identification.
    Call Stack (most recent call first):
      /Users/tastech-sakura/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
      /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/.cxx/Debug/3zb46495/arm64-v8a/CMakeFiles/3.18.1-g262b901/CMakeSystem.cmake:6 (include)
      /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/.cxx/Debug/3zb46495/arm64-v8a/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
    
    
    ------------->extract mdk-sdk
    CMake Error: Problem with archive_read_next_header(): 
    CMake Error: Problem extracting tar: /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android/mdk-sdk-android.7z
    CMake Error at CMakeLists.txt:65 (message):
      Failed to extract mdk-sdk.  You can download manually from
      https://sourceforge.net/projects/mdk-sdk/files/nightly/mdk-sdk-android.7z
      and extract to
      /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android
    
  10. wang-bin commented on Sep 5, 2023

    @wang-bin
    Owner

    You can download manually from
    https://sourceforge.net/projects/mdk-sdk/files/nightly/mdk-sdk-android.7z
    and extract to
    /Users/tastech-sakura/.pub-cache/hosted/pub.dev/fvp-0.4.0/android

  11. iamv4g commented on Sep 5, 2023

    @iamv4g

    Yes. I download manually then fvp build success.
    I think maybe this problem is related to timeout when dowload mdk-sdk-android.7z

  12. wang-bin commented on Oct 5, 2023

    @wang-bin
    Owner

    Will download again when rebuilding your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions