[asterisk-dev] Beginner question - Opening project in kdevelop

Diego Iastrubni diego.iastrubni at xorcom.com
Tue May 1 02:14:51 MST 2007


On Monday 30 April 2007 18:31, Mihai Balea wrote:
> If you're familiar with kdevelop, you might want to look into
> kscope.  It's a leaner version, designed for C projects.  It really
> helps when you're trying to familiarize yourself with a large code
> base (like Asterisk).  If you find that you're often asking "where is
> this function/structure defined?" or "where is this function
> called?", then kscope might be a better tool for you
... because kdevelop cannot do this...? (on the bottom you will see a button 
which has the label "ctags", trust me it does not make you coffee).

While kscope is great for editing files, but it does not answer the question 
of how do I debug, or how do I compile. One of the reasons I use kdevelop is 
F8 to compile, F4 to find the warning or error, F6 to execute. 

Thiago, 
Each time you ask about IDEs you will get the same answer:
"why aren'y you using vim+bash? you should die because you don't. every thing 
else just stinks. die, or use vim". Some will tell you to use emacs, but very 
few will take the path that you are trying to take

People developing (anything on "linux" and *BSD) are hardcore CLI fans. Those 
of use who don't like CLI and prefear GUI are always the minority. You should 
die and suffer because you are fscking GUI n00i, get a life and use the real 
linux... 

No, instead of bitching, I can do something, I will try to compile asterisk 
1.4.4 with KDevelop 3.3.5.

1st attempt:
ln -s bootstrap.sh autogen.sh
then Build->Run automake & friends
then Build->Run Configure

Only to find out that for some reason, the build-system created by the 
configure scripts in Asterisk 1.4 is so non standard, that kdevelop cannot 
really work with it.

2nd attempt:
untar
./bootstrap.sh
./configure

(funny things:
checking for QDate in -lqt... yes
checking for moc... /usr/bin/moc
..
and that logo is a waste of bytes)

now, we import the project as "custom Makefiles"
now, kdevelop gets stucked, sucking all the memory from my computer (I had to 
login from a remote computer and kill it to get y machine back).

3rd attempt:
same as 2nd, but do not populate the project with files. Now it does work 
better. I can press F8 to compile, 

Don't use "Very short" compiler info" but "Shor compiler info". The reason is 
that the output ([CC] fiile.c -> file.o) is not supported by that option. 

I will leave the fun of running asterisk on kdevelop to you. Please do 
remember, that asterisk will not be running as "root", and it will not work 
with real time priority. Also, don't waste your time with breakpoints, as 
they will not work - the code is "real time", and you just will not be able 
to really debug the application as you really want. Just use ast_verbose or 
ast_debug.

You will also need to run asterisk on an external konsole (lookup the option 
in kdevelop), to have the asterisk CLI.

The functionality of F4 does not work. I hope someone will be able to 
workaround of fix this. The problem is that the file been reported  does not 
contain a path, and kdevelop does not find it. For 
example, "apps/app_dictate.c" is generates "app_dictatate.c" on the output 
which confuses kdevelop. If I get into this more deep, I will be able to 
understand why it fails, since nested Makefiles are supported by kdevelop.

- diego (who compiled asterisk 1.4.4 for the first time, just for this email)


More information about the asterisk-dev mailing list