Fabiano Sidler
2007-Nov-28 22:27 UTC
[asterisk-users] Cross-compiling asterisk-1.4 for Debian on a slug
Hi folks! I planned to put asterisk-1.4 on my slug (one of these embedded devices). Since i don't want to compile it natively on this slow processor, i need a cross-compile toolchain. I tried out several ways such as manually compiling binutils and gcc, or using scratchbox. All of these with the result that i got binaries for machines except the one i wanted! :( I then have been given a link to a optware tree specific to Debian on the slug[1]. I tried to compile, but at the first attempt, it stopped with this cruft: dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1225: error: dereferencing pointer to incomplete type dlfcn.c:1230: error: dereferencing pointer to incomplete type dlfcn.c:1231: error: dereferencing pointer to incomplete type dlfcn.c:1234: error: invalid application of `sizeof' to incomplete type `mach_header' dlfcn.c:1235: error: dereferencing pointer to incomplete type dlfcn.c:1235: error: dereferencing pointer to incomplete type dlfcn.c:1237: error: `LC_SYMTAB' undeclared (first use in this function) dlfcn.c:1237: error: dereferencing pointer to incomplete type dlfcn.c:1240: error: dereferencing pointer to incomplete type dlfcn.c:1241: error: dereferencing pointer to incomplete type dlfcn.c:1244: error: dereferencing pointer to incomplete type dlfcn.c:1249: error: dereferencing pointer to incomplete type dlfcn.c:1250: error: dereferencing pointer to incomplete type dlfcn.c:1250: error: `N_PEXT' undeclared (first use in this function) dlfcn.c:1251: error: dereferencing pointer to incomplete type dlfcn.c:1251: error: `N_EXT' undeclared (first use in this function) dlfcn.c:1254: error: increment of pointer to unknown structure dlfcn.c:1254: error: arithmetic on pointer to an incomplete type dlfcn.c:1257: error: dereferencing pointer to incomplete type dlfcn.c:1257: error: dereferencing pointer to incomplete type dlfcn.c:1259: error: dereferencing pointer to incomplete type dlfcn.c:1262: error: increment of pointer to unknown structure dlfcn.c:1262: error: arithmetic on pointer to an incomplete type dlfcn.c:1266: error: dereferencing pointer to incomplete type dlfcn.c:1267: error: dereferencing pointer to incomplete type dlfcn.c: In function `search_linked_libs': dlfcn.c:515: warning: value computed is not used dlfcn.c: In function `dlsymIntern': dlfcn.c:563: warning: unsupported arg to `__builtin_return_address' dlfcn.c: In function `dladdr': dlfcn.c:1198: warning: value computed is not used dlfcn.c:1221: warning: value computed is not used dlfcn.c:1235: warning: value computed is not used dlfcn.c: At top level: dlfcn.c:133: error: storage size of `mainStatus' isn't known dlfcn.c:83: warning: 'NSSymbol' declared `static' but never defined make[1]: *** [dlfcn.o] Error 1 make[1]: Leaving directory `/home/user/down/optware/cs04q3armel/builds/asterisk' make: *** [/home/user/down/optware/cs04q3armel/builds/asterisk/.built] Error 2 I then removed the whole optware subdir and retried, this time with another error (?): gai_strerror.c:61: error: `EAI_IDN_ENCODE' undeclared here (not in a function) gai_strerror.c:61: error: initializer element is not constant gai_strerror.c:61: error: (near initialization for `values[16].code') gai_strerror.c:61: error: initializer element is not constant gai_strerror.c:61: error: (near initialization for `values[16]') make[6]: *** [gai_strerror.lo] Error 1 make[6]: Leaving directory `/home/user/optware/cs04q3armel/builds/gnutls/gl' make[5]: *** [all] Error 2 make[5]: Leaving directory `/home/user/down/optware/cs04q3armel/builds/gnutls/gl' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/user/down/optware/cs04q3armel/builds/gnutls' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/user/down/optware/cs04q3armel/builds/gnutls' make[2]: *** [/home/user/down/optware/cs04q3armel/builds/gnutls/.built] Error 2 make[2]: Leaving directory `/home/user/down/optware/cs04q3armel' make[1]: *** [/home/user/down/optware/cs04q3armel/builds/iksemel/.configured] Error 2 make[1]: Leaving directory `/home/user/down/optware/cs04q3armel' make: *** [/home/user/down/optware/cs04q3armel/builds/asterisk14/.configured] Error 2 I then tried to build other packages such as arping, which could be compiled without any problems and ran on my slug! Further, i compiled the asterisk package for the nslu2 platform (instead of cs04q3armel), again without any errors, but the resulting binaries did not run due endianess issues. Debian/Slug is little-endian while most other nslu2-linuxes seem to be big-endianed. Could a friendly and helpful soul out there have a heart with me and tell me how to produce a working package? Thanks in advance! Greetings, Fabiano [1] http://www.nslu2-linux.org/wiki/Optware/DebianArmEtch
Fabiano Sidler
2007-Dec-01 17:36 UTC
[asterisk-users] Cross-compiling asterisk-1.4 for Debian on a slug
On Wednesday 28 November 2007 23:27:41 myself wrote:> [..] > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1225: error: dereferencing pointer to incomplete type > dlfcn.c:1230: error: dereferencing pointer to incomplete type > dlfcn.c:1231: error: dereferencing pointer to incomplete type > dlfcn.c:1234: error: invalid application of `sizeof' to incomplete type > `mach_header' > dlfcn.c:1235: error: dereferencing pointer to incomplete type > dlfcn.c:1235: error: dereferencing pointer to incomplete type > dlfcn.c:1237: error: `LC_SYMTAB' undeclared (first use in this function) > dlfcn.c:1237: error: dereferencing pointer to incomplete type > dlfcn.c:1240: error: dereferencing pointer to incomplete type > dlfcn.c:1241: error: dereferencing pointer to incomplete type > dlfcn.c:1244: error: dereferencing pointer to incomplete type > dlfcn.c:1249: error: dereferencing pointer to incomplete type > dlfcn.c:1250: error: dereferencing pointer to incomplete type > dlfcn.c:1250: error: `N_PEXT' undeclared (first use in this function) > dlfcn.c:1251: error: dereferencing pointer to incomplete type > dlfcn.c:1251: error: `N_EXT' undeclared (first use in this function) > dlfcn.c:1254: error: increment of pointer to unknown structure > dlfcn.c:1254: error: arithmetic on pointer to an incomplete type > dlfcn.c:1257: error: dereferencing pointer to incomplete type > dlfcn.c:1257: error: dereferencing pointer to incomplete type > dlfcn.c:1259: error: dereferencing pointer to incomplete type > dlfcn.c:1262: error: increment of pointer to unknown structure > dlfcn.c:1262: error: arithmetic on pointer to an incomplete type > dlfcn.c:1266: error: dereferencing pointer to incomplete type > dlfcn.c:1267: error: dereferencing pointer to incomplete type > dlfcn.c: In function `search_linked_libs': > dlfcn.c:515: warning: value computed is not used > dlfcn.c: In function `dlsymIntern': > dlfcn.c:563: warning: unsupported arg to `__builtin_return_address' > dlfcn.c: In function `dladdr': > dlfcn.c:1198: warning: value computed is not used > dlfcn.c:1221: warning: value computed is not used > dlfcn.c:1235: warning: value computed is not used > dlfcn.c: At top level: > dlfcn.c:133: error: storage size of `mainStatus' isn't known > dlfcn.c:83: warning: 'NSSymbol' declared `static' but never defined > make[1]: *** [dlfcn.o] Error 1 > make[1]: Leaving directory > `/home/user/down/optware/cs04q3armel/builds/asterisk' > make: *** [/home/user/down/optware/cs04q3armel/builds/asterisk/.built] > Error 2 > > [...] > > gai_strerror.c:61: error: `EAI_IDN_ENCODE' undeclared here (not in a > function) gai_strerror.c:61: error: initializer element is not constant > gai_strerror.c:61: error: (near initialization for `values[16].code') > gai_strerror.c:61: error: initializer element is not constant > gai_strerror.c:61: error: (near initialization for `values[16]') > make[6]: *** [gai_strerror.lo] Error 1 > make[6]: Leaving directory > `/home/user/optware/cs04q3armel/builds/gnutls/gl' make[5]: *** [all] Error > 2 > make[5]: Leaving directory > `/home/user/down/optware/cs04q3armel/builds/gnutls/gl' > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory > `/home/user/down/optware/cs04q3armel/builds/gnutls' make[3]: *** [all] > Error 2 > make[3]: Leaving directory > `/home/user/down/optware/cs04q3armel/builds/gnutls' make[2]: *** > [/home/user/down/optware/cs04q3armel/builds/gnutls/.built] Error 2 > make[2]: Leaving directory `/home/user/down/optware/cs04q3armel' > make[1]: *** > [/home/user/down/optware/cs04q3armel/builds/iksemel/.configured] Error 2 > make[1]: Leaving directory `/home/user/down/optware/cs04q3armel' > make: *** > [/home/user/down/optware/cs04q3armel/builds/asterisk14/.configured] Error 2Hello? Nobody any idea how to fix that or how to compile asterisk-1.4 for Debian/slug on an i686 machine? Or should i ask on the nslu2 mailing list? Greetings, Fabiano