Asterisk on Raspberry, compilation issue

Hi!
Not sure I am in the right thread for my question. If not, apologize.

I am totally new to Asterisk.

Downloaded Asterisk, and trying to compile it on a freshly installed Raspberry.

Typing: ./configure , I get:

checking build system type… armv7l-unknown-linux-gnueabihf
checking host system type… armv7l-unknown-linux-gnueabihf
checking for gcc… gcc
checking whether the C compiler works… no
configure: error: in /home/ludojoey/tmp/asterisk-13.38.3': configure: error: C compiler cannot create executables See config.log’ for more details

Config.log says:
[…]
configure:3708: $? = 1
configure:3728: checking whether the C compiler works
configure:3750: gcc conftest.c >&5
/usr/lib/gcc/arm-linux-gnueabihf/10/crtbegin.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
configure:3754: $? = 1
configure:3792: result: no
[…]

Seems there is a problem with the crtbegin.o file…

I tried to reinstall gcc and binutils package… Still the same

gcc -v says:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/10/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: …/src/configure -v --with-pkgversion=‘Raspbian 10.2.1-6+rpi1’ --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Raspbian 10.2.1-6+rpi1)

Any ideas? Thanks!

hmm 2 things

  1. Asterisk 13 is extreamly old, and went EOL back in 2021 and will not work on an updated OS woithou major tweeks
    do us all a favor an download the latest version Asterisk 20 LTS or Asterisk 21

  2. witch OS / cpu are you using

also try find som guide on how to install like this first link on google

Thanks for the reply.

libedit-dev sqlite3 libsqlite3-dev libjansson-dev libxml2-dev uuid-dev already installed
Raspberry installed from Imager 1 week ago, updated and upgraded.

Downloaded the last version of Asterisk, and got the same result…

checking whether the C compiler works… no
configure: error: in /home/ludojoey/tmp/asterisk-21.0.0': configure: error: C compiler cannot create executables See config.log’ for more details

and in config.log:

configure:4352: checking whether the C compiler works
configure:4374: gcc conftest.c >&5
/usr/lib/gcc/arm-linux-gnueabihf/10/crtbegin.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
configure:4378: $? = 1
configure:4418: result: no

What I am using:

Linux version 6.1.21-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP Mon Apr 3 17:20:52 BST 2023

cat /etc/debian_version
11.8

cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 11 (bullseye)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian

Quite old but may still be relevant:

Thanks.

In fact, I solved my problem : I changed gcc 10 to gcc 9.
Now I can compile and install.

But facing other issues… Will open a new thread if I cannot solve them!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.