Author Topic: Windows nightly build error.  (Read 2982 times)

0 Members and 1 Guest are viewing this topic.

Offline DrSuperGood

Windows nightly build error.
« on: September 05, 2014, 04:12:49 AM »
Some people might have noticed that the Windows nightly build has not been working for nearly 3 months now. Over the course of this time several bugs have been fixed, including some which were in RC120. One can still build a Windows version manually using the Windows SDK and a C++ compiler however this requires some computer knowhow which is probably beyond the majority of people who just want to play the game (not developers).

The error appeared to be introduced when changes were made to try and introduce a better font/typeface system. These only apply to the Windows build (compiler switch) with those sections doing nothing for OSX and Linux. The specific cause is that a new include dependency "Shlobj.h" was added (usually included with the Windows SDK) which is not available on the nightly build server. It appears to provide shell functionality which includes fetching type faces.

This raises a few questions as to why this particular header is not on the build server. Is it because the build server uses a different Windows SDK (which does not include that header)? Or is the SDK used just the minimum to allow for compilation and requires updating with new dependencies?

If it is only available in some Windows SDKs (I know it is in the official Microsoft one) then maybe a compiler switch could be used. Alternatively it might be worth reverting the commit until a solution to it is found to allow automatic Windows nightly builds as the more people who can test them, the more likely bugs are to be found.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Windows nightly build error.
« Reply #1 on: September 05, 2014, 04:58:28 AM »
The build server doesn't use Windows SDK at all. It's a Linux box doing cross-compiling (which Windows SDK doesn't support) with various flavours of GCC. For Windows, this is mingw. There are however several of us that use mingw, so I don't think that's the cause. There was initially a problem with the new font system and mingw, but that was fixed.

Furthermore, Microsofts C++ compiler and related tools does not have the same features as GNUs. They seems to assume that Visual Studio is used on top, which makes them difficult to run on a automated build server. It will in any case require yet another build system that must be maintained in parallel.

Offline DrSuperGood

Re: Windows nightly build error.
« Reply #2 on: September 05, 2014, 02:50:09 PM »
So why is it failing to build on the server? I know it is because "Shlobj.h" is not available on the build server however is that because it is not a standard header file (available in Windows SDK yet not in other SDKs for building on Windows such as that used by the server) or is it just because of the server needs a configuration update (someone has to add that header to it)?

Quote
They seems to assume that Visual Studio is used on top, which makes them difficult to run on a automated build server. It will in any case require yet another build system that must be maintained in parallel.
They use some mega complicated cooperate targeted build server system. This most certainly is not a viable solution to the problem. It would be nice if we could work out something to let the nightly server build for Windows without having to sacrifice functionality.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Windows nightly build error.
« Reply #3 on: September 05, 2014, 04:55:39 PM »
I know it is because "Shlobj.h" is not available on the build server however is that because it is not a standard header file

shlobj.h is an ancient, and very central, header file. It probably dates back to Windows 95. New contents are added now and then, but the stuff Simutrans recently started using dates back to a shell update bundled with Internet Explorer 5. The build server has been updated since then.

One possibility is that there are local changes to Makefile on the build server that blocks the change that activates the necessary parts of shlobj.h

Offline DrSuperGood

Re: Windows nightly build error.
« Reply #4 on: September 05, 2014, 06:58:05 PM »
Quote
that activates the necessary parts of shlobj.h
The problem is not that parts of the header are missing, but the entire header file is missing. The include statement is throwing the compiler error as it cannot locate the file to include. I do not think any changes to the makefile were made to add support for that file (it should be part of the Windows SDK (official or otherwise) that is used and so be in the include/class path).

I will try mingw out later to see if building with it throws the same error (making sure it does not use the VS Windows SDK).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Windows nightly build error.
« Reply #5 on: September 05, 2014, 07:44:44 PM »
shlobj.h is part of mingw, and has been since at least 2011. Probably even way before that, considering how important it's contents is, but I don't have any older archives readily available.

What might be throwing the build server off, is that the build server, unlike most of us building for Windows, is case sensitive.

Offline DrSuperGood

Re: Windows nightly build error.
« Reply #6 on: September 05, 2014, 11:14:41 PM »
Quote
is case sensitive.
So simply changing the case of the import file might fix it? It would be great if that was the case as it would restore nightly builds back to Windows users.

In my Windows SDK it is known exactly as "ShlObj.h" yet the include is "#   include <Shlobj.h>". I am not sure what it is in mingw but there is a good chance that is not the correct case based on this evidence.

Could a developer try and change that to see if it restores nightly compilation? (if so this should be known as a bug?)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Windows nightly build error.
« Reply #7 on: September 06, 2014, 07:37:20 AM »
Mingw consistently has all its headers in lower case. The only thing in upper case is the GL directory. This seems to be a Linux/Unix tradition, where only initialism is in upper case (though not consistently).

Offline TurfIt

Re: Windows nightly build error.
« Reply #8 on: September 07, 2014, 01:39:58 AM »
Appears case sensitivity was the problem...

Offline DrSuperGood

Re: Windows nightly build error.
« Reply #9 on: September 07, 2014, 03:41:20 AM »
Ah excellent. Glad this is now fixed.

I hope to eventually see more nightly servers now.
« Last Edit: September 07, 2014, 04:34:56 AM by DrSuperGood »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Windows nightly build error.
« Reply #10 on: September 07, 2014, 07:38:13 AM »
I hope to eventually see more nightly servers now.

I don't see why. Or how, since there aren't that many in the community with a server. Even less with the time and experience to set up scheduled cross-compilers for the major platforms. Someone set up a Jenkins CI server a while, but it might only do a Linux build. I don't even know it it's still running.

In addition, I suspect multiple nightly servers will just confuse the users, especially as they might have slightly different dependencies, or even functionality. My own builds are certainly different.

Offline DrSuperGood

Re: Windows nightly build error.
« Reply #11 on: September 07, 2014, 03:25:06 PM »
Quote
I don't see why. Or how, since there aren't that many in the community with a server. Even less with the time and experience to set up scheduled cross-compilers for the major platforms. Someone set up a Jenkins CI server a while, but it might only do a Linux build. I don't even know it it's still running.

In addition, I suspect multiple nightly servers will just confuse the users, especially as they might have slightly different dependencies, or even functionality. My own builds are certainly different.
I meant multiplayer game servers running nightly. Fifty running one over summer lead to the resolution of at least two bugs, the max in-transit overflow and in-transit logging overflow.