Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

Friday, November 27, 2009

Install Subversion on SunOS 5.10 (Solaris 10)

Hi there,

So this is the story, although I already have a running svn server using VisualSvn on my office station (a wind*z machine), still I couldn't help worried bout something bad might happen to my precious. So I asked my boss whether or not I could use any *nix compliant machine in our network to serve as a Versioning server and get rid of the paranoia. And he gave me one, great !

One little problem, how would I do that ? Did a lot on Linux, few on windows, but on Solaris this would be the first time, hurraaay!!

I'm not sure whether direct linking from my post to sunfreeware packages is allowed or not, so download all the required package from here (all package from step 1 - 14). Most of the text below were retrieved from sunfreeware, wrap it, and added some comment. The idea is when you already download all the software required below, you only need to look at this post till you finish installing svn(hopefully).

to install a .gz package file do the following (assume the .gz file is in /tmp and you are root)

~# cd /tmp
~# gunzip <downloaded_package>.gz
~# pkgadd -d <downloaded_package>

Now I've been spending all night figuring how to install a working subversion (server) to a solaris system, and this is what I've got.

machine :

SunOS 5.10 Generic_125100-09 sun4u sparc SUNW,Sun-Fire-V890.


steps :

You need a root privilege to install packages below, make sure you follow below steps in order, I've arrange these steps based on subversion dependency tree. You might wanna backup the whole /usr/local directory just in case. Now let's begin the journey...
  1. install libgcc-3.4.6-sol10-sparc-local.gz

  2. This package includes the files and links
    libgcc_s.so
    libgcc_s.so.1
    libstdc++.so
    libstdc++.so.6
    libstdc++.so.6.0.3

    in my case my target system already have this library installed, so I skipped the first step.

  3. install openssl-0.9.8l-sol10-sparc-local.gz

  4. openssl is an open source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library - installs in /usr/local/ssl.

  5. install expat-2.0.1-sol10-sparc-local.gz

  6. Expat is a fast, non-validating, stream-oriented XML parsing library - installs in /usr/local.

  7. install zlib-1.2.3-sol10-sparc-local.gz

  8. zlib compression libraries - installs in /usr/local. This package has both libz.a and libz.so libraries.

  9. install libiconv-1.11-sol10-sparc-local.gz

  10. GNU libiconv provides an iconv() implementation for use on systems which do not have one - installs in /usr/local.

  11. install db-4.2.52.NC-sol10-sparc-local.gz

  12. db is the Berkeley open source embedded database system - installs in /usr/local/BerkeleyDB.4.2.

  13. install sasl-2.1.21-sol10-sparc-local.gz

  14. This is the Cyrus SASL (Simple Authentication and Security Layer) API implementation. It can be used on the client or server side to provide authentication and authorization services - installs in /usr/local.
    The installation of the sasl software indicates:
    ********************************************************
    * WARNING:
    * Plugins are being installed into /usr/local/lib/sasl2,
    * but the library will look for them in /usr/lib/sasl2.
    * You need to make sure that the plugins will eventually
    * be in /usr/lib/sasl2 -- the easiest way is to make a
    * symbolic link from /usr/lib/sasl2 to /usr/local/lib/sasl2,
    * but this may not be appropriate for your site, so this
    * installation procedure won't do it for you.
    *
    * If you don't want to do this for some reason, you can
    * set the location where the library will look for plugins
    * by setting the environment variable SASL_PATH to the path
    * the library should use.
    ********************************************************

    I did the easiest way, create a symbolic link in /usr/lib to /usr/local/lib/sasl2

  15. install neon-0.25.5-sol10-sparc-local.gz

  16. Neon is an HTTP and WebDAV client library - installs in /usr/local. Neon is used by subversion.

  17. install apache_noldap-2.2.11-sol10-sparc-local.gz

  18. Apache 2 - the popular web server - installs in /usr/local/apache2. Documentation can be found in /usr/local/apache2/doc/apache2. The configuration files in /usr/local/apache2/conf must be edited to fit your site's needs, including ssl support.

    I dont want to setup my svn server with apache, yet the subversion package from sunfreeware required this package to be installed, you might change this requirement if you compile the subversion source (also from sunfreeware) without apache support.

  19. install swig-1.3.36-sol10-sparc-local.gz

  20. SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, PHP, Python, Tcl, Ruby and PHP - installs in /usr/local.

  21. install libxml2-2.6.31-sol10-sparc-local.gz

  22. Libxml2 is the XML C library developed for the Gnome project - installs in /usr/local.

  23. install libintl-3.4.0-sol10-sparc-local.gz

  24. Libintl is used with gettext and is needed by a few programs when libintl in not in /usr/lib - installs in /usr/local/lib.

  25. install openldap-2.4.16-sol10-sparc-local.gz

  26. OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol - installs in /usr/local.

    warning! this package giving me a hard time when I realized that one of my shared library wasnt update enough (libresolv.so.2), the workaround is at the end of this post.

  27. finally! subversion-1.6.5-sol10-sparc-local.gz

  28. Subversion is an alternative to the CVS version control system - installs in /usr/local.

ok when you're done, go to /usr/local/bin/ directory and type

~# ldd svn

you'll get something like
~# ldd svn
libsvn_client-1.so.0 => /usr/local/lib/libsvn_client-1.so.0
libsvn_wc-1.so.0 => /usr/local/lib/libsvn_wc-1.so.0
libsvn_ra-1.so.0 => /usr/local/lib/libsvn_ra-1.so.0
libsvn_diff-1.so.0 => /usr/local/lib/libsvn_diff-1.so.0
libsvn_ra_local-1.so.0 => /usr/local/lib/libsvn_ra_local-1.so.0
libsvn_repos-1.so.0 => /usr/local/lib/libsvn_repos-1.so.0
libsvn_fs-1.so.0 => /usr/local/lib/libsvn_fs-1.so.0
libsvn_fs_fs-1.so.0 => /usr/local/lib/libsvn_fs_fs-1.so.0
libsvn_fs_util-1.so.0 => /usr/local/lib/libsvn_fs_util-1.so.0
libsvn_ra_svn-1.so.0 => /usr/local/lib/libsvn_ra_svn-1.so.0
libsvn_ra_neon-1.so.0 => /usr/local/lib/libsvn_ra_neon-1.so.0
libsvn_ra_serf-1.so.0 => /usr/local/lib/libsvn_ra_serf-1.so.0
libserf-0.so.0 => /usr/local/lib/libserf-0.so.0
libm.so.2 => /usr/lib/libm.so.2
...
if theres a line that tells some file not found, that means there some package you've missed, check all the package in this post and makesure you've install them in order.
when everything is done, try to type

~# svn help

if it print the help page, then you're successfully install subversion on your Solaris 10, congratulations !!. But if you're like me and it didn't print the help page, instead showing this kind of error

ld.so.1: svn: fatal: libresolv.so.2: version `SUNW_2.2.2' not found (required by file /usr/local/lib/libldap-2.4.so.2)
ld.so.1: svn: fatal: libresolv.so.2: open failed: No such file or directory
Killed

that means the libldap-2.4.so.2 (from openldap package) require newer version of libresolv.so.2 which I couldn't get anywhere.

From sunfreeware :
you will need to update to a newer version of Solaris 10 or upgrade the SUNWcsl and SUNWcslr packages
Update system ? that's not an option for me, and I could'nt find any of the new packages. Googling whole night gives me some other options.
  1. recompile openldap from sources and create a mapfile to point to the existing libresolv.so.2 (or something like that)
  2. set the LD_NOVERSION environment variable to non null value, so that the linker will ignore any version check.

  3. ~# export LD_NOVERSION=1
I dont really get the first option, so I hit the second one, and it actually work flawless !. The problem is if we set the LD_NOVERSION environment variable, then the linker will ignore version checking of the existing shared library for all application which can break the whole system, so be careful! Everytime you have finished doing your svn thing, make sure to unset that variable again.

~# unset LD_NOVERSION

Ok, now lets setup the server, I'm not using Apache for that, instead I'm using svnserve (from subversion package), the advantage is, it's so easy to setup, the disadvantage is, you need an svn client to browse the repository, while for apache you could use plain web browser to browse a repository.
Create a new repository in /root directory with svnadmin

~# svnadmin create /root/repository

I've made a script called start_svnserver.sh to start the svn server as a daemon which consist following lines

#!/bin/bash
# ignore version check
export LD_NOVERSION=1
# start the server
svnserve -d -r /root/repository --pid-file svnserve.pid --log-file svnserve.log
# dont forget to unset this, we only need it to start svnserve
unset LD_NOVERSION

and stop_svnserver.sh to stop the svn_server, consist the following lines.

#!/bin/bash
cat svnserve.pid | xargs kill -15


make sure that stop_svnserver.sh is in the same directory of start_svnserver.sh, and command svnserve is accessible. After the server started, We can connect to the new server with any svn client for example using command-line svn, or an IDE (I'm using Eclipse+subclipse plugins).

the main repository url would be like

svn://<hostname_or_ip>


Good luck !

Keywords : subversion, Solaris10, libresolv.so.2, SUNW_2.2.2, mapfile openldap

Tuesday, November 17, 2009

VisualSVN basic Authentication.

8 months without anything, soooo lazy.., let's start with something small shall we :p.

Today I'm trying to setup a svn server using VisualSVN on my office work station (yes , its windows..), browsing works fine after (simple) installation. the problem is when I'm trying to commit changes from eclipse (using subversive plugin), it always throw me an error (click for larger image)


I have default authentication setup within my repository before I'm using visualsvn, but it seems VisualSVN don't actually use those setup. So I remove my auth setup in my repository, and use the one that come with VisualSVN. just right click on your repositories node, and choose All Tasks -> Manage Security. add a new user if you dont have one, and set the permissions. In my case I want my user can commit, so I choose Read/Write permissions.


After this I'm trying to commit, still failed, with new error message


Apparently, I need to repeat those steps for each repository node I'm trying to access (child of Repositories node), and dont forget to restart VisualSVN.

good day.


keywords: Commit failed, MKACTIVITY, 403 Forbidden, VisualSVN

Tuesday, February 10, 2009

User Input From Vim to Python script

hi, ever wondering how to prompt a user for some input from python script within vim, but first make sure you have imported the vim module

def python_input(message = 'input'):
vim.command("call inputsave()")
vim.command("let user_input = input('" + message + " : ')")
vim.command("call inputrestore()")
return vim.eval('user_input')

now everytime you wanna prompt user, in your python script do something like

input = python_input('input something')

it will prompt the user to input something with 'input something' as the caption of the prompt, in the command-line

for more detail

:help input()

hope, this would help.

Monday, January 05, 2009

Easy Remote PHP Debugging with VIM and Firefox

Happy new year !

I've write a post bout how you can setup debugging environment for PHP using xdebug, so now assuming you have xdebug setup and loaded, I'm going to write bout how you actually debug your PHP code.

Basically there are 2 type of debugging, local or remote debugging, the difference is that whether or not the debug engine separated with the debug client. If you debug a desktop Java code using IDE like Eclipse, most likely you are doing local debugging, where as the debug engine comunicate directly to the eclipse interface (there is no need of debug client). XDebug is a remote debug engine, which mean to actually debug some code we need a debug client to send command to and receive debugging information from the debug engine. From XDebug page we can get alot information bout how this can work, and some option of debug client that you can use (this page should be your first reference).

Now lets get to the chase, I'll write about how to have a remote debugging session with Vim (with plugin) and firefox to debug your PHP code easily.
  1. After you have successfully load xDebug module into php, enable remote debugging in your php configuration (php.ini) by adding
    xdebug.remote_enable = "1"
  2. download the debugger plugin (or watch my blog for an update)
  3. extract the file (debugger.vim and debugger.py) to your home vim plugin directory
    $ unzip debugger.zip
    $ cp plugin/debugger.* ~/.vim/plugin/
  4. fire up Vim!, make sure your build equiped with signs and python support or the plugin won't work!, I'm using ubuntu and a Vim-full package for this, no hush, no mush..
  5. if vim loaded without any error it means the plugin already loaded correctly, if not check your vim build, make sure the +signs and +python is there when you type in vim command
    :version
  6. open firefox, and install this addon
  7. open the PHP application you wish to debug using firefox, make sure the source code is accessible. for example if the source is in (assume you are using xampp)
    /opt/lampp/htdocs/testdebug/index.php
    then you can type in firefox url
    http://localhost/testdebug/index.php
  8. click the xdebug helper icon (the one you've just add) on firefox status bar (default on lower right corner), now the icon should flash green
  9. switch to your vim window and press F5 (the message window would say waiting for connection...)
  10. switch to your firefox window and reload by pressing F5,
  11. now switch to your vim window (again) and there you have it, a debugging interface of your application in vim.
let me explain a few of those steps a little bit (step 1 to 7 should be clear enough), step 8 means you have start a debugging session for the next http request, it is the same as if you append the url with XDEBUG_SESSION_START=1 so the url would be
http://localhost/testdebug/index.php?XDEBUG_SESSION_START=1
ofcourse clickin on xdebug helper icon is alot more convenience than appending the url each time we start a debugging session.

now for step 9 we prepare our beloved Vim to wait a connection from the debug engine at this point vim will kind of hang (waiting mode), the script default timeout is 5 second, if within that there are no debugging session requested, vim will return to normal mode. This means than we have to quckly run step 10, switch to firefox and reload, but again make sure the xdebug helper icon is already flash green (activated/clicked). After you have reload the page if you notice the loading status of the page is keep on spinning, the page wont finish loading until the debugging session stopped or vim is closed or request timeout

Now if we switch back to Vim, our debugging interface should up and running there are source, watch, help, stack and trace window. From this interface you can trace the code using F2 (step into), F3 (step over), F4 (step out). To end a session you can press F6. One of most common task is to put a breakpoint in our code, to do that open the file you wish to debug, position your cursor on a line you wish to stop and type :Bp in vim command window, now everytime the debugging session start, just press F5 to run until execution point reach the breakpoint. You can see other debugging command from the help window.

one thing about this vim plugin, there aren't that much debugging command available, either from the plugin or xdebug itself, from what I can tell it is more than enough to do my daily-debugging-basis. There are some lacks though, but I'll address this issue later on, considering this post is already bloated enough to make people sick from reading it :p

happy vimming (and debugging) !

keyword: ubuntu, vim, firefox, xdebug, php

Wednesday, November 05, 2008

Blogger SyntaxHighlighter

I've been googling a way out to make syntaxhighlighter works for my blog without success (well I think I've been near-success but it wasnt good enough :p), and today just discovered that this guy(thx dude!) made a blogger widget based on syntaxhighlighter, just add the widget, and it's all done, no more publishing file, copying or hacking css, javascript etc..

clean and simple (I wish I had found this 2 days ago >,<! ).

Tuesday, October 14, 2008

Motorola E398 Email Configuration

I'm using Indosat provider from Indonesia, to connect to my gmail account, modify these configuration to suit your provider, and mail account. Make sure the GPRS is active, open "messages", press menu button and choose "email msg setup"

  • ISP Settings
    • Connection Type : GPRS
      • make sure the gprs is active, use your working websession
    • APN address : indosatgprs or www.indosat-m3.net
      • apn address, check to your provider
    • username : gprs
      • username, check to your provider
    • password : im3
      • check to your provider
    • DNS IP : 0.0.0.0
      • check to your provider
  • Account Settings
    • AccountName = "mygmail"
      • your phone account name, you could have more than one account setup on your phone ie "mygmail", "myyahoo", "school", etc..
    • Status : active
      • is the current phone account should be used for example when receiving and sending
    • Name : Hadi Zeftin
      • the name that appear on each email you'll send using this account setup
    • user ID : slack.dna@gmail.com
      • your email address (username@mailserver)
    • password : <your_password>
      • password for your email account
    • return address : slack.dna@gmail.com
      • the address that people use to reply your email message
    • email provider : custom
      • because most of them are manual configuration, we choose custom
    • protocol : POP3
      • protocol can be POP3 or IMAP
    • sending host : smtp.gmail.com
      • sending server
    • sending port : 587 or 465
      • sending port, we dont use default(25), because the out server/sending server require TLS, on E398 they call it SSL
    • receiving host : pop.gmail.com
      • receiving server
    • receiving port : 995
      • receive port, we dont use default(110), because the incomingserver/receiving server require SSL
    • CleanUp : none
      • ?
    • save on server : yes
      • each copy of email that we'll pop, should be save in server
    • security
      • use ssl for sending : yes
      • use ssl for receiving : yes
      • warning in backgrounds : break connection
    • size restriction : 10240
  • notification : on
  • check new message : no
  • hide fields: bcc
  • auto signature : <your_signature>

pros: dont need 3rdparty software (j2me) to send and receive email, so it should be faster

cons: if the incoming message is to long (most of them are) they are truncated, sigh..

conclusion : the email client on E398 is less usefull when you want to read email ( especially when you got a dozen of em every hour), but when you need to send or reply email message ASAP, then this client can be preety much usefull

NB: oh and dont forget to activate pop from your email account, If you have gmail like me then go to settings->forwarding and POP/IMAP->enable pop ...

Friday, June 06, 2008

java 6 + applet + firefox 2 = hang

fyuuuh...

finally I can get my applet working in firefox,

I'm writing an applet application in my ubuntu box, and here's the first configuration
  • eclipse 3.3
  • jdk1.6.0_03
  • firefox 2.0.0.14
  • sun java plugin 6
I can write, compile and run the applet using applet-viewer built in eclipse, but some how everytime I try to deploy the applet to a web page, and view it with firefox, it crash! even until now I dont know why it crashed, been searching on forum and googling, I didnt find anything sufficient to solve my problem(or just me being dumb).. I was thinking maybe theres something wrong with java6 especially with applets, because not only my applet wont work, applet from another site doesn't work either(I've tried with realapplets).

so, I tried my luck with java5, and here's the second configuration
  • eclipse 3.3
  • java-1.5.0-sun-1.5.0.13
  • firefox 2.00.14
  • sun java plugin 5
I've flush everything related with java6 in my laptop away, and replace it with java5, and ofcourse change the default java build path on my eclipse. I can write it compile it, but can't run it!!, it says

java.lang.UnsupportedClassVersionError: Bad version number in .class

oops, forgot to change the JDK compliance setting on my eclipse from 6.0 to 5.0 (window->preferences->java->compiler), voila, it run :)

if any of you wondering whats the error above, basically because you've build a java program using newer compiler, but running it under older jre. For example you've compiled your program using JDK 1.6, on eclipse, and when you tried to run it with your default jre set to 1.5, then you'll get those error throw at you.

And yes, with java5 I was also able to run applet from another site..
so for now my conclusion is,
don't use java6, if you want to write, or run applet application
I hope they'll fixed it soon..

and just a tip:
when you deploy your applet on web page, if you've put your .class file(s) under a directory inside your web root, don't prefix the code properties of applet tag with "./", or browser will say applet loading failed.
dont use :
<applet code="./control/HelloWorld.class" height="400" width="400"></applet>
instead use :
<applet code="control/HelloWorld.class" height="400" width="400"></applet>

keyword : applet, firefox, java 6 plugin, ubuntu, hang, crashed

Tuesday, April 08, 2008

My harddrive is killing it self !!

this is a shocking news -for me atleast-, just found out that there are some cases, where people using ubuntu on their laptop had some issues with their harddisk. unfortunately those people include me T_T...


i've learn that my harddisk come with installed firmware that control power_management so called APM(advanced power management) most of modern harddisk does, so what this APM do? dont know exactly but from what i've read it control anything that can be set in harddisk's firmware to reduce power consumption, one of them is how often a head of an harddisk parked(stop hovering on the plate). The more often harddisk's head parked, more power are saved -CMIIW-, an this is the one that cause trouble. Because default power_management setting on my laptop's harddisk is just to aggresive, it keeps parking it head down even when i'm still using it!, i can tell this from looking at my harddisk loadcyclecount, time to time.


$ sudo smartctl -a /dev/sda | grep Load_Cycle_Count

this number increasing too fast! about 1 load cycle per-minute O.o!!
Yes this will save power -eventually also reduce harddisk temperature- but the scary thing is, this number is limited! average modern harddisk's max loadcycle is at least 600.000, so if i calculate my harddisk will only last for about 3-4 years max!!. I just dont like it!, luckly theres a workaround(ofcourse there's always a workaround :p), first check your default apm value(just incase something went wrong)

$ sudo hdparm -I /dev/sda | grep Advanced

then, we can just shut down apm with (they said this wont work in some laptop)

$ sudo hdparm -B 255

or use less aggresive setting (this one work for me)

$ sudo hdparm -B 254

one thing to kept in mind, this setting may increase harddisk's temperature, and this may do more harm than good, so make sure you really want to do this, and do this carefully! keep watching your harddrive status(loadcycle, temperature, etc..) use smartctl for this, until you sure this is ok! otherwise revert back.



if above configuration is working for you we can make this a little easier and automatic. make sure you have laptop-mode-tools installed


$ sudo apt-get install laptop-mode-tools

then edit file /etc/laptop-mode/laptop-mode.conf

# let laptop-mode tool control power management setting
CONTROL_HD_POWERMGMT=1

# this is hdparm -B values, use your own configuration with care
BATT_HD_POWERMGMT=128 # value to be used in battery mode
LM_AC_HD_POWERMGMT=254 # value to be used in AC mode with laptop-mode enable
NOLM_AC_HD_POWERMGMT=254 # value to be used in AC mode without laptop-mode

then, update file /etc/default/acpi-support, and change the value in line

# off by default
ENABLE_LAPTOP_MODE=true

reboot.



hmm, thats about it, my opinion is this isnt ubuntu's bug, because ubuntu doesnt change nor override harddisk firmware configuration, it is left as is, (well.. maybe they should)

Monday, March 24, 2008

XAMPP+XDEBUG+UBUNTU

ok, my ubuntu seem to work as expected(after 3 day struggling with the network !^^). so now i'll just take a break and writing down some small, common, boring, newbie tutorial :)

hmm.. the first thing that i want to do with this box, is to do some PHP coding, and debugging. To accomplish this one could just do

$ sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
to install LAMP(Linux, Apache, MySql, PHP), and there you have it, simple huh? i remember doing this in slackware few years back ^^. next just start the apache, and mysql services by doing
$ sudo /etc/init.d/apache2 start
$ sudo /etc/init.d/mysql start

you might want to change default root password for mysql database by
$ mysqladmin -u root password newpasswd

now debugging part, I've been using xdebug for the last year, before that I used DBG, my personal opinion, xDebug felt better, cause its free and opensource. but before we can debug our code, we have to install it first by downloading the source for linux(in windows box, I've use the precompiled binary one) from hereTo install and configure xdebug for our local server is straight forward, I'll try to brief it here(you could see the README file in the tgz file for complete how-to)
  1. unpack the tarball, and cd to it
  2. run phpize ( if you have install php with apt-get this shouldn't be a problem) to generate configure script
  3. run ./configure, next run make, and there you have it, xdebug.so on modules directory
  4. then open /etc/php5/apache2/php.ini, using your fav editor
  5. add the line
    zend_extension="/wherever/you/put/it/xdebug.so"
  6. restart apache with
    $ sudo /etc/init.d/apache2 restart
  7. xdebug, should be loaded, you can check using phpinfo()on your page script, and search the XDebug section on that page
fyuhh.. now thats a brief ^^

the problem is, i didnt use ubuntu's LAMP :), I'm using XAMPP for Linux, formerly known as LAMPP, why ? because they have it all here, PHP4, PHP5, LAMP, ProFTPD, and PHPMyAdmin, sweet! just install it and you'll have the whole family with you.

Then why is it, using XAMPP for linux than Ubuntu's LAMP would be slight a problem? because if you only download the xampp default package, you cant compile xdebug o.O !!. To compile xdebug you need the XAMPP source (development package), so here's another brief way to install XAMPP and xDebug on ubuntu
  1. Download XAMPP for linux, and XAMPP development package from here
  2. Untar both tarball into /opt/ directory with (this is a must)
    $ tar -xzvf xampp-linux-1.6.6.tar.gz -C /opt
    $ tar -xzvf xampp-linux-devel-1.6.6.tar.gz -C /opt
    and you'll have /opt/lampp/ directory
  3. at this point you already have local server setup, you can check whether its working or not by
    $ /opt/lampp/lampp start
  4. unpack xDebug tarball, and cd to it(wherever you unpack it doesnt matter)
  5. run XAMPP's phpize to generate configure script(there's a slight different here)
    #pick one
    $ /opt/lampp/bin/phpize-5.2.5 #if you use php 5
    $ /opt/lampp/bin/phpize-4.4.8 #if you use php 4
  6. run
    $ ./configure --with-php-config=/opt/lampp/bin/php-config
    $ make
    and there you have it xdebug.so on /opt/lampp/modules directory, remember!, if you try to build xdebug package without aqquiring XAMPP development package, you'll stumble with some error that said missing this, missing that, etc..
  7. then open /opt/lampp/etc/php.ini, using your fav editor
  8. add the line
    zend_extension="/wherever/you/put/it/xdebug.so"
  9. next start your server, just like step #3
  10. done :)

ok, i might be missing some detail back there, (just typing what's in my head ^^), anyway the idea is, if you want to compile xdebug, you'll need PHP's sources (my case it was XAMPP development package)

have a nice day.. :)