Hello Andrii, 2008/10/29 Andrii Arsirii <[EMAIL PROTECTED]>: > I have tried to evaluate witty application size. > I've made empty application with wthttp connector on i386 arch. > Build options: MinSizeRel, -DHAVE_GNU_REGEX, -fvisibility=hidden, without > libz and OpenSSL, static linkage with wt and libstdc++, stripping. WT > version 2.1.5. > It has size of 680Kb (gzip).
You also should uncomment in WEnvironment.C: #define NOSPIRIT And I also added the option -fvisibility-inlines-hidden If I then build hello.wt using current CVS following the directions of the wiki (i.e. all boost libraries static, no ssl, no libz, and only stdc++ library pthread dynamically), then I get the following numbers: $ /home/wim/project/option/calao/new/build_arm/staging_dir/usr/bin/arm-linux-g++ -O2 -fvisibility=hidden CMakeFiles/hello.wt.dir/hello.C.o -o hello.wt ../../src/http/libwthttp.a -lpthread ../../src/libwt.a -ldl /home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib/libboost_thread-gcc42-mt-1_34_1.a /home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib/libboost_filesystem-gcc42-mt-1_34_1.a /home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib/libboost_signals-gcc42-mt-1_34_1.a /home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib/libboost_program_options-gcc42-mt-1_34_1.a /home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib/libboost_date_time-gcc42-mt-1_34_1.a -Wl,-rpath,/home/wim/project/option/calao/new/build_arm/staging_dir/usr/lib $ file hello.wt hello.wt: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped You should have only a few symbols left (which are pulled from the shared libraries, i.e. C and std C++ things) $ nm -C -D hello.wt | wc 399 1566 22833 $ ls -l hello.wt -rwxr-xr-x 1 koen users 1460220 2008-11-14 12:30 hello.wt $ /home/koen/download/upx-3.02-i386_linux/upx hello.wt Ultimate Packer for eXecutables Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 UPX 3.02 Markus Oberhumer, Laszlo Molnar & John Reiser Dec 16th 2007 File size Ratio Format Name -------------------- ------ ----------- ----------- 1460220 -> 395408 27.08% linux/armel hello.wt Packed 1 file. > My company will continue investigation of witty in case if I get for empty > application at least the same size as GoAhead has. > So I have to fit in <300Kb for empty witty application with libstdc++ > inlined (gzipped). Is that possible? This will depend on your target architecture: is it arm or i386? For arm, we are now at 386KB (Wt grew a bit of features/fat since the wiki page, which indicates 300KB!). I have not tried yet to build a small i386 binary. I have never tried to link against a static libstdc++, but one of the problems with that library is that its visibility is always "default", so you cannot (easily?) get rid of unnecessary symbol definitions. What we could do, is disable some features that are now referenced internally (e.g. the layout class implementations are referenced from within WContainerWidget, even if you do not use them they will be included) at compile time. I suspect this the main reason why we increased our binary size compared to March this year. >From examining the remaining symbols, these are some that could qualify for such a build option: - layout managers and implementation for WContainerWidget (which also pulls WTextArea and WTextEdit classes) - WTimerWidget (used only by WTimer) - WSocketNotifier - WMemoryResource - WServerPushResource - WCssDecorationStyle and related classes (WFont, WColor, ...) At this point, we cannot easily tell how much can be gained, so alot depends on the other unknowns (architecture and libc++ size) Regards, koen ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest