LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2012, 06:49 AM   #1
nosica
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Rep: Reputation: Disabled
Problems with Sofia-Sip


hello!

I'm a total newbie to the topic "sofia-sip" and my experiences in Linux are also not that good, so I wanted to start with a "hello-world" from http://gitorious.org/sofia-sip/pages/SofiaTutorial. I use Ubuntu on a Virtual Box, have run the installation with

./configure
make
make install

and have set the following symbolic links

ln -s /usr/local/lib/pkgconfig/sofia-sip-ua.pc /usr/lib/pkgconfig/sofia-sip-ua.pc
ln -s /usr/local/lib/pkgconfig/sofia-sip-ua-glib.pc /usr/lib/pkgconfig/sofia-sip-ua-glib.pc
sudo ln -s libsofia-sip-ua.so /usr/lib/libsofia-sip-ua.so (although I think it's not necessary)

Now my problem is the following: when I run the makefile, these error occur:

user@shafner:~/Sofia_SIP/Wrapper/HelloSofiaSIP$ make
gcc `pkg-config sofia-sip-ua --cflags --libs` -DCALLER -g -O0 -L/usr/lib/libsu.a -L/usr/lib/libsofia-sip-ua.so -L/usr/lib/libsofia-sip-ua.so.0 -L/usr/lib/libsofia-sip-ua.so.0.6.0 -L/usr/lib/pkgconfig/sofia-sip-ua.pc -L/usr/lib/pkgconfig/sofia-sip-ua-glib.pc -L/usr/lib -lsofia-sip-ua \
-o hello-caller hello.c
/tmp/ccd8nC1t.o: In function `main':
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:32: undefined reference to `su_init'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:33: undefined reference to `su_root_create'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:40: undefined reference to `nutag_url'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:40: undefined reference to `nua_create'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:55: undefined reference to `su_root_run'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:58: undefined reference to `nua_destroy'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:59: undefined reference to `su_root_destroy'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:60: undefined reference to `su_deinit'
/tmp/ccd8nC1t.o: In function `event_callback':
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:78: undefined reference to `nua_event_name'
/tmp/ccd8nC1t.o: In function `send_message':
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:88: undefined reference to `siptag_to_str'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:88: undefined reference to `nua_handle'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:90: undefined reference to `siptag_payload_str'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:90: undefined reference to `siptag_content_type_str'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:90: undefined reference to `nua_message'
/home/user/Sofia_SIP/Wrapper/HelloSofiaSIP/hello.c:95: undefined reference to `nua_handle_destroy'
collect2: ld returned 1 exit status
make: *** [hello-caller] Error 1

The functions, which are displayed above, belong to the su part of sofia-sip. The including of su.h (so that I can see that at least the errors with su_init and su_deinit are solved) in hello.c didn't change anything. I also tried to modify the makefile, now it's a bit of a mess, because I added some linkings successively:

CFLAGS = -g -O0

all: hello-caller hello-callee

hello-caller: hello.c
gcc `pkg-config sofia-sip-ua --cflags --libs` -DCALLER $(CFLAGS) -L/usr/lib/libsu.a -L/usr/lib/libsofia-sip-ua.so -L/usr/lib/pkgconfig/sofia-sip-ua.pc -L/usr/lib/pkgconfig/sofia-sip-ua-glib.pc -L/usr/lib -lsofia-sip-ua \
-o hello-caller hello.c

hello-callee: hello.c
gcc `pkg-config sofia-sip-ua --cflags --libs` $(CFLAGS) -L/usr/lib/libsu.a -L/usr/lib/pkgconfig/sofia-sip-ua.pc -L/usr/lib/libsofia-sip-ua.so -L/usr/lib/pkgconfig/sofia-sip-ua-glib.pc -L/usr/lib -lsofia-sip-ua \
-o hello-callee hello.c

clean:
rm hello-caller hello-callee


Does anyone of you please could help me or have experience with sofia sip?

Best regards,
nosica
 
Old 02-10-2012, 10:02 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A) ?Errors? in your Makefile :
1) -L/usr/lib/libsu.a : ? ? Not to be used. AFAIK.
2) -L/usr/lib/pkgconfig/sofia-sip-ua.pc , ///sofia-sip-ua-glib.pc:
.... You cannot link against text files.

B) -L/usr/lib/libsofia-sip-ua.so.0.6.0 : Not to be used at link time.

C) Other possible error :
sudo ln -s libsofia-sip-ua.so /usr/lib/libsofia-sip-ua.so :
Will usually not create a valid link.
.. A proof metod is : cd /usr/lib/ &&
sudo ln -s /usr/local/lib/libsofia-sip-ua.so


A Makefile that works :
Code:
CFLAGS = -g -O0

all: hello-caller hello-callee

hello-caller: hello.c  
	 gcc $(CFLAGS) -Dcaller hello.c -o hello-caller \
	`pkg-config sofia-sip-ua --cflags --libs`

hello-callee: hello.c  
	gcc $(CFLAGS) hello.c -o hello-callee \
	`pkg-config sofia-sip-ua --cflags --libs`	 

clean:  
	rm hello-caller hello-callee

Last edited by knudfl; 02-10-2012 at 01:57 PM.
 
Old 02-14-2012, 06:57 AM   #3
nosica
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you!!! :-)
 
  


Reply



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
Latest Voipswitch 2.0.745+webportal+sip Tunnel+sip Dialer(costumize)+pc2phone+web/ani solution4voip Linux - Software 1 02-16-2007 06:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:18 AM.

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
Open Source Consulting | Domain Registration