[asterisk-dev] Cross-compiling for embedded platforms using openWRT

Brian Capouch brianc at palaver.net
Sun Dec 31 21:51:31 MST 2006


Kevin P. Fleming wrote:
> Brian Capouch wrote:
> 
>>The second thing is the way the menuselect process works; the menuselect
>>app is compiled and run at configure time.  In this cross-compile
>>environment, it compiles menuselect for the MIPSEL CPU and then tries to
>>execute it on my host (Intel) box. The workaround is to go in and
>>manually build and run menuselect on the host machine, and then continue
>>with the cross-build.
> 
> 
> This should not happen; if you are doing your cross-compile setup
> properly (using ./configure --host=mipsel-elf or something similar) then
> the menuselect configure script should configure it for the host. If you
> are doing your cross-compile setup the 'old' way (by overriding CC and
> the like), stop doing that... the Asterisk 1.4 build process knows how
> to handle a cross-compile setup by the configure script itself.

There are a number of problems that result from the various pieces of 
configuration code that build and execute code that make this sort of 
thing pretty thorny.

For instance, it appears as if passing the full path to the mipsel-based 
Postgres libraries to configure doesn't do the trick, because the script 
tries to execute pg_config (on the host system, but it won't work 
because the binaries are for the target arch!!) and so it ignores that 
path and falls back to the place it *can* execute, /usr/local/pgsql, 
which then sets up the wrong libraries for the ultimate linking of the 
dynamic modules based on PGSQL.

I'm trying to find a kludge to get around this, but it seems to me that 
pieces of configure scripts that actually *execute* code (a la 
pg_config) are going to be problematical whenever one is building in a 
cross-compiling environment.

B.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the asterisk-dev mailing list