-
Notifications
You must be signed in to change notification settings - Fork 11
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
Win32 - Dependency Build Failures #8
Comments
The README.md contains the steps on how to build the SDK (which doesn't involve any Visual Studio GUI). I assume that the build breaks because you didn't select the RelWithDebInfo build configuration as the screen shows |
I switched to RelWithDebInfo, and get some different errors, but I'm not sure if these are due to local config issues with Visual Studio, so will try repairing / updating that first... |
Fairly sure these are legit build errors:
|
|
|
|
Don't understand this one... I told it to use the MSVC 14 compiler...
|
I've cherry picked a commit from the Rebuilding the solution should fix all issues mentioned. |
Fixed all but the pyconfig.h errors. Edit: Or not? Now when I build, I get what looks to be the same errors again... /Edit I recall that being something I had to manually move around to get the Python dll to build. |
I just rechecked with a clean build directory and the most recent master. Compiles successfully with some warnings with both nmake and a Visual Studio solution. |
I followed the instructions in the readme and did it all with the command line, and got errors. The part of the build log that I can get isin the attached log file. |
I would guess that cmake matched several different toolchain installations and standard libraries. At least this message
Did you run the commands inside a regular command line or a 'developer command line' for the specific installation? Do you have Visual Studio 2010 still installed? If no maybe there are some remains inside the registry. |
It was a 2010 command prompt. I got similar errors when trying to build in msvc 2015 itself though, after generating the solution in the cmake-gui. MSVC 2010 is not installed. |
I ran it in the 2015 dev command prompt. Similar results... |
Just to clarify:
|
I currently build / test FO with MSVC 2013. I want to try switching to MSVC2015 for building / testing FO in future. In order to do that, I'll need an SDK with all the dependencies built with 2015. For the latest SDK build attempt, I ran all the suggested commands in the "Developer Command Prompt for VS2015". I also searched through the registry for "2010", and found a few old references to 2010 SDK build directories / git checkout locations, but nothing otherwise obviously relevant. Some comments in this thread suggest the issues should be fixed in SDL... https://forums.libsdl.org/viewtopic.php?p=49026&sid=4ebc4f690b316f328f0bf3a1f9113d3b |
I think I have an idea on what is happening. When running the cmake configure step
or
However when running the build itself on the developer command line you determine what toolset (compiler, libraries, standard/win32 headers) to use. The libraries in different toolsets may expose different symbols and while the compiler v14 uses a standard library without the __except1 symbol implemented (because the vcruntime.lib dependency is added to every default VS2015 generated project file) this doesn't work for a combination like 'VS 2010' with toolset v14. So try configuring a new cleanproject with -G "Visual Studio 12 2013" set on the "Developer Command Line for VS 2013" and after that you can try another clean project with -G "Visual Studio 14 2015" on the "Developer Command Line for VS 2015". The first variant must work out of the box (because it's the exact same setup I use). The second variant may have some general VS 2013 to VS 2015 migration problems (or, hopefully, works out of the box too). |
Also the output of the |
Without -G:
With:
|
Running the build for the MSVC 2013 version, it ran for a lot longer, and had just two errors at the end:
|
To be thorough:
and the last bit of attempting to build:
|
Do you always delete the build directory or do you reuse it? |
new / separate build directory for each test. Note "build2" and "build" in paths in previous comments. |
Okay. Is there anything obvious errornous when rerunning the build without clearing the build2 (VS 2013) directory? Because the error you posted doesn't ring a bell and maybe the full error log gives more insight to the problem. I'm ignoring the VS 2015 problems for now. Also it would probably nice to hide some of those noisy warnings so I continue there for now. |
After running the build command twice, I get the same number of errors. Log attached. |
Could you retry build for VS2015? Most errors should be gone now and the build spews a lot less warnings and is less verbose in general. |
Seems like I'm getting inconsistent results from repeated attempts, but here's the latest... |
The 'second build' method was only a way to hide the warnings and other noise from output. Warnings from successfully compiled files isn't shown in a second pass, whereas compile errors are getting displayed in every build. There is no need to try two attempts now anymore with the majority of warnings hidden. |
I meant that completely separate attempts, starting from a fresh empty build directory, produced different results. The first attempt ended with: |
Latest master contains python patches to build on Visual Studio 2015. |
After building in the MSVC 2015 command prompt, I get two errors of the sort
|
Updated the libpng dependency. Upstream rewrote their CMake build system and bumped the minimum requirements from 2.4.4 to 2.8.5. Maybe the old version is the cause for picking the wrong toolset but I'm guessing there. |
same 2 errors. libpng |
Seems like your system setup is broken. Check if the PATH environment contains stray entries pointing to an old msbuild installation. http://stackoverflow.com/a/22186094 http://help.appveyor.com/discussions/problems/248-error-msb8020-when-building-projects-generated-with-cmake |
gives, after replacing ; with newlines
I don't see how that matters though, if it's looking for the wrong MSVC toolset (10 instead of 14 / Visual Studio 2010 instead of Visual Studio 2015). The problem isn't that it can't find 14, which presumably could occur if the path wasn't set properly. In case you're wondering about the SDKs directory,
So v10.0A is the newest. |
Yeah, but the order in the path determines which msbuild is used and different msbuild versions use different default toolsets. You can try to run cmake with the explicit toolset version like
on a clean build directory and check if that works. |
Same result with -T v140 |
What's the current value of the What's the current value of the Also which version of CMake do you use? 3.4.3 works for me. |
Can you upload: C:\Users\Geoff\Desktop\freeorion-sdk\build2\libpng.vcxproj |
You uploaded the filters, not the vcxproj. |
Do you just run it or do you select the RelWithDebInfo configuration first? Because that seems to be missing in the project files you uploaded. Maybe CMake 3.2.2 has a subtle bug here. Try if 3.4.3 works. |
Do I run what? The main SDK project that gives errors, or the projects in the libpng subdirectory that don't? |
Whatever you referenced to with 'the actual libpng solution'. I assume you meant |
It just has release and debug configurations. Both build without errors, although it doesn't recompile when I switch between them which makes me thing there's something a bit odd about at least one of them. |
After installing the newest version of CMake, it builds the SDK. I've unzipped it and run bootstrap.bat. Code downloaded. Opened the 2013 solution in 2015. Building the "Release" configuration. A "Release-XP" was also present unexpectedly. |
Maybe you never noticed it, but that has been around since we switched to MSVC 2013. I had to add this build configuration to make builds compatible with XP. |
3 of 7 projects built in MSVC 2015 with the SDK dependencies. One that might be relevant to the SDK is the custom build step in the Common project:
|
Fixed with b02fe47. Closing this issue as the original intent is addressed. If other issues occur feel free to open another issue. |
CMake learned support for Windows 10 SDKs with 3.4 or later. Earlier versions generate broken project files as seen in #8.
After generating the SDK build solution, picking Build Solution in the GUI gives me some success, and some errors in the output:
The text was updated successfully, but these errors were encountered: