[Klone-users] Size of kloned

Stefano Barbato barbato at koanlogic.com
Sat Aug 23 06:25:21 EDT 2008


> Just noticed some warnings during compilation:

Nothing harmful :)



On 22/ago/08, at 10:44, Steven Van Ingelgem wrote:

> Now I see it... It first is compiling the host... Where openssl is  
> installed... Afterwards it'll try to compile the target, where  
> openssl is NOT installed, and thus not taken :).
> Sorry for the mixup.
>
>
> Just noticed some warnings during compilation:
>
> **HOST**
> toolbox/log.c: In function 'u_strerror_r':
> toolbox/log.c:247: warning: cast from pointer to integer of  
> different size
> toolbox/log.c:257: warning: cast to pointer from integer of  
> different size
>
> toolbox/pwd.c: In function 'u_pwd_retr_mem':
> toolbox/pwd.c:494: warning: passing argument 2 of 'u_hmap_get'  
> discards qualifiers from pointer target type
>
> http.c: In function 'http_serve':
> http.c:565: warning: passing argument 2 of 'request_parse_header'  
> from incompatible pointer type
> http.c:591: warning: assignment discards qualifiers from pointer  
> target type
>
> ../../libutils/libutils.a(utils.o): In function `u_tmpfile_open':
> utils.c:(.text+0x993): warning: the use of `tmpnam' is dangerous,  
> better use `mkstemp'
>
> ** TARGET **
> path.c: In function 'u_uri_normalize':
> path.c:75: warning: assignment discards qualifiers from pointer  
> target type
>
> i386-linux-uclibc-gcc -I/home/steven/openwrt/staging_dir/i386/usr/ 
> include -L/home/steven/openwrt/staging_dir/i386/usr/lib -pipe -I/ 
> home/steven/openwrt/build_d
> ir/i386/klone-2.1.1rc10/klone-2.1.1rc10/build/target/klone- 
> core-2.1.1rc10/libu/include -I/home/steven/openwrt/build_dir/i386/ 
> klone-2.1.1rc10/klone-2.1.1rc10/b
> uild/target/klone-core-2.1.1rc10 -DHAVE_CONF_H  -I/usr/local/include  
> -O2 -c date.c -o date.o
> <built-in>:0: note: someone does not honour COPTS correctly, passed  
> 0 times
>
> i386-linux-uclibc-ar cq libhttp.a `/home/steven/openwrt/build_dir/ 
> i386/klone-2.1.1rc10/klone-2.1.1rc10/build/target/klone- 
> core-2.1.1rc10/makl/helpers/lorder b
> roker.o cgi.o http.o sup_emb.o access.o vhost.o | tsort`
> tsort: -: input contains a loop:
> tsort: broker.o
> tsort: sup_emb.o
> tsort: http.o
> tsort: -: input contains a loop:
> tsort: broker.o
> tsort: sup_emb.o
> tsort: http.o
> tsort: -: input contains a loop:
> tsort: broker.o
> tsort: sup_emb.o
> tsort: http.o
> tsort: -: input contains a loop:
> tsort: broker.o
> tsort: sup_emb.o
> tsort: http.o
> tsort: -: input contains a loop:
> tsort: access.o
> tsort: http.o
> i386-linux-uclibc-ranlib libhttp.a
>
>
>
> 2008/8/22 Stefano Barbato <barbato at koanlogic.com>
> Hi Steven,
>
> I think it is just a configure bug that displays unclear messages  
> (i.e. it writes "searching for optional lib feature xyz" but doesn't  
> look for it if --disable-lib=xyz is given).
>
> To be sure about that you can take a look to the variables generated  
> by that configure script (in klone-2.1.1rc10/build/target/klone- 
> core-2.1.1rc10/Makefile.conf) and check that LIBOPENSSL_CFLAGS and  
> LIBOPENSSL_LDFLAGS are not defined.
>
> Note also that the configure script is run twice, once for the host  
> platform and once for the target platform so you'll see two  
> (possibly different) configure outputs. Host related variables are  
> in klone-2.1.1rc10/build/host/klone-core-2.1.1rc10/Makefile.conf.
>
> Bye,
> s
>
>
>
>
> On 21/ago/08, at 21:58, Steven Van Ingelgem wrote:
>
>
> I have an issue again with this disabling of OpenSSL...
>
> I am cross compiling, but klone seems to be taking my host system  
> include directory.
>
> you can easily check it by checking out the OpenWRT trunk & trying  
> to compile KLone in there with the following changes to the default  
> makefile:
> KLONE_CONF_ARGS ?= --disable_cxx --install_daemon_only --prefix=/usr  
> --disable-lib=openssl
>
> This will say the following:
> adding optional lib dependency openssl
> adding optional lib dependency openssl_psk
> adding optional lib dependency z
> ... snip ...
> checking dependencies
> searching for optional lib feature openssl
> searching for optional lib feature openssl_psk
> searching for optional lib feature z
> [wrn] could not find optional dependency 'openssl_psk'
>
>
> It shouldn't be able to find openssl! OpenWRT hasn't compiled it in,  
> and as I'm cross compiling, I don't want KLone to be linked against  
> i386 libs when it needs to run on an ARM processor... That will  
> surely give troubles.
>
>
> What can I do to prevent this or should I wait for rc11?
>
>
> Thx,
> Steven
>
>
> 2008/6/5 Stefano Barbato <barbato at koanlogic.com>
> Hello Steven,
>
> on a Mac/x86 with gcc 4.0.1 this is the Makefile that produces the  
> smallest daemon (149372 bytes using the default, unmodified, source  
> code):
>
> ---[ Makefile ]---
> KLONE_VERSION = 2.1.1rc7
>
> KLONE_CONF_ARGS = --disable-lib=openssl --disable_cxx
>
> WEBAPP_DIR = $(CURDIR)/webapp
>
> WEBAPP_CFLAGS += -Os
> CFLAGS += -Os
>
> include klapp.mk
>
> klapp.mk: ;wget -O $@ -c http://koanlogic.com/klone/klapp-2.0.0.mk
> -------------------
>
> bye,
> s
>
>
>
>
> On 05/giu/08, at 14:57, Steven Van Ingelgem wrote:
>
> Hi,
>
>
> Is there a way to bring down the size of the kloned executable?  
> Right now I got it down to 181k, but can there be added some  
> parameters to the configure command to make it even smaller?
> Does it 'strip' itselves after the compile finishes up?
>
> Is it possible that I got it down to 386 bytes after running strip  
> on it? ["mipsel-linux-strip kloned" to be correct]
>
> I can't test it right now, but I just was wondering about it...
>
>
> Thanks :)
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users





More information about the klone-users mailing list