Jun 09 2008

“Cannot find -lGl”

Filed under: Linux

I’m setting up another Gentoo on my office desktop.

My compiler on Gentoo stops at this error when compiling certain packages. I just noticed that as I tried to install binary drivers for ATI card (X1300).

I tried to re-emerge GCC, but it didn’t help. But finally I noticed the cause as I searched through the forum and the net.

It’s because of the missing symbolic to libGL.so in /usr/src.

I was using ATI drivers for OpenGL so my Gentoo symbolically linked to that library. “dri” was not working so I tried to downgrade the driver to lower version by uninstalling it. But when I did a re-install, compiler stopped there, saying it “Cannot find -lGl”.

Actually what I should have done is to switch the OpenGL library to Xorg libraries before uninstalling the ATI drivers.

Now I’m able to compile the ATI drivers, but still “dri” is not working. I need to figure it out.

Jul 08 2007

Total Eclipse in Gentoo

Filed under: Java

Gentoo does really have Eclipse SDK in its portage. I once used it a long time ago and I gave up soon after I learned that it’s more difficult to update the portage version of Eclipse (at least to me).

Now I decided to install Eclipse Europa, and grabbed myself a Gtk version of Europa and extracted in /opt.

When when /opt/eclipse/eclipse was started, Eclipse stopped the execution, giving me the following error message.

 JVM terminated. Exit code=1/usr/bin/run-java-tool
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-os linux
-ws gtk
-arch x86
-showsplash
-launcher /opt/eclipse/eclipse
-name Eclipse
--launcher.library /opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070606/eclipse_1017a.so
-startup /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-exitdata d5801b
-vm /usr/bin/run-java-tool
-vmargs
-Xms40m
-Xmx256m
-Dosgi.bundlefile.limit=100
-jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar

It seemed like vanilla Eclipse didn’t really want to work with Gentoo’s Java environment.

So I added a path to Java VM when starting Eclipse, and it began to work.

./eclipse -vm `java-config-2 –java`

It was because eclipse was running Gentoo’s run-java-tool instead of java, and this made $tool variable in line 15 of run-java-tool to become “run-java-tool” instead of “java”. Then it leads to wrong interpretation of JVM path.

It can also be fixed by adding

[[ $tool = “run-java-tool” ]] && tool=“java”

(replace & with actual ampersand symbol)
after line 15,

tool=$(basname $O)

Or alternatively, you can directly call Equinox (Eclipse Launcher) by using the examples described in Eclipse Wiki. Here’s the sample bash script:

#!/bin/bash# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/ eclipsehome="."; # get path to equinox jar inside $eclipsehome folder cp=$(find <em>$eclipsehome</em> -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1); # start Eclipse w/ java /opt/java50/bin/java -cp $cp org.eclipse.equinox.launcher.Main ...
Jun 27 2007

Singaporean’s Insight into Myanmar

Filed under: General

I just found an article titled “Myanmar Insights”, on a blog. The author seems to be a singaporean. Here are some of his comments:

  • most people sarongs (both men and women)
  • costs US$1500 to own a sim card (excluding mobile phone and calling charges)
  • limited imported cars; all mainly recycled & non-aircon
  • The buses are like lorries which ferried many
  • Myanmar uses two currencies; US and kyats (they’ve 2 exchange rates - official vs black mkt)
  • There are 3 seasons (dry & hot, wet & hot, dry & less hot - unfortunately we went in the hottest season
  • Yahoo, hotmail & gmail are prohibited
  • Women use grinded tree bark on their faces as a form or sunscreen/ makeup (see below)
  • Many speak English, and they are known to be hardworking people
  • School fees costs US$1/ month in one of the unis
  • Blackouts are a way of life
  • Many children run along roads with a baby in hand to ask for money
  • Precious stones/ gems are one of the natural resources (incl sapphire, jade, emerald, etc)

And finally his conclusion:

on a last note, this trips highlights the contrast of lifestyles in singapore vs myanmar…which appears stark to me. and i hope many of us (including myself) dont have to lose it to appreciate our country (govt setup, infrastructure, etc)

Despite these comments, there are people who did enjoy travelling to Myanmar =)

Jun 08 2007

Gave My Gentoo A New Kernel

Filed under: Linux

My kernel has been upgraded to 2.6.21. The sound card driver provided by my previous kernel 2.6.18 did not properly support my sound card, and I had to use alsa-driver sound modules. Now I have compiled the driver that comes with 2.6.21 into the new kernel, and it works perfectly.

I also decided to give my kernel a new scheduler, too. It’s Completely Fair Scheduler (CFS) v15, developed by Ingo Molnar from Red Hat. It promises to fix deficiencies of vanilla scheduler. We might have already experienced Windows NT scheduling. At least we may have configured our computers’ role as workstation or server in Windows XP. And there are some interesting links that will give us a basic idea about linux process scheduling. These include:

The O(1) scheduler in 2.6 kernel written by Ingo Molnar from Red Hat is a complete improvement over 2.4’s scheduler. Being O(1), it takes the same amount of time to select the best task from the runnable processes. CFS is the completely rewrite of O(1) scheduler.

In addition to CFS patch, I also applied regular gentoo patchset, Con Kolivas patchset and suspend2 patchset.

One day, I will give Con Kolivas’ Staircase Deadline (SD) scheduler a try, and feel the difference between SD and CFS. These two schedulers are being vigorously tested by Linux developers, and in the end one of them is likely to be accepted into mainline.

Finally, I have to re-compile fuse driver for ntfs-3g after compiling new kernel. I will definitely patch for fuse in my kernel when I upgrade to next version

May 15 2007

A Touch of Beryl

Filed under: Linux

I was living with OpenBox as my Windows Manager for more than a year, and now it is time to embrace Beryl. Ever since Compiz, I tried to install and feel it on my Gentoo. It was never a success, unless I switched to another distro that supports Compiz out of the box.

Compiz is a great product of Novell to support OpenGL accelerated desktop. Eye-candy. Even Windows Vista lacks some of its features. Beryl is a fork of Compiz, and its a combination of Windows Manager and Composite Manager. Windows Manager usually decorates our X Windows, and Composite Manager tries to combine windows and images to create special effects.

Frankly speaking, I never liked my Linux Desktop looks like Microsoft Windows. But Windows Vista’s Aero feature has me hold my breath.  Especially I like Windows frame’s transparency effect. Now this feature is on my Linux Desktop.

To install Beryl, I had to upgrade my X Server to 7.2 to support AIGLX, my primary accelerator for OpenGL, without any hassle. Switched to KDE and configured KDE to use Beryl emerald as Windows Manager. Turned off KDE’s built-in effects which interferes with Beryl. Now my Gentoo desktop is coming to live with stunning effects :)