[ccan] How to build ccan on cross-platform?

Cody P Schafer dev at codyps.com
Fri Sep 11 12:32:07 AEST 2015


On Thu, Sep 10, 2015 at 3:14 AM, 不死之身 <635844619 at qq.com> wrote:
> I want to use it in the embedded linux system, but i can't build it success.
> Anyone can help me?
>
> I have compiled the configurator program yet in the host linux, but i use
> command below to get the config.h faild:
>
> ./configurator arm-linux-gcc -g3 -ggdb -Wall -Wstrict-prototypes
> -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations
> -Wpointer-arith -Wwrite-strings -Wundef -DCCAN_STR_DEBUG=1 > config.h.tmp
> configurator: Test for HAVE_ALIGNOF failed with 2:
> ./configurator.out: 1: ./configurator.out: Syntax error: word unexpected
> (expecting ")")
>

Some of the tests done by configurator require running code snippets,
which isn't possible when cross compiling.

I'd recommend writing your own config.h for the target platform (not
that bad as long as you don't need all of ccan), or perhaps looking at
those tests and seeing if there is any possible way to perform them
without executing code.


More information about the ccan mailing list