Monthly Archives: September 2009

Fix mouse cursor jumping to top left corner of screen on OpenSolaris

Update 2009-11-07: This issue is fixed in OpenSolaris build snv_126.

OpenSolaris dev repository update snv_116 introduced an XOrg bug that caused the mouse cursor to jump to the top left corner of the screen very frequently. Apparently, there is some floating point math issue is involved using MMX/SSE2 instructions. I was living with the workaround posted on bugzilla. I was hoping that the bug would soon be fixed in the subsequent updates. Yesterday, I updated to build snv_122 and found that the issue still exists. Hence, I am posting about the workaround to fix this issue.

$ pfexec bash
# cp -p /usr/X11/bin/i386/Xorg /usr/X11/bin/i386/Xorg.orig 
# echo 'xf86SigioReadInput+9?w 770f 9090 9090' | mdb -w /usr/X11/bin/i386/Xorg

This bug is currently tracked in bugster.

Random links for week 36

  • My (ex-)manager David Carlton has decided to leave us to join Playdom. I learned a lot in the past two years working with him. We are going to miss him a lot! Playdom is fortunate to have such a talented individual on board. I am sure he will be bringing a multitude of perspectives into the game development at Playdom. I wish him all the very best in his new exciting game development career.
  • I am using git as my primary version control system at work. Lately, more of my friends have shown interest towards using git. For them, I would recommend knowing why git is better than other version control systems.
  • Recently, I have started editing multiple files with the same name (under different directories) simultaneously on my GNU Emacs more often. This got me confused easily and made me prone to making mistakes by editing wrong files. Here is a cool way to make buffer names unique in GNU Emacs.
  • Due to certain changes that are happening recently in our team, being agile is more of a necessity that ever before. I am seriously thinking of attending Agile Open California. Agile Open California is a coalition of agile practitioners and advocates with an intention to provide an opportunity for learning, networking and growth to the Agile community in California and others who are interested.
  • We are currently working on transitioning our software to 64-bit on Solaris. We run into interesting problems each day. Solaris 64-bit developer’s guide is a source of must know information for anyone who is working on developing 64-bit applications on Unix like platforms, especially Solaris.
  • Since I returned from India after my recent vacation, I haven’t got much chance to workout in the gym. I would like to use this opportunity for refreshing my appreciation of the basics of weight training and get a fresh start as early as next week.

Per-user Mercurial Installation

Recently, I had to install Mercurial on one of our Solaris 10 development machines without root access. The installation procedure was a little bit tricky. So, I thought it would be helpful to share the experience.

First, I downloaded Mercurial source and extracted it. This is a standard procedure for installing any package from source.

$ wget http://mercurial.selenic.com/release/mercurial-1.3.tar.gz
$ tar -zxvf mercurial-1.3.tar.gz
$ cd mercurial-1.3

The installation mechanism is directly controlled by the Makefile. Per-user installation can be selected by choosing Makefile target install-home, install-home-bin or install-home-doc. The target install-home is a collection of install-home-bin and install-home-doc targets. The target install-home-bin builds/installs Mercurial binaries and the target install-home-doc builds/installs Mercurial documentation. To build the documentation, we would need ASCIIDOC and XMLTO. So, I decided to skip building the documentation. The target that I chose was install-home-bin. The installation prefix can be controlled by the environment variable HOME.

The build process uses C compiler to compile Mercurial extensions written in C and linker to create the shared libraries. We need to specify the desired compiler and linker through CC and LD environment variables respectively. When using GCC, we need to specify CFLAGS to build relocatable objects. If the Python library is located in a non-standard location, we have to specify LDFLAGS appropriately as well. Here is how my compilation line looked like.

$ make install-home-bin HOME=/home/praveen/chaos.SunOS CC=gcc CFLAGS="-fPIC" \
    LDSHARED="gcc -shared" LDFLAGS="-L/opt/csw/lib -Wl,-R/opt/csw/lib"

Read more »