[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freewrt-developers
Subject:    Re: [FreeWRT-developers] trouble with gSOAP in FreeWRT
From:       Christian_Stålp <christian.stalp () gmx ! de>
Date:       2008-01-16 12:10:55
Message-ID: 478DF44F.20407 () gmx ! de
[Download RAW message or body]

Phil Sutter schrieb:

> > Hi!
> >
> > On Tue, Jan 15, 2008 at 06:55:46PM +0100, Christian Stalp wrote:
> >   
>   
>> >> /tmp/cc5VfITp.o: In function `soap_float2s':
>> >> stdsoap2.c:(.text+0x1c434): undefined reference to `isnan'
>> >> /tmp/cc5VfITp.o: In function `soap_double2s':
>> >> stdsoap2.c:(.text+0x1d050): undefined reference to `isnan'
>> >> collect2: ld returned 1 exit status
>> >>     
>>     
> >
> > As stated in the last line, these are linker-errors. So you're missing
> > the symbols in libm.so.
> >
> >   
>   
of course, Im so blind! I only have to add a -lm and that's all. But I
really wonder why this is necessary. Because, as you can see in my makfile:
CC = gcc
GSOAPINC = /usr/include/gsoap/
CROSSCC =
/home/chris/tmp/trunk/freewrt/cross_mipsel/host/bin/mipsel-linux-uclibc-gcc
INCLUDEWRT = /home/chris/tmp/trunk/freewrt/cross_mipsel/target/usr/include/
LINKWRT = /home/chris/tmp/trunk/freewrt/cross_mipsel/target/usr/lib/
SYSWRT = /home/chris/tmp/trunk/freewrt/cross_mipsel/target/lib/


CFLAGS = -Wall
TARGET_CFLAGS = -fhonour-copts

all: pumuckl pumclient pumuckld

pumuckl: pumuckl.c
    $(CC) $(CFLAGS) -D_REENTRANT -lpthread -lpcap -o pumuckl pumuckl.c
soapC.c soapServer.c soapClient.c  /usr/include/gsoap/stdsoap2.c

pumclient: pumclient.c
    $(CC) $(CFLAGS) -o pumclient pumclient.c soapC.c soapClient.c
/usr/include/gsoap/stdsoap2.c
   
pumuckld: pumuckl.c
    $(CROSSCC) $(CFLAGS) $(TARGET_CFLAGS) -I$(INCLUDEWRT) -I$(GSOAPINC)
-L$(LINKWRT) -L$(SYSWRT) -D_REENTRANT -lpthread -lpcap -lm -o pumuckld
pumuckl.c soapC.c soapServer.c soapClient.c  /usr/include/gsoap/stdsoap2.c

the invoke of libmath is only required for the mips-target. I made three
targets:
pumuckl - this is the server process (daemon) to run on my host system,
for testing purpose
pumclient - this is the client, allways runs on a x86 Linux-host
pumuckld - this is the mips-binary compiled for FreeWRT

all they have in common that they are linked against gSOAP. And it seems
to be that gSOAP need support of the libmath. And this is only for the
mips-target!!!????

>> >> So there is that symbol 'isnan' that cannot resolved!!??!! I thought its
>> >> in the math.h but since yesterday I have a math.h also on my
>> >> target-platform.
>> >>     
>>     
> >
> > You did enable "Support ISO C99 math functions"? Also tried 
> > "make cleandir && make" ?
> >
> >   
>   

Yes I did, we talked to each other on the IRC about that issue. I used
trunk since then.

>> >> Does anybody know how to handle this, or did I make so mistake in my
>> >> makefile.
>> >>     
>>     
> >
> > No, looks good. I did some tests on my system:
> > | n0-1@base freewrt $ grep isnan cross_mipsel/target/lib/libm.so
> > | Binary file cross_mipsel/target/lib/libm.so matches
> >
> > I also wrote sample code:
> > | #include <math.h>
> > | void main(void) {
> > | 	isnan(9);
> > | }
> >
> > Then compiled it:
> > | n0-1@base tmp $ mipsel-linux-gcc \
> > |   -I/home/n0-1/svn/freewrt/cross_mipsel/target/include/ \
> > |   -I/home/n0-1/svn/freewrt/cross_mipsel/target/usr/include/ \
> > |   -L/home/n0-1/svn/freewrt/cross_mipsel/target/lib/ isnan.c
> > | isnan.c:0: note: someone does not honour COPTS correctly, passed 0 times
> > | isnan.c: In function `main':
> > | isnan.c:3: warning: return type of 'main' is not `int'
> > | n0-1@base tmp $ file a.out 
> > | a.out: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV),
> > | dynamically linked (uses shared libs), not stripped
> >
> > good luck,
> > Phil
> > ______________________________________________
> >   
>   
It works now, however. It's compiled and the client can connect to the
local server, but not to the server on the router yet. Maybe there is a
firewall-problem. Is the port 15000 blocked by default on FreeWRT?

Anyway I made a huge step forward, because your help.

Thank you very much.

Gruss Christian



_______________________________________________
freewrt-developers mailing list
freewrt-developers@freewrt.org
https://www.freewrt.org/lists/listinfo/freewrt-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic