[Olsr-dev] building pud dies on Android build running on Mac OS X

Hans-Christoph Steiner (spam-protected)
Sat Jun 23 01:07:39 CEST 2012


I updated the docs to say r8 is now the minimum:

http://www.olsr.org/?q=olsr_on_android

Also in olsrd/android/README

.hc

On Jun 22, 2012, at 6:30 PM, Hans-Christoph Steiner wrote:

> 
> Oops, r8 fixes it, guess they added those defs referenced in that bug report.  Sorry for the noise.
> 
> .hc
> 
> On Jun 22, 2012, at 6:03 PM, Hans-Christoph Steiner wrote:
> 
>> 
>> NDK r8 has the same issue.
>> 
>> .hc
>> 
>> On Jun 22, 2012, at 5:52 PM, Henning Rogge wrote:
>> 
>>> Hi,
>>> 
>>> zhe compiler of the Android NDK should prevent this, it contains its
>>> own header files, same with OpenWRT. Otherwise we would see a lot more
>>> problems.
>>> 
>>> The problem is that the android include file says the struct contains
>>> a "unsigned short" where the normal Debian one says "in_port_t".
>>> 
>>> https://code.google.com/p/android/issues/detail?id=14376
>>> 
>>> I tried to compile it on linux with older NDK and got the same
>>> problem, so pud seems to look at right place.
>>> 
>>> Henning Rogge
>>> 
>>> On Fri, Jun 22, 2012 at 11:43 PM, Hans-Christoph Steiner
>>> <(spam-protected)> wrote:
>>>> 
>>>> Yes, I think that's close it the mark.  olsrd should build fine with NDK r4, its plain C and the NDK has done plain C well for a while now.  It is also building OK on Debian.
>>>> 
>>>> My guess is that the problem is that the PUD build is looking at /usr/include and getting in_port_t from there.  And maybe BSD/Mac OS X doesn't have that.
>>>> 
>>>> .hc
>>>> 
>>>> On Jun 22, 2012, at 5:08 PM, Henning Rogge wrote:
>>>> 
>>>>> Hmm,
>>>>> 
>>>>> it seems the NDK doesn't understand the in_port_t.
>>>>> 
>>>>> Maybe we should replace it with "uint16_t" or "unsigned short" ? This
>>>>> should sidestep the issue.
>>>>> 
>>>>> Henning Rogge
>>>>> 
>>>>> On Fri, Jun 22, 2012 at 10:10 PM, Hans-Christoph Steiner
>>>>> <(spam-protected)> wrote:
>>>>>> 
>>>>>> I'm building the latest olsrd from the head of the stable branch on Mac OS X using the Android NDK r7.  The build dies with the error below.  Removing pud allows everything else to build.
>>>>>> 
>>>>>> [LD] olsrd_pgraph.so.1.1
>>>>>> [CC] src/context.c
>>>>>> [CC] src/generate.c
>>>>>> [CC] src/generator.c
>>>>>> [CC] src/gmath.c
>>>>>> [CC] src/info.c
>>>>>> [CC] src/parse.c
>>>>>> [CC] src/parser.c
>>>>>> [CC] src/sentence.c
>>>>>> [CC] src/time.c
>>>>>> [CC] src/tok.c
>>>>>> [CC] src/util.c
>>>>>> [LD] lib/libnmea.so
>>>>>> [CC] src/nodeIdConversion.c
>>>>>> [CC] src/wireFormat.c
>>>>>> [LD] lib/libOlsrdPudWireFormat.so
>>>>>> [CC] src/configTools.c
>>>>>> In file included from src/configTools.c:5:
>>>>>> src/netTools.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getOlsrSockaddrPort'
>>>>>> src/netTools.h:50: error: expected declaration specifiers or '...' before 'in_port_t'
>>>>>> src/netTools.h: In function 'setOlsrSockaddrPort':
>>>>>> src/netTools.h:56: error: 'port' undeclared (first use in this function)
>>>>>> src/netTools.h:56: error: (Each undeclared identifier is reported only once
>>>>>> src/netTools.h:56: error: for each function it appears in.)
>>>>>> src/configTools.c: At top level:
>>>>>> src/configTools.c:262: error: expected declaration specifiers or '...' before 'in_port_t'
>>>>>> src/configTools.c:262: error: conflicting types for 'readIPAddress'
>>>>>> src/configTools.h:22: note: previous declaration of 'readIPAddress' was here
>>>>>> src/configTools.c: In function 'readIPAddress':
>>>>>> src/configTools.c:291: error: 'portDefault' undeclared (first use in this function)
>>>>>> src/configTools.c:291: error: too many arguments to function 'setOlsrSockaddrPort'
>>>>>> make[2]: *** [src/configTools.o] Error 1
>>>>>> make[1]: *** [libs] Error 2
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Olsr-dev mailing list
>>>>>> (spam-protected)
>>>>>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Steven Hawkings about cosmic inflation: "An increase of billions of
>>>>> billions of percent in a tiny fraction of a second. Of course, that
>>>>> was before the present government."
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Steven Hawkings about cosmic inflation: "An increase of billions of
>>> billions of percent in a tiny fraction of a second. Of course, that
>>> was before the present government."
>> 
> 





More information about the Olsr-dev mailing list