Saturday, December 6, 2008

Graphical layout of dependencies between static libraries

Back to linux! This week at work I got introduced into a new tool that helps resolve dependencies between static libraries. To organize your C++ code better, it might be a good idea to develop static libraries, which are linked to the executable. In our situation we had several static libraries that had interrelationships that caused linkage problems. It is a known fact that g++ (ld) has a strong dependency on the order of the static libraries on the command line. Other compiler/linkers such as IBM xlc and Microsoft Visual Studio compiler are less if at all sensitive to this. And so it also caused problems when linking our libraries with the program. Some libraries had to be repeated on the command line for the linker to resolve all the symbols.
Again, the power of the linux command line came to the rescue this time. There is a tool called lorder that is able to generate output showing which static libraries depend on each other. It uses nm that outputs the symbols in the static library. The program lorder will list for each static library on which other library it (directly) depends. This output is then massaged a bit such that it can be used with dot (a tool that is able to generate a graph from a text input file). Dot can write its output to .png, .jpg, .svg and even .pdf files! So, by using lorder, five lines of script to convert the output of lorder into the correct format for dot, and dot itself, a graph was created showing the interdependencies between the static libraries. A picture says more than a 1000 words. And, also in this case, we found some cycles in the graph, causing the linkage problems!

Yahoo going private?

In recent days the news surfaced that group of investors led by Jonathan Miller (of AOL fame) is interested in buying Yahoo and taking it off the stock exchange source: nytimes. At the same time Microsoft has made another attempt to buy Yahoo (this time hidden as 'we are only interested in the search business') for $20 billion. Of course the offer by Microsoft should not come as a surprise, as they were always interested (and determined) to take over Yahoo. It's also up to the board of directors of Yahoo to decide what they want to do with the company. Carl Icahn has now three seats on the board, and for sure will look for the most value. (At this point he should show his true colors: if he goes with the private investors, he was always looking for the best value; if, on the other hand, he goes with the Microsoft offer.... it will raise again the question: was he always working in favor of Microsoft?)
Microsoft might hit a snag with an offer made by Jonathan Miller. But, eventually I believe Microsoft will get Yahoo, one way or another. It is just a matter of time. The group of investors might cause a better price for the current share holders of Yahoo. Time will tell, but I'd put my money on Microsoft (even though I am a Linux enthusiast!)

Sunday, November 23, 2008

Kernel vulnerability found in Vista

According to this article a kernel vulnerability was found in Vista. It requires administrative rights to install a rootkit or other damaging software. The only hurdle to take is to click 'Yes' when UAC pops up and your system is hacked. According to the article:
"We have worked together with Microsoft Security Response Center in Redmond since October 2008 to locate, classify and fix this bug," Unterleitner wrote. "Microsoft will ship a fix for this exploit with the next Vista service pack."

Mind you, my intention is not to bash Microsoft. The reason I put it here is to show that apparently with something a serious as this the open source world is much more agile and quicker to respond. Fixes for problems like this usually come out within the week they are discovered. As for Microsoft: The next service pack is not to come out for at least one or two months. In my opinion, another reason why you should use Ubuntu (or any other open source Linux-based distribution)!
Vista users beware!

Tuesday, November 18, 2008

Yahoo ready for take over?

Jerry Yang has given up. He will step down as CEO of Yahoo (although he will keep a 'high position' within Yahoo) making way for his successor. Susan Decker has been mentioned in the rumor mill, and according to official notes, Yahoo is looking inside as well as outside of the company.

What's next? Obviously, with Yang out of the way, nothing should stand in the way of Microsoft to take over Yahoo. My doubt remains; was this the plan of Icahn all the way? Was Icahn always working for Microsoft? Earlier this year, he lead a group of investors trying to replace the board of directors of Yahoo, after a failed take over attempt by Microsoft. Now with Yang out of the way, Microsoft can walk right in. Fact remains, Icahn is a smart man, and he became rich investing at the right time in the right companies and of course he will look after his own interests first.

What is to become of Yahoo after it is taken over by Microsoft? Will it be destroyed, and market share goes to Microsoft Live, meaning that everybody has to convert to hotmail? Future will tell. In the mean time, I'll be checking into gmail....

Tuesday, November 11, 2008

Make Linux Harder - Better - Faster

Courtesy of LinuxHaxor, a good set of links on how to improve your Linux / Ubuntu installation.

Monday, November 10, 2008

The three musketeers: Google, Microsoft and Yahoo

Everybody has heard of the saga between the three musketeers: Google, Microsoft and Yahoo: first Microsoft wants to buy Yahoo. Yahoo refuses, and runs into the arms of Google. Google finds an ad-deal with Yahoo will cause too many (legal) problems. Together they would have had more than 80% market share of the search market. Then, Yahoo runs back to Microsoft, but Microsoft is no longer interested. Smart play by Ballmer? Let's look the line of events.

In February Microsoft goes public with an unsolicited bid on Yahoo of $31 per share or $44.6 billion. Ten days later, Mr. Jerry Yang (CEO and founder of Yahoo) refuses the offer with the message that Microsoft undervalues Yahoo. In April, Ballmer tries again, this time with an offer price of $33 per share, and gives Yahoo a three-week deadline for making a deal. Again, they are not able to make a deal, and Microsoft walks away from the table.

In August Carl Icahn shows up, as he acquires $2.5 billion of stock; enough to get him three seats on the board of Yahoo. My hunch at the time was that Microsoft was all behind it, still to get (some) influence on Yahoo in the shape of Icahn.

Last week Google decides to pull-back from the table and Yahoo is forced to go back to Microsoft, to see if there is a deal possible. Ballmer has said in September (on a Gartner technology conference in Florida, according to Marketwatch) that it still makes sense economically to make a deal with Yahoo. Is he punishing Yahoo? Is he playing a sadistic game? Will he wait until the price is right? At the moment, the stock price of Yahoo is trading around $12.

My uneducated guess is that we'll see the acquisition of Yahoo by Microsoft, where the ones to pay will be Jerry Yang and Roy Bostock (chairman Yahoo). And of course, the shareholders. And guess what? Microsoft will be laughing last.

Thursday, November 6, 2008

Obama Won!

Ok, usually I am not really involved in political discussions or opining, however, this time I am really happy Obama won. It is a fresh and young face that holds a lot of promise. It is clear that America is ready for a change. But before crying victory, he still has to show us as to what he is capable of. The tanking economy and financial market regulations, the war in Iraq and globalisation. Unfortunately, effects on the major issues like the economy are only visible in the long run. As for the tech industry, let's hope he puts America back on the map (I firmly believe that on a number of issues Europe is way ahead of the U.S.A).

Let's hope he is able to bring about change, and make the world a better place.

Sunday, November 2, 2008

Ubuntu 64-bit, Opera and flash

Finally flash seems to become something normal on Linux, and supported by most distributions. At the moment Adobe only has a flash-player for 32-bit Linux, but luckily it can also be used in a 64-bit installation using nspluginwrapper. Installing flash for Firefox is simple in Ubuntu: open Synaptic, search for flashplugin-nonfree and install it. This installs the flash-plugin, as well as nspluginwrapper for 64-bit installations. For Opera, it is a bit more work: download the plugin from the Adobe website and put it in the plugins directory. Here follow the instructions to get flash working in Opera 64-bit.

1. Go to the Adobe flashplayer download website and select the .tar.gz for Linux option. This will download the archive; we are only interested in extracting one single file. (Do not download the .deb!)

2. Extract the files from the archive.
$> tar -zxf install_flash_player_10_linux.tar.gz

3. At this point we have to copy the plugin file to the correct directory where Opera can find it.
$> cd install_flash_player_10_linux
$> sudo cp libflashplayer.so /usr/lib/opera/plugins

4. Start opera and go to YouTube where you can test your newly installed flashplayer.

You can now safely delete the directory where you extracted the archive (install_flash_player_10_linux/).

Ubuntu and Dell XPS m1530

Since a month I am the happy and proud owner of a Dell XPS m1530 laptop. Its configuration is the following:

* Processor: Intel Core 2 Duo T9300 (2.5 GHz, 6 MB L2 cache)
* Graphics: nVidia GeForce Go 8600M GT with 256 MB video memory
* Screen: 15.4-inch widescreen, 1680 x 1050 CCFL with 2.0 megapixel webcam
* RAM: 4 GB (2 x 2GB) 667 MHz DDR2
* Harddisk: 400 GB SATA 5400 RPM (Samsung)
* Wireless: Intel 4965 AGN WiFi
* Bluetooth: Dell TrueMobile 355
* Fingerprint reader
* DVD+/-RW slot-load drive
* 90W AC adapter, standard 9-cell battery

Installing Ubuntu is a breeze, all hardware is recognized and configured automatically. However, you have to set up a kernel boot parameter to avoid the cursor from going crazy. This is a well known problem, and easy to fix. For this fix, and other tips on configuration and installation of Ubuntu, I found an excellent wiki. Of course you shouldn't forget to check out Ubuntu Forums.

Grub on a separate partition

If you are like me and like to play around with different distros, while not loosing your work, you probably have a setup with several partitions. In my setup, I have Windows Vista (hey it came with the machine, not my choice!), Ubuntu 8.04.1 32 bit and Ubuntu 8.10 64-bit. I noticed that every time you install a new distro, or version of Ubuntu, the grub installation (i.e. stage2 and menu.lst) move to the last installed distro. Problems arise when you start deleting partitions that you don't use anymore. Keeping track of which menu.lst to update is quite a chore. There must be a simple solution to this. And there is, install grub on its own partition and update only the files on that partition. Mind you, this is not a bootable partition, nor does it contain images of kernels,etc.

Thanks to an excellent guide I took the big step. And it worked! Basically what you do is create a new partition and install only the grub files on it. Here's a summary of the procedure:

1. Create a new partition (using gparted, fdisk, etc)
Let's assume this partition is called /dev/sda3
2. Mount the partition on your system, for example under mnt
$> mount /dev/sda3 /mnt

3. Create a new directory called /boot on the new partition
$> cd /mnt
$> mkdir /boot

4. Copy all files from your /boot/grub to the newly created directory (with -r)
$> cp -R /boot/grub /mnt/boot

5. Use the grub tool to update the grub installation files
$> grub

grub> find /boot/grub/stage1
(hd0,2)
(hd0,5)
(hd0,6)

grub> root (hd0,2)

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,2)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> quit


In the above example you see that grub has found 3 (three) different installations of grub configuration files. Partition 3 (three) or /dev/sda3 is our target, therefore we have to use hd(0,2), because grub starts counting from 0, instead of 1.

6. Done.

Make sure you do a trial run of all operating systems to make sure they boot.

Sunday, October 26, 2008

First post

Ah, finally also I gave in to the internet frenzy. It seems these days everybody is everywhere, you'll find your friends on myspace, facebook, linkedin, twitter, to name a few. I decided to give this bloggy-thing a try, moreover to find a safe place to store my linux knowledge, experiences and setup. It might even be interesting to other people.

Well, that's it as far as my introduction goes. Hopefully next time I'll have something interesting to tell ;-)