You are viewing a single comment's thread from:

RE: Compiling Steem for Windows (on Linux host)

in #steem8 years ago

Ive used this guide to successfully make working 0.11.0 builds of Steem for Windows, thanks!
One question, unlike Bitcubes's build, the compiled versions Ive produced are massive, like 20MB executables. They are also slightly slower (5%). I even edited the your handy scripts to build shared lib versions and it made no difference.

Any idea what would cause this.. is it as its cross compiled? Id love to get better at compiling/porting stuff, so any tips appreciated! :)

Sort:  

I would have said they are larger because it is a fully static build, but apparently you are saying based on your attempts it isn't much better when using shared libraries. So, I am really not sure. Are the shared lib versions you made using Boost and OpenSSL as the shared libs? What is the size difference in the files (both the reduction in the cli_wallet.exe and steemd.exe files individually as well the net change, if any, between all necessary files to run cli_wallet and steemd together before and after the shared lib version)?

Perhaps it can be explained by the fact that bitcube's executables require "Visual C++ Redistributable Packages for Visual Studio 2013" as a dependency to run, but the MinGW compiled versions do not because any relevant code dependencies are already included in each of the executable? Again, just a guess and not something that I'm certain about.

I think the performance difference may be explained by the fact that this guide does not use GMP/MPIR which I believe bitcube does use in his builds (although I may be wrong about that; can I get clarification about that @bitcube?). You could follow the guides floating around on how to use GMP and make the necessary modifications to my guide and build scripts to have the MinGW Windows build use GMP as well. It is a slightly more difficult task with the cross-compile build because you first need to cross-compile GMP as an additional dependency in addition to OpenSSL and Boost.

By the way, I would love to see your modifications to get the shared libs working, if you are willing to share them. Maybe you can put up your own modified guide as a post for some upvotes. Also, if you get GMP working in the cross-compile build, I think that is worthy of a guide as well.

I basically just added "link=shared" to Boost and "shared" to the OpenSSL helper scripts in the appropriate section. This produced files about 2mb smaller (each), but still way bigger than Bitcubes (6mb vs 20'ish).

Ive made some tweaks to OpenSSL's and Boost build options and testing right now too. Looking at GMP now too, to see how possible it is!

Within configure_build.py I found this:

Maybe add Windows cross-compilation flags

if args.windows:
    mingw = "x86_64-w64-mingw32"
    command.append("-DFULL_STATIC_BUILD=ON")

--
I tried changing to DFULL_STATIC_BUILD=OFF but during compile it seemed to complain about it and put it back on. I suspect this is causing the mammoth 20mb exe's?