-
Notifications
You must be signed in to change notification settings - Fork 649
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
Unbearable linking speed when building on Mingw #1738
Comments
Any idea what's causing this? |
Possible (probable?) cause: we often instantiate templates in header files. This results in many compilation units containing identical code for these instances which must be sorted out and unified by the linker. It also slows down compilation as such. |
I have been experimenting a little with externalizing database objects and indexes, and found that it does improve compile time as well as required RAM during compilation. |
As far as I know, the LTO(linking time optimization) is disabled by default on mingw64/msys2.
|
@cwyyprog please check if latest develop improves the situation. Also verify that your build server has sufficient RAM available. |
Hm. No idea what's causing this. |
It's not a RAM issue. I run the compile process on my laptop, ld.exe reports errors of undefined reference to many functions after running more than 10 hours. |
Switching to clang toolchain, ld.exe finished running in minutes, but still not succeed.
|
Just FWIW, building with https://github.com/bitshares/bitshares-gitian (using MinGW) worked for me, tested with release branch and testnet branch. I tested cross-building under Ubuntu though, but not in Cygwin. |
When building the fc library on Mingw64/Msys2 platform, the linking process of api.exe takes unbearable time.
I'm trying to do some work for #964, starting with fc library first.
It's almost done at cwyyprog/bitshares-fc, the problem defeated me is that ld.exe works too slowly when linking api.exe and reaches the 1 hour limit of appveyor.
The appveror conf is :
and the build script is:
The latest build log can be found at https://ci.appveyor.com/project/cwyyprog/bitshares-fc.
As far as I know, Ccache can save the compiling time, but it's still not enough to meet the 1-hour limit, due to ld.exe takes hours to link api.exe on my laptop.
The text was updated successfully, but these errors were encountered: