Archive

Posts Tagged ‘CentOS’

Installing boradcom wireless drivers on centos5

June 3rd, 2010 Asiri Rathnayake No comments

Installing broadcom wireless drivers on a linux system is pretty simple, just download the driver source from http://www.broadcom.com/support/802.11/linux_sta.php and follow the instructions on the README file. However, if you are running CentOS5 you might be faced with an error message during the compilation phase that reads something like below:

[asiri@asiri-laptop hybrid_wl]$ make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/2.6.18-194.3.1.el5-PAE-i686'
 LD      /home/asiri/software/hybrid_wl/built-in.o
 CC [M]  /home/asiri/software/hybrid_wl/src/shared/linux_osl.o
In file included from /home/asiri/software/hybrid_wl/src/shared/linux_osl.c:17:
/home/asiri/software/hybrid_wl/src/include/typedefs.h:80: error: conflicting types for ‘bool’
include/linux/types.h:36: error: previous declaration of ‘bool’ was here
make[2]: *** [/home/asiri/software/hybrid_wl/src/shared/linux_osl.o] Error 1
make[1]: *** [_module_/home/asiri/software/hybrid_wl] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-194.3.1.el5-PAE-i686'
make: *** [all] Error 2

Now I can’t say much about the reasons for this error but you can simply work around it by commenting out three lines from the source file src/include/typedefs.h (lines 79 – 81):

//ifndef TYPEDEF_BOOL
//typedef  unsigned char  bool;
//endif

I didn’t discover this solution myself; I found it on a forum couple of months back when I was setting up a different installation and thought of logging it here just in case I bump into it again :)

Categories: Technology, Unix / Linux Tags:

Tomcat on linux – ditching openjdk for sunjdk

December 7th, 2009 Asiri Rathnayake No comments

One of the annoying problems I came across recently is that it’s really painful to get tomcat installed on Fedora (or CentOS) without being dependent on OpenJDK. I don’t like using OpenJDK because SunJDK is widely used and well tested (plus, I don’t see a distinct advantage of using OpenJDK). Also in my specific use case, XWiki has some problems when run on OpenJDK (Tomcat).

For me, the main advantage of using platform provided tomcat version (one that depends on OpenJDK) is that it is well integrated into the system (init scripts, updates etc.) but getting it to work with SunJDK is kind of hackish. There are several blog posts on the internet about how to configure the platform provided tomcat version to depend on SunJDK instead of OpenJDK (most solutions make use of the alternatives command) but none of them seems to be without side effects (and in my specific case, it just didn’t work – XWiki failed to start).

I finally made up my mind and decided to install tomcat and SunJDK from their official web sites. Right now I’m executing tomcat from my personal user account and I have set my JAVA_HOME and PATH variables correctly so that tomcat uses SunJDK rather than system provided OpenJDK. It might not be the perfect solution (administrative difficulties, security concerns etc.) but for my particular use case it was acceptable. However, I believe these disadvantages can be overcome with some effort (write an init script, create a separate user account for executing tomcat etc.) and that it’ll still be worthier than being dependent on OpenJDK.