Skip to main content

phoneme advanced mr1 on arm xscale compile problem

3 replies [Last post]
Joined: 2004-11-09

Hi again.

I'm trying to get PhoneMe Advanced MR1 release to work on an arm-xscale processor (IXP465 if anyone is curious).

I have the manufacturer supplied toolkit for linux-arm-xscale installed, with kernel headers for 2.4.29-uc1. According to the manufacturer, only 2.4.x series is supported, not 2.6.

When I run make, I get the following problems:

cc ../../build/linux-arm-xscale/./obj/net_util_md.o
In file included from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:12,
from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/route.h:28,
from ../../src/linux/native/java/net/net_util_md.c:36:
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/neighbour.h: In function `pneigh_alloc_flag':
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/neighbour.h:431: error: `GFP_KERNEL' undeclared (first use in this function)
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/neighbour.h:431: error: (Each undeclared identifier is reported only once
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/neighbour.h:431: error: for each function it appears in.)
In file included from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/route.h:28,
from ../../src/linux/native/java/net/net_util_md.c:36:
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h: At top level:
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:28: error: parse error before "atomic_t"
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:65: error: parse error before '}' token
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:73: error: parse error before "__u32"
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:81: error: parse error before "atomic_t"
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:83: error: parse error before '}' token

... plus heaps more. I can fix the GFP_KERNEL problem by adding an include in the neighbour.h to mm.h, but then I get the following error:

cc ../../build/linux-arm-xscale/./obj/net_util_md.o
In file included from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/linux/sched.h:18,
from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/linux/mm.h:4,
from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/neighbour.h:51,
from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/dst.h:12,
from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/route.h:28,
from ../../src/linux/native/java/net/net_util_md.c:36:
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/asm/semaphore.h:18: error: parse error before "wait_queue_head_t"
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/asm/semaphore.h: In function `sema_init':
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/asm/semaphore.h:47: error: dereferencing pointer to incomplete type

... plus heaps more errors.

Is phoneme advanced for 2.6.x kernels only? Or is there another way around this?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-11-09

Thanks Chris!
You were correct, those sys-includes were out of place. I moved them out and tried recompiling and hey presto, it compiles 100%. Awesome! Cheers!

Joined: 2006-10-16

mr1 will build and run on both 2.4 and 2.6 kernels, although there is a patch that needs to be applied to fix a cache flushing bug on 2.6 kernels:

The problem you are seeing is strange, and I don't think it is related to the CDC code. None of these sys-include headers are in the linux-arm toolchain we use. I don't know much about buildling linux kernel code, but I'd almost wager that this toolchain or these headers are mean for kernel development. The error output is also strange, since it does not list the line number in net_util.c that triggered the inclusion of these headers.

Here's something you can try. Start by building with CVM_TERSE_OUTPUT=false. This will cause the entire gcc command line for compiling net_utiil_md.c to be echoed. You can then attempt to use this command line to compile a small test program that includes the same linux headers as netutil.c.


Joined: 2004-11-09

It appears to be line 36:

In file included from /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/route.h:28,
from ../../src/linux/native/java/net/net_util_md.c:36:

Which is: #include (brackets)net/route.h(brackets)

The toolchain I have is what I use to build the kernel as well. I must admit, I would assume that the same toolchain would be used for building anything for that platform?

Edit: I see now another message further down that explains some things:

In file included from ../../src/linux/native/java/net/net_util_md.c:36:
/usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/sys-include/net/route.h:37:2: warning: #warning This file is not supposed to be used outside of kernel.

But yet net_util_md.c uses it?

I'm going to try the test program idea now. Thanks.

Edit to include note about the additional warning, and fix import route.h brackets.

Message was edited by: lamsap