← Back to team overview

kicad-developers team mailing list archive

Re: KiCad Windows builder

 

On 4 August 2011 19:37, jean-pierre charras <jp.charras@xxxxxxxxxx> wrote:
> Le 04/08/2011 20:10, Wayne Stambaugh a écrit :
>>
>> On 8/4/2011 5:09 AM, Brian Sidebotham wrote:
>>>
>>> On 4 August 2011 03:25, Dick Hollenbeck<dick@xxxxxxxxxxx>  wrote:
>>>>
>>>>> (My machine compiles the entire Kicad source in 3 mins 30 seconds, on
>>>>> Ubuntu
>>>>> x86_64, no wxWidgets, just Kicad.)
>>>>
>>>> $ make clean
>>>>
>>>> $ time make -j 5
>>>>
>>>> real    3m0.329s
>>>>
>>>> Looks more like 3 minutes flat.
>>>>
>>>> But I compile for a living.
>>>>
>>>
>>> Nice! On windows mingw32-make cannot run multiple jobs without
>>> crashing so it is really limited; Annoying as I bought a quad core
>>> processer with hyper threading for mingw32-make -j 7
>>>
>>> D'oh!
>>>
>>> I am passing -DCMAKE_BUILD_TYPE=Release through to the KiCad build. I
>>> expect it is still generating "debug" symbols though. I will have
>>> another look tonight anyway and see what conclusions I can reach.
>>
>> I checked the release build on my machine and found the same thing.
>>  Running
>> "strip --strip-all" made no difference in the size of eeschema.exe
>> (11617280
>> bytes).  It may just be that the static link version of wxWidgets (I'm
>> using
>> 2.9.2) is the culprit.  Maybe it's time to start building and linking to
>> wxWidgets dynamically instead of statically.  This appears to be the way
>> MinGW
>> is heading judging by the dynamic libraries installed with GCC 4.5.2 (the
>> default compiler when installing MinGW using mingw-get).  I see no problem
>> linking dynamically other than making sure all the required library
>> dependencies are included when running "make install" and/or creating the
>> Windows installer.
>>
>> Wayne
>>
>
> I also made some tests.
>
> I can confirm tests made by Wayne.
> But I am not sure the dynamic link solves the main issue: time to see the
> Kicad window on screen.
> I compiled Kicad using wxMSW 2.8.12 (the last stable version) and wxWidgets
> 2.9.3 ( the SVN version)
> under gcc 4.4 and 4.5.2
>
> With the same compiler version, Kicad binaries, and wxWidgets libs
> with 2.8.12 have a size that is roughly half the size of the 2.9.3 version.
>
> On my computer Eeschema is shown on screen about 2 seconds after launching
> the binary, with 2.8 version.
> With 2.9.3 Eeschema is shown on screen about 8 seconds or more after
> launching the binary, with 2.9 version.
>
> Note when compiled with gcc 4.4, Eeschema (and other kicad applications) is
> shown on screen faster.
>
> I am afraid this issue could be due to the fact wxWidgets has no more a
> debug and a release version,
> but only an unique version.
>
> If this is the case, this is a bad news.
>
> I also am afraid the use of dynamic libraries add more time to launch Kicad.
> It fixes only the size of binaries, that is now a very minor problem.
>
> By the way, the SVN version works fine for me and has fixed annoying issues
> found in Kicad.
>
> --
> Jean-Pierre CHARRAS

I also did some tests, it seems that the best way to get executable
size down is to compile everything (including wxWidgets) with gcc
options -ffunction-sections and -fdata-sections. Then add
-Wl,--gc-sections to the linker options. This creates a section for
all objects and then garbage collects those that are not referenced. I
also added CXXFLAGS=-Os to the wxWidgets build stage. You can get
eeschema down to ~9Mb. Those options would require a change to the
KiCad CMakeLists.txt file though. I'm not sure it's worth it to save
~1Mb on the executable size.

I don't get a delay running eeschema. I am compiling with gcc 4.5.2
and whatever I try I get less than a 2 second pause from double click
to the eeschema window being shown. Maybe it is something particular
to my config.

I updated my cmake script to use wxWidgets 2.9.2 which should fix the
localisation bug which previously needed patching to fix in 2.9.1.

Kerusey, I have updated the script to place all kicad executables and
the dll dependencies in a bin subdirectory so that you can run them
in-place. Just update the script with bzr and run it again (It will
download wxWidgets 2.9.2 source!)

Best Regards,

Brian.


Follow ups

References