Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tinydtls-dev] Cross-compiling tinyDTLS for an ARM/Linux platform (RaspberryPi)

Hi Alin,

Alin Micu <micu.alin.ctin@xxxxxxxxx> writes:

> I am trying to cross-compile the tinyDTLS library for the ARM/Linux
> platform (specifically the RaspberryPi, not that it matters).
> I ran this commands:
>
>> export ac_cv_func_malloc_0_nonnull=yes
>> ./configure --host=arm-linux-gnueabi
>> make
>
> The first command mitigates the following error that I get: 
>> tinydtls/dtls.c:243: undefined reference to `rpl_malloc'
>> [...]
>> tinydtls/crypto.c:80: more undefined references to `rpl_malloc'
> follow collect2: error: ld returned 1 exit status".

uh, that one. IIRC, AC_FUNC_MALLOC in tinydtls's configure.in needs to
be removed. Noted.

[...]
> But when a run "make", it still uses the native cc/gcc compiler:
>
>> cc -Wall -pedantic -std=c99 -g -O2 -DDTLSv12 -DWITH_SHA256 -
> DDTLS_CHECK_CONTENTTYPE -c -o dtls.o dtls.c
>> cc -Wall -pedantic -std=c99 -g -O2 -DDTLSv12 -DWITH_SHA256 -
> DDTLS_CHECK_CONTENTTYPE -c -o crypto.o crypto.c
>> cc -Wall -pedantic -std=c99 -g -O2 -DDTLSv12 -DWITH_SHA256 -
> DDTLS_CHECK_CONTENTTYPE -c -o ccm.o ccm.c
>> [...]
>
> Note that just hard-coding the cross-compiler in the makefiles won't
> help me, because I'm actually trying to cross-compile the "dtls"
> branch of the "libcoap" project. So I have to pass the
> "--host=arm-linux-gnueabi" to the libcoap's configure script which
> forwards the flag to tinyDTLS' configure script, but the makefiles
> ignore this flag. It seems that the configure script doesn't do much
> in term of setting up the build parameters.

Okay, I have to talk to the libcoap author and see if he can fix that :-)
The tinydtls integration with libcoap is still very alpha, Suggestions
are very welcome.

Grüße
Olaf


Back to the top