cc1: error: unrecognized command line option "-Wunused-but-set-variable"

При компиляции SpanDSP 0.0.6 на Centos 5 возникает ошибка:

 cc1: error: unrecognized command line option "-Wunused-but-set-variable"

Возможная причина устаревшие версии autoconf и automake.

Решение

   cd /usr/src
   
   yum install libtool
 
    wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/tpokorra:/openpetra/CentOS_CentOS-5/i386/autoconf-2.69-3.2.i386.rpm

   rpm -Uhv autoconf-2.69-3.2.i386.rpm
   
    wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/tpokorra:/openpetra/CentOS_CentOS-5/x86_64/automake-1.13-10.1.x86_64.rpm
    
    rpm -Uhv automake-1.13-10.1.x86_64.rpm
    
   wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz
   
   tar zxvf spandsp-0.0.6.tar.gz
   
   cd spandsp-0.0.6
   
   autoreconf --force --install
   
   ./configure
   
   make 
   
   make install
   
для 64 битной системы:
   
   ln -s /usr/local/lib/libspandsp.so.2 /usr/lib64/libspandsp.so.2
   

Проверим:

asterisk -rx "core restart now"

CLI> module show like fax
Module                         Description                              Use Count  Status
res_fax.so                     Generic FAX Applications                 1          Running
res_fax_spandsp.so             Spandsp G.711 and T.38 FAX Technologies  0          Running
2 modules loaded

Troubleshooting

  • troubleshooting/spandsp_make_wunused-but-set-variable.txt
  • Последние изменения: 2016/12/15