Build­ing and installing asterisk-addons

Once upon a time I’ve dist-upgraded Debian GNU/Linux “Etch” with some extra repos­it­or­ies, found that aster­isk failed to start because of MySQL connection:

asterisk: relocation error: /usr/lib/odbc/libmyodbc.so: \
    symbol mysql_odbc_escape_string, version libmysqlclient_15 \
    not defined in file libmysqlclient_r.so.15 with link time reference

I was using ODBC to authen­tic­ate After googling I figured out that it seems like nobody’s going to fix this prob­lem. So I’ve decided to install asterisk-addons to switch to res_mysql

Of course the most straight decision was to upgrade MySQL cli­ent to make my res_odbc work again. And, in fact, I’ve tried this way, but as it involved upgrad­ing of too many things, and as it was too risky to make such changes on that server I’ve decided just to install asterisk-addons. Also, on that server aster­isk was using MySQL only for SIP users’ authen­tic­a­tion and had only one macro with query to the data­base. So fix­ing of dial­plan was not a big deal.

So I’ve down­loaded latest asterisk-addons, unpacked them, ran ./configure and tried to com­pile, but some­thing went wrong:

$ make
menuselect/menuselect --check-deps   menuselect.makeopts
Generating embedded module rules ...
make[1]: Nothing to be done for `all'.
   [CC] app_addon_sql_mysql.c -> app_addon_sql_mysql.o
app_addon_sql_mysql.c:19:22: error: asterisk.h: No such file or directory
...
make[1]: *** [app_addon_sql_mysql.o] Error 1
make: *** [apps] Error 2

After I spent some time try­ing to fig­ure out what’s going on, I found chat logs where I found the solu­tion. In fact I’ve found not only solu­tion, but an idea where to got everything needed to fix my prob­lem :)) So now I’ll never for­get to look at ./configure --help before I’ll start googling. And solu­tion for me was very easy :)) asterisk-addons simply wanted to know where I have installed aster­isk. And as I’ve installed aster­isk with --prefix=/home/asterisk all I had to do is to spe­cify --with-asterisk=/home/asterisk:

$ ./configure --prefix=/home/asterisk \
              --with-asterisk=/home/asterisk
  • del.icio.us
  • Google Bookmarks
  • Identi.ca
  • Twitter
  • Technorati
  • Digg
  • Slashdot
  • Facebook
  • MisterWong
  • Reddit
  • StumbleUpon
  • Mixx
  • HelloTxt
  • LinkedIn
  • PDF
  • email
  • Print
This entry was posted in Asterisk PBX and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>