Compiling Asterisk for a different CPU


#1

All I have here are AMD 32 and 64 machines. I need to configure an Asterisk system and send the disks to a distant city where they will be installed in a ASUS/P4 machine.

How can I compile Asterisk for the P4?

Thanks


#2

how are you intending to distribute/install asterisk if not from source ? wouldn’t it make more sense to send 1 or more tarballs of the various zaptel/libpri/asterisk etc directories from /usr/src/ and write a little script to make and install ? if you have config files you could then use the same script to copy them into the appropriate directories.

or are the “disks” HDDs ?

i guess the only other option is to get the cross-compiling tools and specify the target architecture and use a prefix directory for the make install output. but you’ll need kernel sources for your intended host i guess too. have fun !


#3

The system is very old… kernel-2.4.19, etc. I’m having to build an entirely new system starting with FC4 and Asterisk 1.2.4.

The customer has offices in three countries. To facilitate maintenance, these new systems will mirror each other as far as installed software.

So, back to my original question. Can I compile Asterisk using an AMD processor and then plug the disks into a P4 system. Will programs compiled with -m i686 run on either processor?

Thanks


#4

The compiled software shouldn’t be an issue as i686 would cover both a P4 and an Athlon 64, but the issue that WILL arise is that the two systems have completely different hardware. The first time you boot the other machines they’re either going to find an entire system’s worth of new hardware (and then tell you that everything you had before is missing), or not work at all if you don’t have Kudzu turned on.


#5

if you want binary work on evry platform you must create it with for i686 with STATIC libs. and with kernel in safe mode )) . but it willl be very bad work :wink:

i think it will be better to create special script wich will compile it.
like this

#!/bin/sh
tar -xzf asterisk-?.?.?.tgz
path=pwd
mkdir asteriskworking
cd asterisk*
./configure --prefix=${path}/asteriskworking/
make install
cd ${path}/asteriskworking/
tar -xzf …/configs_and_other_needed_files.tgz

all will be done in 10 minutes, if you have all nessesary lib,devels, gcc and bison :wink: but you can install all you need.
or do all work via ssh.
ps FC4 kernel and libs compiled for “i686”