LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-12-2008, 09:21 AM   #1
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Dynamic Libraries - Asterisk - CentOS5


Hello all and mtia.

I decided to test out a few new items within Asterisk 1.4.18 (Swift,Flite). So I set up a test box, pretty much a vanilla CentOS 5.1(a few various updates). Asterisk also is pretty much vanilla except tha addons package.

After installing Swift and Flite I needed to update /etc/ld.so.conf, I did

Code:
$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
include /usr/local/lib
include /opt/swift/lib
I ran ldconfig. I try and load the module within Asterisk and it says cannot find items.

Code:
CLI>]load app_swift.so
[Mar 12 09:16:45] WARNING[10297]: loader.c:363 load_dynamic_module: Error loading module 'app_swift.so': libswift.so.4: cannot open shared object file: No such file or directory
[Mar 12 09:16:45] WARNING[10297]: loader.c:649 load_resource: Module 'app_swift.so' could not be loaded.
Code:
ls -Al /usr/lib/asterisk/modules/app_swift.so
-rwxr-xr-x 1 root root 34721 Mar 11 22:08 /usr/lib/asterisk/modules/app_swift.so
Code:
ls -Al /usr/local/lib/
total 13436
lrwxrwxrwx 1 root root      20 Mar 11 14:17 libflite_cmulex.so -> libflite_cmulex.so.1
lrwxrwxrwx 1 root root      22 Mar 11 14:17 libflite_cmulex.so.1 -> libflite_cmulex.so.1.3
-rwxr-xr-x 1 root root  610941 Mar 11 14:15 libflite_cmulex.so.1.3
lrwxrwxrwx 1 root root      26 Mar 11 14:17 libflite_cmu_time_awb.so -> libflite_cmu_time_awb.so.1
lrwxrwxrwx 1 root root      28 Mar 11 14:17 libflite_cmu_time_awb.so.1 -> libflite_cmu_time_awb.so.1.3
-rwxr-xr-x 1 root root 6800530 Mar 11 14:15 libflite_cmu_time_awb.so.1.3
lrwxrwxrwx 1 root root      26 Mar 11 14:17 libflite_cmu_us_kal16.so -> libflite_cmu_us_kal16.so.1
lrwxrwxrwx 1 root root      28 Mar 11 14:17 libflite_cmu_us_kal16.so.1 -> libflite_cmu_us_kal16.so.1.3
-rwxr-xr-x 1 root root 3714816 Mar 11 14:15 libflite_cmu_us_kal16.so.1.3
lrwxrwxrwx 1 root root      24 Mar 11 14:17 libflite_cmu_us_kal.so -> libflite_cmu_us_kal.so.1
lrwxrwxrwx 1 root root      26 Mar 11 14:17 libflite_cmu_us_kal.so.1 -> libflite_cmu_us_kal.so.1.3
-rwxr-xr-x 1 root root 1987454 Mar 11 14:15 libflite_cmu_us_kal.so.1.3
lrwxrwxrwx 1 root root      13 Mar 11 14:17 libflite.so -> libflite.so.1
lrwxrwxrwx 1 root root      15 Mar 11 14:17 libflite.so.1 -> libflite.so.1.3
-rwxr-xr-x 1 root root  390081 Mar 11 14:15 libflite.so.1.3
lrwxrwxrwx 1 root root      23 Mar 11 14:17 libflite_usenglish.so -> libflite_usenglish.so.1
lrwxrwxrwx 1 root root      25 Mar 11 14:17 libflite_usenglish.so.1 -> libflite_usenglish.so.1.3
-rwxr-xr-x 1 root root  206932 Mar 11 14:15 libflite_usenglish.so.1.3
The Asterisk process is running as root.

Code:
ps aux | grep asterisk
root     10253  0.0  0.0   4496   536 pts/0    S    09:16   0:00 /bin/bash /usr/sbin/safe_asterisk
root     10259  0.2  0.4  24636  8164 pts/0    Sl   09:16   0:00 /usr/sbin/asterisk -f -vvvg -c
Not sure if below is cool or not as Asterisk may provide some of this itself.
Code:
 ldd /usr/lib/asterisk/modules/app_swift.so
        linux-gate.so.1 =>  (0x001bc000)
        libswift.so.4 => not found
        libm.so.6 => /lib/libm.so.6 (0x005cd000)
        libceplang_en.so.4 => not found
        libceplex_us.so.4 => not found
        libc.so.6 => /lib/libc.so.6 (0x001bd000)
        /lib/ld-linux.so.2 (0x009db000)

So I guess my question is, how can I get Asterisk to properly find my libraries? Kinda stumped here.

mtia and will gladly provide more info if asked.
 
Old 03-12-2008, 09:33 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Did you restart Asterisk after running ldconfig? What does 'ldconfig -p | grep libswift' return? And 'ldd /usr/sbin/asterisk | grep libswift'? Does running ldd on app_swift.so with exported "LD_LIBRARY_PATH=/opt/swift/lib" work (if that's where I think libswift.so.4 resides)?
 
Old 03-12-2008, 07:44 PM   #3
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Thanks for the reply unSpawn.

Quote:
Did you restart Asterisk after running ldconfig?
Yes and a few full reboots.

Quote:
What does 'ldconfig -p | grep libswift' return? And 'ldd /usr/sbin/asterisk | grep libswift'?
Nothing.

Quote:
Does running ldd on app_swift.so with exported "LD_LIBRARY_PATH=/opt/swift/lib" work (if that's where I think libswift.so.4 resides)?
Yes.

Code:
[root@testrig ~]#  ldd /usr/lib/asterisk/modules/app_swift.so
        linux-gate.so.1 =>  (0x00c9a000)
        libswift.so.4 => /opt/swift/lib/libswift.so.4 (0x00729000)
        libm.so.6 => /lib/libm.so.6 (0x001b1000)
        libceplang_en.so.4 => /opt/swift/lib/libceplang_en.so.4 (0x00c20000)
        libceplex_us.so.4 => /opt/swift/lib/libceplex_us.so.4 (0x003f6000)
        libc.so.6 => /lib/libc.so.6 (0x00a6d000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00977000)
        libdl.so.2 => /lib/libdl.so.2 (0x00c11000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00110000)
        librt.so.1 => /lib/librt.so.1 (0x00f4a000)
        /lib/ld-linux.so.2 (0x009db000)
Still even after rebooting asterisk and in same session as export;

Code:
CLI> module load app_swift.so
[Mar 12 19:42:04] WARNING[3557]: loader.c:363 load_dynamic_module: Error loading module 'app_swift.so': libswift.so.4: cannot open shared object file: No such file or directory
[Mar 12 19:42:04] WARNING[3557]: loader.c:649 load_resource: Module 'app_swift.so' could not be loaded.
Anymore ideas, to me ldd command on asterisk above implies it does not need the app_swift library's or doesnt know it needs to..am I reading that correctly?

mtia

Last edited by lord-fu; 03-12-2008 at 08:46 PM.
 
Old 03-13-2008, 04:55 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Quote:
Originally Posted by lord-fu View Post
Still even after rebooting asterisk and in same session as export;

Code:
CLI> module load app_swift.so
[Mar 12 19:42:04] WARNING[3557]: loader.c:363 load_dynamic_module: Error loading module 'app_swift.so': libswift.so.4: cannot open shared object file: No such file or directory
[Mar 12 19:42:04] WARNING[3557]: loader.c:649 load_resource: Module 'app_swift.so' could not be loaded.
Anymore ideas, to me ldd command on asterisk above implies it does not need the app_swift library's or doesnt know it needs to..am I reading that correctly?
I'd say it's more a case of it not knowing where to look, but 'ldconfig -p' or the "export" should have pointed it the right way. It appears Asterisk isn't provided as RPM but as tarballs (at least the HOWTO I read), are you sure the modules are for the corresponding version of Asterisk? Where there any compile-time options that could have screwed up this? No AVC messages in /var/log/messages or /var/log/audit/audit.log by any chance? If you start Asterisk with maximum verbosity and try again, does it show more clues?
 
Old 03-17-2008, 08:28 AM   #5
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Hello unSpawn and thanks. Sorry for the late reply but I have had strep throat for the last few days :[

Yes it was a source build but I only did the standard compile mantra no extra arguments thrown to the compiler.
./configure && make && make install

The swift package says it is asterisk 1.4 compatable, if you feel so inclined the description is below in the link.
http://www.loopfree.net/app_swift/

I have tried a few other source compiles of different packages while trying to get TTS(Text to Speech) software used within asterisk. The packages compile fine but as you noticed getting asterisk to see them is a different story I guess. Which is odd as on other production machines (Fedora 6) I have not had this problem, although I have not tried these specific packages but items like RX and TXfax.

I have not seen anything in the logs(could be me, will look closer).

Yeh I have tried up to 7 verbosity level always the same thing.

Thanks again.

Last edited by lord-fu; 03-17-2008 at 09:14 AM. Reason: added more
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
static and dynamic libraries nesta Programming 11 09-04-2011 09:36 PM
xdoom not able to load dynamic libraries. camelNotation Linux - Games 1 02-11-2007 04:02 PM
Dynamic link libraries eshwar_ind Programming 1 05-10-2004 12:02 AM
Mixing Shared and Dynamic Libraries linuxeco Programming 1 02-02-2003 10:04 PM
linux dynamic libraries aizkorri Programming 4 10-09-2002 04:26 AM


All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration