Monday, May 22, 2006
SuSE 10.1 Installation Guide
I recently installed SUSE Linux 10.1 on my workstation. While installing, I saved screenshot for each step and prepared a step by step guide to installing SUSE 10.1 for newbies.
Wednesday, May 17, 2006
VMWare Workstation on SuSE Linux 10.1
VMWare workstation allows user to run multiple operating systems on one machine. I decided to try the eval version on my newly installed SUSE 10.1 box. The installation however was not as smooth as I would have liked. Installation fails while compiling vmmon module for my kernel version (2.6.16.13-4-bigsmp, SuSE 10.1). Fortunately, there is a workaround as mentioned in this forum, but it took me considerable time to figure out what to do in order to make vmmon compile. Hence, I am posting what exactly needs to be done.
I downloaded the tarball for evaluation version of VMWare workstation from their website and tried to install it using the provided installation script.
tar zxvf VMware-workstation-5.5.1-19175.tar.gz cd /vmware-distrib/ ./vmware-install.pl
I answered all the questions with their default answers. The script after installation executed vmware-config.pl, which exited with the following error while compiling vmmon.
Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config3/vmmon-only' make -C /lib/modules/2.6.16.13-4-bigsmp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-2.6.16.13-4-obj/i386/bigsmp' make -C ../../../linux-2.6.16.13-4 O=../linux-2.6.16.13-4-obj/i386/bigsmp modules CC [M] /tmp/vmware-config3/vmmon-only/linux/driver.o In file included from /tmp/vmware-config3/vmmon-only/linux/driver.h:20, from /tmp/vmware-config3/vmmon-only/linux/driver.c:49: /tmp/vmware-config3/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined /tmp/vmware-config3/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined In file included from /tmp/vmware-config3/vmmon-only/linux/driver.h:20, from /tmp/vmware-config3/vmmon-only/linux/driver.c:49: /tmp/vmware-config3/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’ /usr/src/linux-2.6.16.13-4/include/linux/poll.h:45: error: previous declaration of ‘poll_initwait’ was here /tmp/vmware-config3/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type /tmp/vmware-config3/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type make[4]: *** [/tmp/vmware-config3/vmmon-only/linux/driver.o] Error 1 make[3]: *** [_module_/tmp/vmware-config3/vmmon-only] Error 2 make[2]: *** [modules] Error 2 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4-obj/i386/bigsmp' make: *** [vmmon.ko] Error 2 make: Leaving directory `/tmp/vmware-config3/vmmon-only' Unable to build the vmmon module. For more information on how to troubleshoot module-related problems, please visit our Web site at "http://www.vmware.com/download/modules/modules.html" and "http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
The workaround is to modify the Makefile.kernel, by adding -DKBUILD_BASENAME=\"$(DRIVER)\" just after -Iinclude2/asm/mach-default (on the same line). Do the following step by step.
cd /usr/lib/vmware/modules/source tar xf vmmon.tar tar xf vmnet.tar vim vmmon-only/Makefile.kernel #EDIT as mentioned above vim vmnet-only/Makefile.kernel #EDIT as mentioned above mv vmmon.tar vmmon.tar.save mv vmnet.tar vmnet.tar.save tar cf vmmon.tar vmmon-only tar cf vmnet.tar vmnet-only
After modification, first few lines of vmnet-only/Makefile.kernel looks like
$(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
-DKBUILD_BASENAME=\"$(DRIVER)\" \
-Werror -S -o /dev/null -xc $(1) \
> /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
and that of vmmon-only/Makefile.kernel looks like
$(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
-DKBUILD_BASENAME=\"$(DRIVER)\" \
-Werror -S -o /dev/null -xc $(1) \
> /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
After modifying both the Makefile.kernel files, execute /usr/bin/vmware-config.pl again. The compilation should go fine this time.
Sunday, May 07, 2006
Apache on RHEL 3 (undefined symbol: gdbm_errno)
While trying to enable web based admin gui for our sun ray server, I discovered that, httpd on RHEL 3 has some problems with libraries.
[root@manhattan root]# httpd httpd: relocation error: /usr/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
Since I had not installed or changed anything after installing RedHat Enterprise Linux AS 3, I believe, this bug comes packaged with the distribution. And I expect Red Hat to test their software more carefully, at least httpd.
To debug, I checked dependencies for libaprutil-0.so.0 and symbols in libgdbm.so. To my surprise, gdbm_errno was in the libgdbm.so, and httpd should not have reported error. Everything (LD_LIBRARY_PATH and ld.so.cache) was fine.
[root@manhattan root]# rpm -aq | grep httpd httpd-2.0.46-54.ent redhat-config-httpd-1.1.0-4.30.2 [root@manhattan root]# rpm -aq | grep gdbm gdbm-devel-1.8.0-20 gdbm-1.8.0-20 [root@manhattan root]# ldd -d /usr/lib/libaprutil-0.so.0 libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00cc8000) libc.so.6 => /lib/tls/libc.so.6 (0x008c2000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00216000) undefined symbol: gdbm_errno (/usr/lib/libaprutil-0.so.0) undefined symbol: apr_pool_cleanup_null (/usr/lib/libaprutil-0.so.0) [root@manhattan root]# nm --dynamic /usr/lib/libgdbm.so | grep gdbm_errno 000061c4 D gdbm_errno
After trying out many things and googling, I was able to fix the problem. Before starting httpd, I had to run
[root@manhattan root]# export LD_PRELOAD=/usr/lib/libgdbm.so.2
I am not sure why and how it worked and why exactly was their a problem in the first place. This will probably remain a mystery for me.
Tuesday, May 02, 2006
Democracy Player on SuSE 10.0
When I read news about availability of linux version of democracy player, I decided to try it. But unfortunately no SuSE packages or build instructions were available. But, after hours of hard work, I managed to install it on my x86_64 machine running SuSE linux 10.0. Here is what I did.
First I installed Pyrex. Since version 0.9.3 of Pyrex is buggy, I installed v0.9.4.1 by compiling from sources. I also installed mozilla-config from rpm using YaST. Then I installed boost from source (rpm I had, had some problems). To install boost, bjam is required, which fortunately was available as rpm, and I used YaST to install it. After installing bjam, I used the following procedure to install boost.
tar zxvf boost_1_33_0.tar.gz cd boost_1_33_0 export PYTHON_VERSION=2.4 export PYTHON_LIB_PATH=/usr/lib64/python2.4/ export PYTHON_INCLUDE_PATH=/usr/include/python2.4/ sudo bjam "-sTOOLS=gcc" install
I then proceeded to install Democracy player from source. Democracy source must reside in directory named tv. Also libboost_python-gcc-mt-1_33.so.1.33.0 had to be manually linked to libboost_python.so. Since boost was installed in /usr/local/, I also had to set appropriate CPPFLAGS and LD_LIBRARY_PATH.
tar zxvf Democracy-0.8.2-Source.tar.gz mv Democracy-Player-0.8.2/ tv cd tv/platform/gtk-x11/ export DEMOCRACY_RESOURCE_ROOT=/usr/share/democracy/resources/ export CPPFLAGS="-I/usr/local/include/boost-1_33/" export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH export PATH=/opt/mozilla/bin/:$PATH sudo ln -s /usr/local/lib/libboost_python-gcc-mt-1_33.so.1.33.0 /usr/local/lib/libboost_python.so python setup.py install --root=/
This installed Democracy player, but I still wasn't able to start it, because gtkmozembed was not available. I then had to compile gnome-python-extras-2.12.1 from source.
tar zxvf gnome-python-extras-2.12.1.tar.gz; cd gnome-python-extras-2.12.1 ./configure --prefix=/usr/ make sudo make install
Now to start Democracy Player, I need to
cd tv/platform/gtk-x11/ export DEMOCRACY_RESOURCE_ROOT=/usr/share/democracy/resources/ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH export PATH=/opt/mozilla/bin/:$PATH python democracyplayer
After installation, I started Democracy and downloaded a few videos (which were saved to ~/Movies/Democracy/). While videos played fine, there was no sound. I tried playing videos with mplayer they worked fine. The problem was with xine, and I had to install xine from source again. After all this, Democracy is now working fine (except that it has loads of bugs and is very unstable).