Merge lp:~widelands-dev/widelands/appveyor_linking_memory into lp:widelands
- appveyor_linking_memory
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~widelands-dev/widelands/appveyor_linking_memory |
Merge into: | lp:widelands |
Diff against target: |
46 lines (+10/-2) 2 files modified
CMakeLists.txt (+9/-1) appveyor.yml (+1/-1) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/appveyor_linking_memory |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tino | Needs Fixing | ||
SirVer | Approve | ||
Review via email: mp+302275@code.launchpad.net |
Commit message
Description of the change
With the last update https:/
So at the moment our 64bit-debug builds fail due to memory usage on linking.
This branch introduces the "-no-keep-memory" option in cmake for the linking process and activates it on Appveyor.
Tino (tino79) wrote : | # |
Not work, have to dig deeper...
Klaus Halfmann (klaus-halfmann) wrote : | # |
I actually did the same (but less sophisticated) for the Raspi
https:/
but with some different flags, mmh.
What can I do to test this? (other then waiting for appveyor)
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I am also in favour of making this an option for compile.sh - you can "steal" some code from the --no-webpage option - best rename the short option for that to -w then.
Tino (tino79) wrote : | # |
@GunChleoc: Will do when it is working.
@Klaus:
I started with your code ;). Was looking for your branch, but it seems deleted, so I took it from the forum.
The flag is the same "-no-keep-memory", the difference is how it is given from the compiler to the linker (-Xlinker vs -Wl), thats platform dependant i think.
But at least on appveyor with MinGW-GCC it is not working, the 64bit-debug-builds still fail:
https:/
For a time (last week) it was working again because I contacted Appveyor and they switched the widelands build back to GCE, but now it seems back to RackSpace again.
I am not sure if this long linking times are perhaps caused by those internal circular dependencies of the widelands code base / sub libs. Even on my system linking a debug widelands.exe takes 5 minutes alone.
SirVer (sirver) wrote : | # |
> I am not sure if this long linking times are perhaps caused by those internal circular dependencies of the widelands code base / sub libs. Even on my system linking a debug widelands.exe takes 5 minutes alone.
Yes, that is the main reason. Basically when you have a cyclic dependency, each library has to appear multiple times on the linking command line and the linker has to keep all symbols of everything in memory. That brings up linking time by a lot. Linking is much quicker though if you build a release binary (less symbols) - one of the reasons I rarely build in debug mode.
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
''
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
Running 'bzr pull --overwrite' failed. Output:
ssh_exchange_
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
ssh_exchange_
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
Using saved parent location: bzr+ssh:
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
Running 'bzr pull --overwrite' failed. Output:
ssh_exchange_
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
ssh_exchange_
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
Using saved parent location: bzr+ssh:
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
bunnybot (widelandsofficial) wrote : | # |
Bunnybot encountered an error while working on this merge proposal:
The read operation timed out
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 1258. State: passed. Details: https:/
Appveyor build 1100. State: failed. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
I have started working on a set of branches to reduce cyclic dependency. The goal is not to have logic and economy depend on any UI stuff. I hope that that will be sufficient savings on linking time to solve the problem.
GunChleoc (gunchleoc) wrote : | # |
Setting this to WiP to give Bunnybot a break.
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2016-08-05 12:32:08 +0000 |
3 | +++ CMakeLists.txt 2016-08-08 14:28:10 +0000 |
4 | @@ -7,6 +7,7 @@ |
5 | option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF) |
6 | option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF) |
7 | option(OPTION_BUILD_WEBSITE_TOOLS "Build website-related tools" ON) |
8 | +option(OPTION_LINKING_REDUCE_MEMORY "Reduce memory consumption on linking" OFF) |
9 | |
10 | if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
11 | message(FATAL_ERROR "Build directory and source directory must not be the same.") |
12 | @@ -184,13 +185,20 @@ |
13 | IF (WIN32) |
14 | add_definitions(-DMINGW_HAS_SECURE_API) |
15 | if (CMAKE_SIZEOF_VOID_P EQUAL 4) |
16 | - set (CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware" CACHE STRING "Set by widelands CMakeLists.txt" FORCE) |
17 | + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--large-address-aware" CACHE STRING "Set by widelands CMakeLists.txt" FORCE) |
18 | message (STATUS "Enabled large address awareness on mingw32") |
19 | else (CMAKE_SIZEOF_VOID_P EQUAL 4) |
20 | message (STATUS "Detected mingw32-w64") |
21 | endif (CMAKE_SIZEOF_VOID_P EQUAL 4) |
22 | endif (WIN32) |
23 | |
24 | +if (OPTION_LINKING_REDUCE_MEMORY) |
25 | + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no-keep-memory") |
26 | + #set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -Wl,-no-keep-memory") |
27 | + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-keep-memory") |
28 | + message (STATUS "Enabled -no-keep-memory for linker") |
29 | +endif() |
30 | + |
31 | # on BSD this must be explicitly linked |
32 | if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD") |
33 | # Not needed on Debian GNU/kFreeBSD.. |
34 | |
35 | === modified file 'appveyor.yml' |
36 | --- appveyor.yml 2016-05-04 17:23:16 +0000 |
37 | +++ appveyor.yml 2016-08-08 14:28:10 +0000 |
38 | @@ -32,7 +32,7 @@ |
39 | - cmd: md build |
40 | - cmd: cd build |
41 | - cmd: echo %APPVEYOR_BUILD_VERSION%_%CONFIGURATION%_%PLATFORM% > %APPVEYOR_BUILD_FOLDER%\WL_RELEASE |
42 | - - cmd: "cmake -G \"Ninja\" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DOPTION_USE_GLBINDING=ON %APPVEYOR_BUILD_FOLDER%" |
43 | + - cmd: "cmake -G \"Ninja\" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DOPTION_USE_GLBINDING=ON -DOPTION_LINKING_REDUCE_MEMORY=ON %APPVEYOR_BUILD_FOLDER%" |
44 | - cmd: ninja |
45 | |
46 | on_success: |
lgtm. Thanks for keeping an eye on the appveyor stuff!