[asterisk-dev] Beginner question - Opening project in kdevelop
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Tue May 1 03:35:35 MST 2007
On Tue, May 01, 2007 at 12:14:51PM +0300, Diego Iastrubni wrote:
> 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
Why?
Asterisk already has a configure script.
> 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.
Asterisk uses autoconf, but not automake (and not libtool).
(And for the record: I have nothing to say in favour of menuselect)
>
> 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.
make CMD_PREFIX=
to get the longer commands....
>
> I will leave the fun of running asterisk on kdevelop to you. Please do
> remember, that asterisk will not be running as "root",
So do not attempt to use -p or -U. -c will be handy, though. You'll
also need custom pathes in order not to write on parts of the system
owned by 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.
Also note that asterisk is multi-threaded....
>
> 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.
I while ago I reported to this list this issue with my IDE (vim). I
ended up using a wrapper for make, running basically 'cd ..; make' . This
was acceptable as I was only interested in one file (chan_zap.c in my
case. This is useful if you're only interested in files from one
directory).
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir at jabber.org
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list