Issue Building Asterisk

This forum is for topics dealing with problems with software specifically in the ARMv6h repo.

Issue Building Asterisk

Postby zap » Thu Nov 20, 2014 2:15 am

Hello, I was trying to build Asterisk from source on a Raspberry Pi and ran into this little error after issuing a make command.

$this->bbcode_second_pass_code('', '[pi@alarmpi asterisk-1.4.44]$ make
[CC] src/add.c -> src/add.o
gcc: error: unrecognized argument in option '-march=armv6l'
gcc: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
gcc: error: unrecognized argument in option '-march=armv6l'
gcc: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
/home/pi/builds/asterisk-1.4.44/Makefile.rules:91: recipe for target 'src/add.o' failed
make[2]: *** [src/add.o] Error 1
Makefile:50: recipe for target 'gsm/lib/libgsm.a' failed
make[1]: *** [gsm/lib/libgsm.a] Error 2
Makefile:369: recipe for target 'codecs' failed
make: *** [codecs] Error 2
')

I'm a little new to reading into make errors and get the feeling that gcc is not liking the -march=armv6l…any suggestions on how to correct these two errors?
zap
 
Posts: 6
Joined: Thu Nov 20, 2014 2:08 am

Re: Issue Building Asterisk

Postby moonman » Thu Nov 20, 2014 2:21 am

Why are you building from source when it is easier to modify a PKGBUILD If you dont like something about the pckage in repos. There is also AUR which may already have what you are looking for. If you still want to do it your way then see what march is used under /etc/makepkg.conf
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Issue Building Asterisk

Postby zap » Thu Nov 20, 2014 4:17 am

Simple. Current LTS version of Asterisk is 1.8 (available in the AUR). Oldest version available in the AUR is 1.6. I need a module that Asterisk stopped supporting in 1.4 (which is why I'm building the lastest version of 1.4).

The only reference to -march in the makepkg.conf file is in the CFLAGS and CXXFLAGS line which are stated as -march=armv6
zap
 
Posts: 6
Joined: Thu Nov 20, 2014 2:08 am

Re: Issue Building Asterisk

Postby moonman » Thu Nov 20, 2014 11:39 am

Ok, makes sense.
That is what all the packages are built with. If you want to be more specific: -mcpu=arm1176jzf-s
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Issue Building Asterisk

Postby zap » Thu Nov 20, 2014 9:53 pm

So I guess the question still remains, where is gcc grabbing "-march=armv6l"?
zap
 
Posts: 6
Joined: Thu Nov 20, 2014 2:08 am

Re: Issue Building Asterisk

Postby pepedog » Thu Nov 20, 2014 10:21 pm

pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Issue Building Asterisk

Postby moonman » Fri Nov 21, 2014 10:06 am

Don't know if this will work, but worth a try (if you haven't tried this already)
$this->bbcode_second_pass_code('', 'export CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
export CXXFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"')
and then you run make.

EDIT: I tried it. The hack is to edit "makeopts" after running ./configure to change arch to armv6. It still errors out with assembler errors:
$this->bbcode_second_pass_code('', ' [AS] src/k6opt.s -> src/k6opt.o
src/k6opt.s: Assembler messages:
src/k6opt.s:6: Error: unrecognized symbol type ""
src/k6opt.s:9: Error: unknown pseudo-op: `.value'
src/k6opt.s:10: Error: unknown pseudo-op: `.value'
src/k6opt.s:11: Error: unknown pseudo-op: `.value'
src/k6opt.s:12: Error: unknown pseudo-op: `.value'
src/k6opt.s:13: Error: unknown pseudo-op: `.value'
src/k6opt.s:14: Error: unknown pseudo-op: `.value'
src/k6opt.s:15: Error: unknown pseudo-op: `.value'
src/k6opt.s:16: Error: unknown pseudo-op: `.value'
src/k6opt.s:17: Error: unknown pseudo-op: `.value'
src/k6opt.s:18: Error: unknown pseudo-op: `.value'
src/k6opt.s:19: Error: unknown pseudo-op: `.value'
src/k6opt.s:20: Error: unknown pseudo-op: `.value'
src/k6opt.s:25: Error: unrecognized symbol type ""
src/k6opt.s:27: Error: bad instruction `pushl %ebp'
src/k6opt.s:28: Error: bad instruction `movl %esp,%ebp'
src/k6opt.s:29: Error: bad instruction `pushl %edi'
src/k6opt.s:30: Error: bad instruction `pushl %esi'
src/k6opt.s:31: Error: bad instruction `pushl %ebx'
src/k6opt.s:32: Error: bad instruction `movl 12(%ebp),%edi'
src/k6opt.s:33: Error: bad instruction `movl 8(%ebp),%ebx'
src/k6opt.s:34: Error: bad instruction `addl $-10,%ebx'
src/k6opt.s:35: Error: bad instruction `emms'
src/k6opt.s:36: Error: bad instruction `movl $0x1000,%eax'
src/k6opt.s:36: Error: bad instruction `movd %eax,%mm5'
.
.
.')

Source might be too outdated. I did not dig any deeper and only tried on armv7 in armv6 chroot. Try it on the Pi just in case...

EDIT2: - Install gsm: pacman -Sy gsm
- Configure with
$this->bbcode_second_pass_code('', './configure --with-gsm=/usr')
- Edit "makeopts" and replace armv6l with armv6 (about 3 instances I think)
- run make

It built for me, don't know if it works or not. Good Luck.
$this->bbcode_second_pass_code('', '+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running: +
+ +
+ make install +
+-------------------------------------------+')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Issue Building Asterisk

Postby zap » Sun Nov 23, 2014 7:13 pm

That has seemed to have worked.
zap
 
Posts: 6
Joined: Thu Nov 20, 2014 2:08 am


Return to ARMv6h

Who is online

Users browsing this forum: No registered users and 15 guests