[Aboriginal] Using native-build.sh for An Android native C compiler
earlenceferns at gmail.com
Sat Jul 16 10:16:34 PDT 2011
ok. doing what was suggested in that link got it compiled.
I compile my file like the following:
gcc -static gb.c -ldl
however, when I run it, it segfaults in the call to dlopen
This is the line in the file:
void *dlh = dlopen("/system/lib/libc.so", RTLD_NOW);
On Sat, Jul 16, 2011 at 6:27 PM, Rob Landley <rob at landley.net> wrote:
> On 07/16/2011 07:53 AM, Earlence Fernandes wrote:
> > Ok, I;ve built from source, the native compiler for armv5l. It compiles
> > a couple of files I need on the devices perfectly.
> > However, One particular file, I use netlink sockets and this is the
> > message I get:
> > /data/local/tmp/narm/bin/../include/linux/netlink.h:31: error: expected
> > specifier-qualifier-list before 'sa_family_t'
> > gb.c:310: error: 'struct sockaddr_nl' has no member named 'nl_family'
> > gb.c:314: error: 'struct sockaddr_nl' has no member named 'nl_pid'
> Hmmm... either libc version skew or kernel version skew. The headers
> the package is building against aren't providing what it expects.
> Let's see, ctrl-alt-google and:
> It looks like you need to #include <bits/sockaddr.h> before the #include
> linux/netlink.h. (Probably in your package?)
> That implies the problem is in strace. I'm already patching strace to
> build natively on armv5l, you can grab that binary from
> And the strace source patches are under:
> I'm in the process of writing a control-images howto. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Aboriginal