[Klone-users] Detection fork function
Mickael Auger
mickael.auger at gmail.com
Fri Dec 12 08:34:34 EST 2008
Hi,
I have migrated to uClinux 2.4.34 and I use KLone 2.1.1.
Now I can use C and C++ and so KL1 and KLX page.
But my new library for the new uClinux, doesn't implement the "fork"
function. So if I compile my KLone project, I have the next error :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
...
checking for tm_gmtoff in struct tm
checking for fork() support
compilation failed
[wrn] failed check on optional fork check
checking va_list behaviour
...
m68k-uclinux-g++ -I/home/fdub/uClinux-dist-2434/include -Os -m5307
-msep-data -D__UCLINUX__ -pipe
-I/home/alluser/ug_ma/ug_web-v3/klone-2.1.1/build/target/klone-core-2.1.1/libu/include
-I/home/alluser/ug_ma/ug_web-v3/klone-2.1.1/build/target/klone-core-2.1.1
-DHAVE_CONF_H -O2 -I../../libu/include -pipe
-I/home/alluser/ug_ma/ug_web-v3/klone-2.1.1/build/target/klone-core-2.1.1/libu/include
-I/home/alluser/ug_ma/ug_web-v3/klone-2.1.1/build/target/klone-core-2.1.1
-DHAVE_CONF_H -O2 -I../../libu/include -o kloned server.o main.o entry.o
ppc.o atom.o ppc_log_add.o ppc_log_get.o ppc_nop.o child.o ppc_access_log.o
ppc_fork_child.o -Wl,--start-group ../libhttp/libhttp.a
../libutils/libutils.a ../libpage/libpage.a ../libbackend/libbackend.a
../libemb/libemb.a ../libio/libio.a ../libtls/libtls.a ../../site/libsite.a
../libcodec/libcodec.a ../libklog/libklog.a ../../webapp/libwebapp.a
../libhttp/libhttp.a ../libpage/libpage.a ../libutils/libutils.a
../libio/libio.a ../libtls/libtls.a ../libcodec/libcodec.a
../libpage/libpage.a ../libhook/libhook.a ../../libu/srcs/libu.a
-Wl,--end-group -Wl,-elf2flt -lc -lgcc
-L/home/fdub/uClinux-dist-2434../libutils/libutils.a(utils.o): server.o: In
function `server_chroot_blind':
server.c:(.text+0xff8): undefined reference to `fork'
server.o: In function `server_fork_child':
server.c:(.text+0x1396): undefined reference to `fork'
../../libu/srcs/libu.a(daemon.o): In function `daemon':
daemon.c:(.text+0x6): undefined reference to `fork'
collect2: ld returned 1 exit status
make[6]: *** [kloned] Erreur 1
...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I know that you have added "build/makl_checkfork" script just for me, but
this (no)check is not use in other .h and .c file, what causes this
compilation error. However the test of "HAVE_FORK" define would reduce the
size of final binary.
For the moment, I avoid this error to adding a definition of fork() in
"src\kloned\server.c" as :
=================
int fork() {return 0;}
=================
After this modification, the compilation success and the execution of binary
is Ok.
I try to modify C file to not add fork() function but without success
(sorry).
However, I have an idea. If the fork() function isn't checked (HAVE_FORK not
defined), the model would be "iterative" by default instead of "fork".
Bye.
--
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20081212/226a3592/attachment.htm
More information about the klone-users
mailing list