-
Notifications
You must be signed in to change notification settings - Fork 46
[Bug] Build this repo failed on windows #557
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @Thaina, I found this community post that talks about an error message similar to the one you're facing. There may be a method in this thread that would be helpful for your implementation such as installing I look forward to your results. If the issue persists, please provide any additional information that could be useful for this investigation (such as your OS version). |
@paulinon I try to see that post and try many things in that post and it seem nothing fix or even related to my case. I can get MSBuild and it was properly in the path. I try to run What I see is this is the main error
I try to manually add the OutputPath into property and it skip this error into another error about CLANG_5_0 instead
This is the file that generated at <?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F3FC6D86-508D-3FB1-96D2-995F08B142EC}</ProjectGuid>
<Keyword>Android</Keyword>
<Platform>x64</Platform>
<ApplicationType>Android</ApplicationType>
<ApplicationTypeRevision>3.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>Clang_5_0</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ItemDefinitionGroup>
<PostBuildEvent>
<Command>echo VCTargetsPath=$(VCTargetsPath)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
</Project> I have Visual Studio 2022 in windows 10. But I mainly use vscode terminal cmd to build this repo, switch to visual studio community cmd still produce the same result |
We have some GitHub runners that build the Unity SDK on windows. Could you answer the following to help narrow down what might be causing the issue? Do you encounter similar errors when trying to build for other platforms, such as windows? Also, since building the Unity SDK from source requires the C++ SDK source to exist as well, have you ever tried to build the C++ SDK? You could try one of the scripts in the firebase-cpp-sdk repo such as |
Thank you for your suggestion. I would try that Build for windows throw difference error. It said it need dotnet 4.5 and after I try to install dotnet 4.5 now it throw error relate to netstandard 2.1 |
Hi @Thaina, Going back to your original post, the first error seems to be that cmake can't find this file:
Does that path exist on your disk? Perhaps it's simply in a different path..? |
@DellaBitta Yes, there is msbuild exist and that path and this error said that it can run msbuild from that path but the error was related to msbuild try to do something with |
Hi @Thaina, I see your point and I apologize for my confusion. This seems to be a fundamental problem with cmake and/or Visual Studio tools. I'm not sure there's anything in this repo which would cause such an error. I did a search on "to get the value of VCTargetsPath:" and there seem to be a lot of results. This one in particular in the cmake forums hints that some versions of Visual Studio Tools have produced this issue in the past. Also the command line environment might be related. Would it be possible for you to uninstall and reinstall Visual Studio tools, or maybe try it on a different development machine? Or do you have another version of the Visual Studio tools available to you? |
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? I have install many version but none of them success. I have use another machine but almost the same vs version have no success Was there any docker build that install every crucial things ? |
I have try to reinstall windows to clean up any old installation library and package. I try to build this library again One problem I would like to remark is there is firebase-unity-sdk/scripts/build_scripts/build_zips.py Lines 431 to 437 in e974dd1
The line 433 I had to change it into currently now there is also warning
But maybe not so important |
The last build have this kind of start and output
Very long
And then end with
This is output files it mention
|
Hi @Thaina , It looks like your build system is missing some tools that are standard on linux but not on Windows, like patch.
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. |
Thank you very much. After install Many files have generated in the |
Ok thanks @Thaina! Looking forward to hearing from you soon. |
I try to generate cmake with vscode and this is the farthest I can push
It seem there is a problem with PATH variable that not configure properly with vs installer. So I try to run cmake generation with visual studio 2019. It has a weird error about ninja
And running python build script have these kind of error
|
As of today I could say there are so many step missing from the prerequisites to build in windows. I need to install many package and configure many path variable. Also need to hack the |
Turn out I need to also add Another crucial problem I got is the path separator that windows have set normally as I need to change many env variable about path into |
Lastly I am stuck with this error when call python build script I am not sure is it related to error from ninja/cmake
|
I have investigate more and it seem we also need Then it seem the library require zlib so I have found it exist in GNUWin32 but then it has a bug that in #if defined(_WIN32)
# include <io.h>
#else
# include <unistd.h> /* for SEEK_* and off_t */
#endif After that it seem the dll are not yet being generated. So I try to run
I have checked the Now there are also many errors related to |
Installing module related to But give this error instead
from this #else
for (std::map<std::string, std::string>::const_iterator it =
libraries.begin(); it != libraries.end(); ++it) {
const std::string& library = it->first;
const std::string& version = it->second;
firebase::App::RegisterLibrary(library.c_str(),
version.c_str(),
nullptr);
}
#endif |
I can build windows platform at last This should be the bug I think firebase-unity-sdk/app/src/swig/app.i Lines 192 to 196 in c03d1cd
|
Also I need to add string(APPEND VAR_REFERENCE " <Reference Include=\"netstandard\" />\n") over this line firebase-unity-sdk/cmake/unity_mono.cmake Lines 277 to 279 in c03d1cd
Or else the project will not build properly |
I'm glad you were able to build in the end, and thanks for all the info about problems that you experienced along the way. |
Uh oh!
There was an error while loading. Please reload this page.
[REQUIRED] Please fill in the following fields:
[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:
The text was updated successfully, but these errors were encountered: