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

Linux Build Targets not working anymore after latest TeamCity 2023.11 Cloud update #91

Open
ManuelRauber opened this issue Dec 10, 2023 · 16 comments

Comments

@ManuelRauber
Copy link

Hi,

I'm using TeamCity Cloud to build my game.

Since the latest release of TeamCity 2023.11 my Unity Linux Targets started to fail with: Error building player because build target was unsupported.

See here: https://boundfoxstudios.teamcity.com/buildConfiguration/FairyTaleDefender_Build_Linux

It has been worked before that said TeamCity update.
Also running an old build that worked before is now failing.

For Linux (and for Windows, which still works), I'm installing IL2CPP support.

The project itself is also open-source and all settings are saved to the repository as well.

Not sure where to look further what I can do, since it may be a TeamCity issue?

@lesley29
Copy link
Member

lesley29 commented Dec 11, 2023

Hey @ManuelRauber!

Regarding our earlier discussion on proper Unity version management, I can now clearly see the issues :)

We've recently aligned Unity versions between Mac and Windows, resulting in a version upgrade for the latest major LTS (2022) on Windows to 2022.3.12f1. This doesn't match the version you are installing the IL2CPP module for (2022.3.2f1). Perhaps, this is causing the issue.

I think it would be great to have this module installed out of the box. What do you think? Also, if you notice a lack of any other modules, please feel free to list them all here.

Just to shed light on the current available modules:
For Windows:

  • android
  • android-sdk-ndk-tools
  • webgl

For MacOS:

  • ios
  • android
  • appletv
  • mac-il2cpp
  • android-sdk-ndk-tools

@ManuelRauber
Copy link
Author

Hey @lesley29,

oh, you're so right!

I've checked the documentation and ... tada, there is the old version mentioned:

image

I've now checked the Agent parameters, and jep, Windows has been updated, my macOS has not been updated:

image

Is there anything I need to do, that the macOS also get's the same version as Windows?

I will do an Engine upgrade later and check back :-)

Thanks for your support @lesley29, I appreciate it!

@ManuelRauber
Copy link
Author

Regarding the modules:
I think having il2cpp ready for all would be nice, so for Windows and Linux as well. :)

@lesley29
Copy link
Member

I've checked the documentation and ... tada, there is the old version mentioned:

Oh, sorry for that oversight. We should restructure and update the information about Unity there soon. Thanks for pointing it out :)

Is there anything I need to do, that the macOS also get's the same version as Windows?

Nope. MacOS agents should be updated soon as well. I'll figure out why the update didn't happen simultaneously for all OSes.

I think having il2cpp ready for all would be nice, so for Windows and Linux as well. :)

Thanks :)
I'll communicate that with the Cloud team, and it'll be available soon. will keep you posted.

@ManuelRauber
Copy link
Author

I've checked the documentation and ... tada, there is the old version mentioned:

Oh, sorry for that oversight. We should restructure and update the information about Unity there soon. Thanks for pointing it out :)

Is there anything I need to do, that the macOS also get's the same version as Windows?

Nope. MacOS agents should be updated soon as well. I'll figure out why the update didn't happen simultaneously for all OSes.

I think having il2cpp ready for all would be nice, so for Windows and Linux as well. :)

Thanks :) I'll communicate that with the Cloud team, and it'll be available soon. will keep you posted.

Hi @lesley29

Is there any news regarding the macOS version? It still has not changed. :)

Also can you point me to a place to ask some questions regarding TeamCity Docker?
I was trying to use GameCI for Linux Build (that may work) and also for Windows Build, but for Windows the Docker Host seems to be too old, because I'm getting this here:

docker: a Windows version 10.0.20348-based image is incompatible with a 10.0.17763 host.

Not sure where I can ask a question when for example the Docker host will be updated etc.
Thanks :)

@lesley29
Copy link
Member

Hey @ManuelRauber!
Thanks for pinging. I've clarified the details with folks from TCC team, and we plan to deliver a big update within this week (we'll also bring Monterey macOS instead of currently present BigSur). We apologize for the delay :(
Regarding Docker host question and any other TeamCity Cloud questions that might arise, I suggest you file a ticket on our YouTrack in the TCC project.

@ManuelRauber
Copy link
Author

Hi @lesley29

Thanks for the update!

No need to apologize for the delay. Some things take time and I hope for the good. :-)

I've managed to build the game again on Linux via Docker using GameCI. Not my preferred way at the moment, but the one that works.

Would still prefer to use TeamCity directly for the Linux build in order to use your Unity features for License Activation etc, because in GameCI I need to do that manually as well.

Tested building Linux on my local Mac and Windows machine, both succeeded, but not on TeamCity.
I will try again as soon as you have published your big updates this week.

Fingers crossed 🤞

@lesley29
Copy link
Member

Hey @ManuelRauber

I'm sorry for the delay with the update, we're still working on polishing a few things before delivering it. I'll let you know immediately when it's done. Thanks for your patience! :)

Would still prefer to use TeamCity directly for the Linux build in order to use your Unity features for License Activation etc, because in GameCI I need to do that manually as well.

Could you let me know what type of license you have? Just a heads up, plugin also supports activating Unity license within a container. Have you given it a try?

@ManuelRauber
Copy link
Author

Hi @lesley29

Thanks for coming back! I was checking on the weekend for the update, so I thought it might take a bit longer. :)

I have a professional license and I used the Unity License Build feature. However, when the container with GameCI run, it did not recognize the license.

Let's wait until your new updates is available, then I'll be happy to test it again. :)

@treggit
Copy link

treggit commented Jan 24, 2024

Hi, @ManuelRauber

I'm happy to announce the Unity update is finally delivered to your instance! The required version is available with a new macOS-12-Monterey-Medium-Monthly agent type. I'd like to encourage you to adopt this agent type instead of Mac-Medium-Monthly, which is based on Big Sur and is going to be deprecated.

I apologise for the delay and appreciate your patience very much! The reason is, macOS agents are currently in the late beta stage in TeamCity Cloud. While the agents are stable for building, our internal processes still require polishing. Let me assure you, we'll do our best to improve this and the future patches will be delivered much faster.

Having said that, we're highly interested in your feedback. Let us know if you have any issues with Unity or any other stuff. As mentioned, it's better to use this YouTrack board for the inquires, related to TeamCity Cloud.

@lesley29
Copy link
Member

Hey @ManuelRauber,

Regarding

I have a professional license and I used the Unity License Build feature. However, when the container with GameCI run, it did not recognize the license.

Could you please create a separate ticket describing your setup and providing more details about the issue when the GameCI container runs?

In the meantime, please let us know if everything works as expected and it's okay to close the current issue. Thanks :)

@ManuelRauber
Copy link
Author

Hi @treggit & @lesley29

Thanks for pinging me!

Also thanks for all the information, I highly appreciate it!

I will check everything over the next days and give you feedback (here in this issue?)

I will close this issue when the actual Linux build issue has been resolved.

For everything else, I will use the linked YouTrack board.

@ManuelRauber
Copy link
Author

Hi @lesley29

Unfortunately, we cannot close this issue. :(

Let's stick to the original issue that building on Linux is not possible (bare-metal, no Docker).

Here is a new run https://boundfoxstudios.teamcity.com/buildConfiguration/FairyTaleDefender_Build_Linux/911?buildTab=log&focusLine=19927&logView=flowAware&linesState=520.20363

TeamCity reports the build itself as successful, but as you can see in the log: it's not! So, we have a false positive here.

Then, the reason it fails is, because it cannot find clang.exe.

The package to run a Linux IL2CPP build under Windows is also configured in the project.

The last working bare-metal Linux build was before TeamCity 2023.11 with Unity 2022.3.2f1.
The original issue came up after the TeamCity Update and therefore an update to Unity 2022.3.12f1.

Building works locally on a Windows machine with a Linux target, so there should not be an issue with the Unity version.

@ManuelRauber
Copy link
Author

@lesley29
Copy link
Member

Hey @ManuelRauber ,

That's interesting. How do you run your build locally? I've tried building your project a couple of times (with il2cpp installed) via the Editor and the command line. The former was mostly successful (though I faced a similar problem 1-2 times), but the latter always failed. I used the following command generated by the Unity plugin

Unity.exe -batchmode -projectPath ./ -nographics -executeMethod BoundfoxStudios.FairyTaleDefender.Editor.Build.GameBuilder.ReleaseBuildLinux -logFile - -quit

Could you please give it a try on a clean project?

So, we have a false positive here.

Regarding the issue with the false positive, I've created a separate ticket TW-86150.

Per your request, I've added some feedback in the form of issues to your YouTrack board 😇

Thanks a lot! Just a small clarification: The TCC project is intended for issues specific to TeamCity cloud functionality in general, such as agents, installed software, and similar infrastructure questions. If there's something wrong with the plugin itself, it's better to use the TW project (or just drop a ticket here on Github :)). It's not important at all, we'll route everything properly in the end - just letting you know :)

@ManuelRauber
Copy link
Author

Hi @lesley29

Hey @ManuelRauber ,

That's interesting. How do you run your build locally? I've tried building your project a couple of times (with il2cpp installed) via the Editor and the command line. The former was mostly successful (though I faced a similar problem 1-2 times), but the latter always failed. I used the following command generated by the Unity plugin

Oh, I usually don't build locally, and let some server handle everything to have it reproducible.
If I need a local build, I build directly from within the editor using the method you're using on command line as well, but I execute it from the editor directly.

For testing, I ran the following command on a freshly cloned repo on MacOS:

/Applications/Unity/Hub/Editor/2022.3.12f1/Unity.app/Contents/MacOS/Unity -batchmode -projectPath ./ -nographics -executeMethod BoundfoxStudios.FairyTaleDefender.Editor.Build.GameBuilder.ReleaseBuildLinux -buildTarget Linux64 -logFile - -quit

Please note, for macOS I had to update the Toolchain package to latest version and I'm using -buildTarget Linux64 to load the project for the Linux platform. Otherwise the first build will fail with a macOS specific error that some header files cannot be found. Subsequent build would work, but with the -buildTarget flag it immediately works.

Because of the -buildTarget flag on macOS, I decided to set this setting in TeamCity as well (I left it blank before, because I thought Unity will do everything when you build for a platform - and it worked like that before), because it potentially suffers from the same "issue" (or misusage?). And jep, now the build works again. Kind of strange. I thought that settings the build target option in code would do the same.

Here is a successful run: https://boundfoxstudios.teamcity.com/buildConfiguration/FairyTaleDefender_Build_Linux/934?hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandBuildDeploymentsSection=true&expandBuildChangesSection=true

I didn't find anything meaningful in Unity's Changelogs or in the TeamCity Build Logs from builds produced before 2023.11 and after that, so I have no idea why this rised up and was "easiliy fixed" with setting the -buildTarget when loading the project.

So I think we can close this issue for now. I will observe the builds and open a new one if something is happening again.

Regarding the issue with the false positive, I've created a separate ticket TW-86150.

Thanks for creating a new issue!

Just a small clarification

Thanks! I will try to do it this way. :) But I hope I don't run into any more issues :)

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

3 participants