OpenWrt Forum Archive

Topic: Asterisk 1.4 compile fail on kamikaze X86

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi All,
I try to buid asterisk follow http://zandbelt.dyndns.org/asterisk.html
on kamikaze x86 found message below.  how to fix it ?

Dome C.

utils.o: In function `ast_atomic_dec_and_test':
/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1/include/asterisk/lock.h:741: undefined reference to `__sync_sub_and_fetch_4'
utils.o: In function `ast_atomic_fetchadd_int':
/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1/include/asterisk/lock.h:707: undefined reference to `__sync_fetch_and_add_4'
collect2: ld returned 1 exit status

Can you provide the config.log output in the build directory for the part where the sync_fetch_and_add check is done?

Hans.

Hi Hans,
not found sync_fetch_and_add
oem@dome-desktop:~/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1$ cat config.guess  |grep fetch
oem@dome-desktop:~/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1$

and found some error

oem@dome-desktop:~/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1$ cat x
configure:15358: checking libkern/OSAtomic.h usability
configure:15375: i386-linux-uclibc-gcc -c -O2 -pipe -march=i486 -funit-at-a-time -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/usr/include -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/include -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/usr/include/mysql -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/usr/include/speex -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/usr/include -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/include -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/usr/include -I/home/oem/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/staging_dir_i386/include conftest.c >&5
conftest.c:166:30: error: libkern/OSAtomic.h: No such file or directory


Dome C.

dome wrote:

oem@dome-desktop:~/devel/asterisk/OpenWrt-SDK-x86-2.6-for-Linux-i686/build_i386/asterisk-1.4.1$ cat config.guess  |grep fetch

Well, I meant the config.log, not the config.guess...
Anyway I managed to reproduce the issue and then I was able to fix it.

dome wrote:

conftest.c:166:30: error: libkern/OSAtomic.h: No such file or directory

That is not the problem; it's only relevant on OSX.

The problem is that the Asterisk main Makefile overrides the "-march" compiler flag setting from the toolchain (i486) by its own (i386).
I have produced a patch that removes explicit "-march" setting from the Asterisk Makefile, since the buildroot environment takes care of that.
The patch on the packages directory is at: http://zandbelt.dyndns.org/asterisk/ope … arch.patch (the implied patch on Asterisk is for 1.4.2, but I guess it will also apply to 1.4.1, or else you can just manually put in the fix).

I'll include this one in the 1.4.2 patch that is pending for inclusion in the OpenWRT packages tree.

Hans.

Hans,

Have you by chance built 1.4.4 on the new Kamikaze SDK yet? 

I tried your 1.4.4 on a WRTSL54GS with a fresh Kamikaze install, and it just complains
with (aborted)..  No debug, out core dump, just aborts.

I'm testing the 1.2.16 from the kamikaze packages, and it works fine as advertized,
but I hoping to stay on 1.4.4 with my move from a HP Celeron based switch..

Bill

savoy wrote:

I tried your 1.4.4 on a WRTSL54GS with a fresh Kamikaze install, and it just complains
with (aborted)..  No debug, out core dump, just aborts.

The packages on the ipkg repository I provided so far are meant for whiterussian, which is also indicated in the name of the ipkg entry
Now I have also put up Asterisk 1.4.4 mipsel packages for Kamikaze at:

  [ipkg entry] http://members.home.nl/hans.zandbelt/op … erisk-1.4/

Hans.

awesome.. Thanks Hans.. I'll give them a try tonight.   

Bill

Installs and starts.  Will begin porting configs over. 

Which directory does the voicemail app store the vm tree in?   I need to move it to a USB flash filesystem and get it off the core flash..   
I don't remember being an option in asterisk.conf to specify the location of the vm tree..

Bill

savoy wrote:

Which directory does the voicemail app store the vm tree in?   I need to move it to a USB flash filesystem and get it off the core flash..   
I don't remember being an option in asterisk.conf to specify the location of the vm tree..

Use the config entry:

   astspooldir => <dir>

in your asterisk.conf; this is the root path used for the vm storage.

Hans.

so I'm a little confused now...

this packages belong to the mipsel architecture, while the origin topic said "X86"..
so is there any way to do the same for the x86 architecture?
or did this topic just mean compiling on x86 architecture, not for x86??

I'm looking for asterisk on Kamikaze x86, but unfortunately I can't build it...

Hello Hans and other fans of asterisk at OpenWrt!!!

I'd like to install asterisk 1.4 on ASUS wl-500gp for production environement at my friend's office.
Since Kamikaze hits its first release, what's the best choice to go with to built internet gateway and micro asterisk server ... Whiterussian or Kamikaze.. ?
And which one of releases (Whiterussian or Kamikaze) will be used for future development of asterisk package?

Sincerely
Kirill

I am currently running Kamikaze 7.06 with Asterisk 1.2.16 and everything is working very good.

cyberjunk wrote:

this packages belong to the mipsel architecture, while the origin topic said "X86"..
so is there any way to do the same for the x86 architecture?
or did this topic just mean compiling on x86 architecture, not for x86??

ehm, well no it didn't...

cyberjunk wrote:

I'm looking for asterisk on Kamikaze x86, but unfortunately I can't build it...

I've added a repository for that as described at http://zandbelt.dyndns.org/asterisk.html

Hans.

jcgalvez wrote:

I am currently running Kamikaze 7.06 with Asterisk 1.2.16 and everything is working very good.

What Hardware do i need too? (USB to ISDN)
Except the ASUS WL500gp.

(Last edited by Mattik on 31 Jul 2007, 22:45)

oeeehm.... correct me please if I'm wrong- just trying to give a small overview:


Mattik:
I think using asterisk with openwrt is still restricted to SIP connections only?
(other protocols that use network (tcp,udp,...) for transfering may also work - I'm no expert in VoIP).
If you want to use a traditional phone-line or ISDN for example make sure you keep the following in mind:

1. The kernel needs drivers for your hardware
2. Asterisk needs to be able to talk to the hardware (CAPI...)

So, most 2.6 kernels shipped with full distributions like debian, ubuntu, suse for example contain a lot of ISDN card drivers (FritzCard for example),
you can then install a CAPI and use asterisk with chan_capi for example (I'm currently running asterisk 1.4 on debian etch with a passive old PCI fritzcard  (using avm capi) and it works fine..)

The Asus WL-500gP only has USB-ports, so you first have to make sure there are linux drivers for that USB-ISDN hardware, then you probably have to build your own OpenWRT kernel/image after you compiled that drivers for openwrt or create a "kmod..." package for them that others can also use... last but not least you may need a CAPI (I'm using the AVM capi on my debian), which you also have to build for OpenWRT and the asterisk chan_capi support... you may run in a lot of trouble when compiling all this for openwrt, because openwrt uses a different C "base-library" (uclibc) instead of libc that is used on full-distributions...


as you can see, there is much work to be done and I'm not sure wether it is possible or not at all... may be there are already some USB-ISDN drivers available as packages - anyway, that was the point when I decided to use a debian-etch system instead of openwrt for that....

oh.. by the way, another solution would be to use PCI-express ISDN cards, which are also available ( expansive sad ).. but the thing would be quite equal...

@cyberjunk

Thank you for your completely answer.

Maybe, the better way for CAPI could be to use debian-etch on a notebook.

We really need to get this into Kamikaze trunk.  Today, I'm trying to build Asterisk 1.4.9 for brcm-2.6, but the Kamikaze versions of Zandbelt's builds are only in ipk format.  No SDK Makefiles or patches have been published.   Looks like I'm stuck doing it from scratch.  sad

Zandbelt submitted patches over 5 months ago, but they have never been touched.  Now they are out of date as he has evolved the Asterisk build from 1.4.2 to 1.4.9.

It's really hard to contribute when the sources are controlled by one person.  Oh yeah, thats what the GPL intended to prevent.

(Last edited by lschweiss on 3 Sep 2007, 16:04)

The discussion might have continued from here.