question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Build this repo failed on windows

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2022.1.16f1
  • Firebase Unity SDK version: latest from repo
  • Source you installed the SDK: git repo
  • Problematic Firebase Component: source code
  • Other Firebase Components in use: -
  • Additional SDKs you are using: -
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: -
  • Pre-built SDK from the website or open-source from this repo: This repo

[REQUIRED] Please describe the issue here:

Steps to reproduce:

I just clone this repo and run

python scripts/build_scripts/build_zips.py --platform=android

And it just got error below

Relevant Code:

cmd /C "C:\Python311\python.exe c:\Users\Brothers_Model\.vscode\extensions\ms-python.python-2022.18.2\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher 65148 -- C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk/scripts/build_scripts/build_zips.py --platform=android "
I1201 15:47:22.586176 20768 build_zips.py:307] Use ANDROID_NDK_HOME(C:\Program Files\Unity\Hub\Editor\2022.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK) cmake toolchain(C:\Program Files\Unity\Hub\Editor\2022.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake)
I1201 15:47:22.587175 20768 build_zips.py:779] cmake_setup_args is: cmake C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk -DFIREBASE_INCLUDE_UNITY=ON -DFIREBASE_UNITY_BUILD_TESTS=ON -DFIREBASE_CPP_BUILD_STUB_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=C:\Program Files\Unity\Hub\Editor\2022.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake -DFIREBASE_ANDROID_BUILD=true -DCMAKE_BUILD_TYPE=release -DANDROID_STL=c++_shared
I1201 15:47:22.587175 20768 build_zips.py:781] Build android with multiple architectures armeabi-v7a,arm64-v8a,x86,x86_64
Using Toolchain File: C:\Program Files\Unity\Hub\Editor\2022.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake
-- ANDROID_PLATFORM not set. Defaulting to minimum supported version
16.
CMake Error at CMakeLists.txt:129 (project):
  Failed to run MSBuild command:

    C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe

  to get the value of VCTargetsPath:

    MSBuild version 17.4.0+18d5aef85 for .NET Framework
    Build started 2022-12-01 15:47:22.
    Project "C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk\android_unity\armeabi-v7a\CMakeFiles\3.25.0\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='x64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk\android_unity\armeabi-v7a\CMakeFiles\3.25.0\VCTargetsPath.vcxproj]
    Done Building Project "C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk\android_unity\armeabi-v7a\CMakeFiles\3.25.0\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk\android_unity\armeabi-v7a\CMakeFiles\3.25.0\VCTargetsPath.vcxproj" (default target) (1) ->
    (_CheckForInvalidConfigurationAndPlatform target) ->
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='x64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\Brothers_Model\Documents\git\firebase-unity-sdk\android_unity\armeabi-v7a\CMakeFiles\3.25.0\VCTargetsPath.vcxproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.19


  Exit code: 1



-- Configuring incomplete, errors occurred!
See also "C:/Users/Brothers_Model/Documents/git/firebase-unity-sdk/android_unity/armeabi-v7a/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.
CPack Error: CPack generator not specified

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:31 (28 by maintainers)

github_iconTop GitHub Comments

1reaction
DellaBittacommented, Mar 3, 2023

Hi @Thaina ,

It looks like your build system is missing some tools that are standard on linux but not on Windows, like patch.

'patch' is not recognized as an internal or external command

Usually these tools are installed as part of the Git command line tools for Windows, but you can also install it directly from chocolatey as described here. Alternatively, if you have the git command line tools for windows installed, you can attempt to open a git bash session and see if patch exists in the path there.

1reaction
DellaBittacommented, Jan 9, 2023

Hi @Thaina,

It’s my guess that the problem is a Visual Studio and cmake compatibility problem, considering that the .vcxproj file in question is generated by cmake.

There’s also a chance that the build configuration isn’t supported by the tools installed on your machine. Since the Firebase Unity SDK uses the Firebase C++ SDK implementation, the build that you’re executing will need to cross compile C++ code to ARM when you build the Firebase Unity SDK for Android. I believe you will need the Mobile development for C++ workload as described here.

If so then I would like to know which specific version of vs and vs tools you are using have a chance of success though?

We use GitHub Actions to build the SDK using the windows-latest runner, which resolves to windows-2022. This is technically Windows Server 2022. The GitHub Action runner page lists all of the workloads that that come preinstalled for Visual Studio Enterprise 2022 and many of the workloads denote v17.4.33006.217.

One other thing to check, too. The build script that you executed is attempting to use a cmake toolchain file at this path:

C:\Program Files\Unity\Hub\Editor\2022.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake

Could you make sure that there’s a file there?

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed Builds - Visual Studio App Center
Usually this problem is because of uncommitted files, different tooling, or unrestored dependencies. To check, you can do a full git clone ...
Read more >
Getting error when trying to run make on a github repo ...
Clone the git repository and cd into the project root folder. Then run make to build from source. If you are not on...
Read more >
Cannot link to bug an existing build. Error "Unable ...
According to your description, it seems that the issue could be resolved when you create the build name without that initial blank space....
Read more >
Bug - Build failures due to Plastic SCM connection issue
Hi! All my builds have failed with this error. There seems to be no possibility to set password for the Plastic SCM account...
Read more >
"error: invalid path" during git clone to Windows client
Summary. The Git cloning of repository succeeds on a Linux client but fails on a Windows client with an "invalid path" error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found