Tuesday Nov 04, 2008

Took me a day and a couple experiments to figure out what went wrong. Maven web application archetype creates project for J2EE 1.3 and has a web.xml with web-app_2_3.dtd, which seems to be the cause why JSTL is not working.

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
</web-app>
 

The solution? Simply copy over a web.xml in web-app_2_5.dtd seems to fix the problem.

<⁞?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>

I am surprised that I cannot find a solution by searching the net, either I am very bad at search or the problem is too obvious to fix. Anyhow, hope this post would help people like me.

Wednesday May 28, 2008

JXTA NetMap is a project helps to visualize JXTA network, we actually use this project to run the public rendezvous. Those public RDVs and relays assemble the JXTA public network serve as a playground/testbed so that people can test their JXTA applications without deploying a infrastructure. However, you should never use it for production, since those node can be down at any time without notice. Even for testing purpose, you are advised to use the public network to bootstrap your own peergroup.

The project has been packaged as a self-contained jar, which you can download and start it by 'java -jar jarfile', but the jar had not been updated for a while, meaning JXTA platform embedded is not up to date.

Seeing the cool "Next-Generation Java Plug-In" feature in Java 6 Update 10, I think it would be cool to make it an applet so that user can experience it and deploy it easily. Before I get to that point, I spent some time to JNLPlize it and make the project part of JXTA nightly build.

You can launch the applicaiton, seeing live is better than a screenshot IMHO. :-)

For those who needs to develop for J2ME with more decent APIs and wants to run OpenSolaris x86, the choices were to run Linux or Windows in a virtual machine, or you can try to install MPowerPlayer or MicroEmulator yourself and tinkering around the settings.

Now there is a much easier choice, thanks to Karol Harezlak, who brings us the MicroEmulator support in Netbeans. Here is how easy it is:

1. Download MicroEmulator. Decompress the files into a folder.

2. Download the MicroEmulator Netbeans Plugin. Unzip and there are two nbm files.

3. In Netbeans, Select Tools|Plugins, click on Downloaded tab, and click "Add Plugins..." to add both nbm files.

4. Select Tools|Java Platforms, click on "Add Platform...", select "Java ME MIDP Platform Emulator", click on Next.

5. Select the folder with MicroEmulator in the chooser.

Now you can start develop J2ME applications on Solaris.

Based on my experience, MPowerPlayer does not work very well. Couple things bug me on Solaris:

1. Lacking of preverifer for Solaris. You can either download the source from phoneME project and build it yourself, or use ProGuard preverifier, which is implemented in Java.

2. Netbeans cannot detect MPowerPlayer on Solaris as it does for Mac. So I have to create customized J2ME platform.

3. Netbeans complains String.equalsIgnoreCase does not exist with MPowerPlayer. You can work around it by using jars from Wireless Toolkit, but that's a lot of hassle.

On the other hand, MicroEmulator works out of box with Karol's plugin. Thanks again, Karol.

Thursday May 22, 2008

This is another post regarding build open source stuff on OpenSolaris 2008.05, serve as a personal note, and maybe save some time for others.

This time, the candidate is freeglut. As usual, I like the latest stuff, so I check out the code directly from svn.

$ svn co https://freeglut.svn.sourceforge.net/svnroot/freeglut/trunk freeglut-trunk

A quick configure reveals I better to have need Xlib.h and xf86vmode.h, do a pkg search to see if a package is available for those:

$ pfexec pkg search -r Xlib.h
INDEX ACTION VALUE PACKAGE
basename file usr/X11/include/X11/Xlib.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-79
basename file usr/X11/include/X11/Xlib.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-75
basename file usr/X11/include/X11/Xlib.h pkg:/SUNWxwinc-AT-0.5.11-0-DOT-86
basename file usr/X11/include/X11/Xlib.h pkg:/SUNWxwinc-AT-0.5.11-0-DOT-86
$ pfexec pkg search -r xf86vmode.h
INDEX ACTION VALUE PACKAGE
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/FSWxorg-headers-AT-0.5.11-0-DOT-75
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-86
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-79
basename file usr/X11/include/X11/extensions/xf86vmode.h pkg:/SUNWxorg-headers-AT-0.5.11-0-DOT-86

Great, install these packages.

$ pfexec pkg install SUNWxwinc SUNWxorg-headers
$ CFLAGS='-I/usr/X11' LDFLAGS='-L/usr/X11/lib -R/usr/X11/lib' ./configure --prefix=/usr --includedir=/usr/X11/include
$ make

Really easy. :-)

Saturday May 17, 2008

When I was asked to look at Project Wonderland a while back, first thing I would like to do is to run it on my laptop. But guess what? No audio support for me because I am running Solaris and JOAL is not available.

So I started by trying to build OpenAL on Solaris, and after some dig, I managed to get a patch to enable build on Solaris with Sun Studio 12. At JavaOne, I talked to Ken Russel, the rockstar who maintains JOAL and JOGL, and we think it would be great to bring JOAL to Solaris(Actually, there are quite a few build out there, Second Life client for Solaris, SFE, CSW).

The patch was not get into the upstream due to broken SVN, so we would like to revisit the possibility to get patch into upstream. Since I upgraded to OpenSolaris 2008.05, so I pulled the trunk, applied the patch, but autotools is giving me some craziness, so I use cmake build which goes out smoothly(I built cmake myself, which is pretty straightforward, we should really consider to add it into OpenSolaris).

Now I am ready to roll, however, there are two packages I need to install before I can successfully build solaris backend.

pfexec pkg install SUNWaudh SUNWgnome-common-devel

With this new patch, now OpenAL can be built as simple as following:

~/prj/openal/OpenAL-Sample/build$ cmake .. -DCMAKE_C_FLAGS:STRING="-std=c99"
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Performing Test HAVE_NANOSLEEP
-- Performing Test HAVE_NANOSLEEP - Success
-- Looking for sys/select.h
-- Looking for sys/select.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Determining select arguments
-- Determining select arguments - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for stropts.h
-- Looking for stropts.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Performing Test HAVE_SNPRINTF
-- Performing Test HAVE_SNPRINTF - Success
-- DMEDIA header dmedia/audio.h not found.
-- DMEDIA support - disabled
-- pkg-config: Looking for esd
-- pkg-config: Looking for esd - not found
-- Looking for esd-config
-- Looking for esd-config - found
-- ESD support - dynamic
-- OSS header sys/soundcard.h not found.
-- OSS support - disabled
-- pkg-config: Looking for sdl
-- pkg-config: Looking for sdl - found
-- SDL support - dynamic
-- pkg-config: Looking for smpeg
-- pkg-config: Looking for smpeg - not found
-- Looking for smpeg-config
-- Looking for smpeg-config - not found
-- MP3 header smpeg.h not found.
-- MP3 support - disabled
-- pkg-config: Looking for vorbisfile
-- pkg-config: Looking for vorbisfile - found
-- VORBIS support - dynamic
-- Performing Test HAVE_ATTRIBUTE
-- Performing Test HAVE_ATTRIBUTE - Success
-- Performing Test HAVE_VISIBILITY
-- Performing Test HAVE_VISIBILITY - Failed
-- Writing config.h
-- Configuring done
-- Generating done
-- Build files have been written to: /export/home/henryjen/prj/openal-trunk/OpenAL-Sample/build
~/prj/openal/OpenAL-Sample/build$ make
Scanning dependencies of target InfoFile
[ 0%] Generating doc/openal.info

[ 2%] Built target InfoFile
Scanning dependencies of target openal
[ 4%] Building C object CMakeFiles/openal.dir/src/al_bpool.o
[ 6%] Building C object CMakeFiles/openal.dir/src/al_buffer.o
[ 8%] Building C object CMakeFiles/openal.dir/src/config/al_config.o
[ 10%] Building C object CMakeFiles/openal.dir/src/al_distance.o
[ 13%] Building C object CMakeFiles/openal.dir/src/al_dlopen.o
[ 15%] Building C object CMakeFiles/openal.dir/src/al_error.o
[ 17%] Building C object CMakeFiles/openal.dir/src/al_ext.o
[ 19%] Building C object CMakeFiles/openal.dir/src/al_filter.o
[ 21%] Building C object CMakeFiles/openal.dir/src/al_listen.o
[ 23%] Building C object CMakeFiles/openal.dir/src/al_main.o
[ 26%] Building C object CMakeFiles/openal.dir/src/al_mixer.o
[ 28%] Building C object CMakeFiles/openal.dir/src/al_mixfunc.o
[ 30%] Building C object CMakeFiles/openal.dir/src/al_mixmanager.o
[ 32%] Building C object CMakeFiles/openal.dir/src/al_mspool.o
[ 34%] Building C object CMakeFiles/openal.dir/src/al_mutexlib.o
[ 36%] Building C object CMakeFiles/openal.dir/src/al_queue.o
[ 39%] Building C object CMakeFiles/openal.dir/src/config/al_rctree.o
[ 41%] Building C object CMakeFiles/openal.dir/src/config/al_rcvar.o
[ 43%] Building C object CMakeFiles/openal.dir/src/al_source.o
[ 45%] Building C object CMakeFiles/openal.dir/src/al_spool.o
[ 47%] Building C object CMakeFiles/openal.dir/src/al_state.o
[ 50%] Building C object CMakeFiles/openal.dir/src/al_threadlib.o
[ 52%] Building C object CMakeFiles/openal.dir/src/al_vector.o
[ 54%] Building C object CMakeFiles/openal.dir/src/al_matrix.o
[ 56%] Building C object CMakeFiles/openal.dir/src/mixaudio16.o
[ 58%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend.o
[ 60%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend_solaris.o
[ 63%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend_esd.o
[ 65%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend_sdl.o
[ 67%] Building C object CMakeFiles/openal.dir/src/extensions/al_ext_vorbis.o
[ 69%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend_wave.o
[ 71%] Building C object CMakeFiles/openal.dir/src/backends/alc_backend_null.o
[ 73%] Building C object CMakeFiles/openal.dir/src/arch/portable/floatmul.o
[ 76%] Building C object CMakeFiles/openal.dir/src/alc/alc_context.o
[ 78%] Building C object CMakeFiles/openal.dir/src/alc/alc_speaker.o
[ 80%] Building C object CMakeFiles/openal.dir/src/alc/alc_error.o
[ 82%] Building C object CMakeFiles/openal.dir/src/alc/alc_device.o
[ 84%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_misc.o
[ 86%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_freq.o
[ 89%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_bits.o
[ 91%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_channels.o
[ 93%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_helper.o
[ 95%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_adpcm.o
[ 97%] Building C object CMakeFiles/openal.dir/src/audioconvert/ac_endian.o
[100%] Building C object CMakeFiles/openal.dir/src/extensions/al_ext_loki.o
Linking C shared library libopenal.so
[100%] Built target openal

I was very frustrated today with autotools when building OpenAL on OpenSolaris 2008.05. I finally decide to gave up and use cmake build system instead, which works very well. I think there is a reason why so many projects(good ones like KDE4, WireShark) are starting to adapt cmake, and maybe jxta-c should do that too.

So allow me dump the problems here, and hopefully some experts will shed lights for me. Note that I do try with other projects using autotools, for example, jxta-c is working OK, but not for OpenAL. Let's see what is going on:

/tmp/openal-trunk/OpenAL-Sample$ ./autogen.sh 
Can't exec "aclocal": No such file or directory at /usr/bin/autoreconf line 182.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 182.
Can't exec "automake": No such file or directory at /usr/bin/autoreconf line 183.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 183.
Can't exec "automake": No such file or directory at /usr/bin/autoreconf line 240.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 240.
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 290.
autoreconf: failed to run aclocal: No such file or directory

OK, I think OpenSolaris should have a default symbolic link for aclocal and autoconf. Moved on.

/tmp/openal-trunk/OpenAL-Sample$  ACLOCAL=/usr/bin/aclocal-1.10 AUTOMAKE=/usr/bin/automake-1.10 ./autogen.sh 
/usr/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
/usr/share/aclocal/gimpprint.m4:8: run info '(automake)Extending aclocal'
/usr/share/aclocal/gimpprint.m4:8: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:8: warning: The macro `AC_FOREACH' is obsolete.
configure.ac:8: You should run autoupdate.
autoconf/general.m4:198: AC_FOREACH is expanded from...
aclocal.m4:7044: _AM_SET_OPTIONS is expanded from...
aclocal.m4:6847: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
configure.ac:78: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:209: AC_HELP_STRING is expanded from...
autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from...
aclocal.m4:1943: AC_ENABLE_SHARED is expanded from...
aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:66: AC_PROG_LIBTOOL is expanded from...
configure.ac:78: the top level
aclocal.m4:1982: AC_ENABLE_STATIC is expanded from...
aclocal.m4:2021: AC_ENABLE_FAST_INSTALL is expanded from...
autoconf/general.m4:1391: AC_ARG_WITH is expanded from...
aclocal.m4:2218: AC_PROG_LD is expanded from...
configure.ac:78: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:2415: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from...
autoconf/general.m4:1905: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from...
aclocal.m4:619: _LT_AC_LOCK is expanded from...
aclocal.m4:1105: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2730: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2661: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:1897: _LT_AC_TAGCONFIG is expanded from...
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists
configure.ac:78: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:170: AC_LANG_SAVE is expanded from...
aclocal.m4:4051: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4003: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
configure.ac:78: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from...
aclocal.m4:4095: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4059: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
configure.ac:119: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:119: You should run autoupdate.
admin/autotools/m4/acx_pthread.m4:246: ACX_PTHREAD is expanded from...
configure.ac:119: the top level
configure.ac:119: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:119: You should run autoupdate.
autoconf/c.m4:73: AC_LANG_C is expanded from...
configure.ac:119: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:119: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:119: You should run autoupdate.
Putting files in AC_CONFIG_AUX_DIR, `admin/autotools'.
/usr/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
/usr/share/aclocal/gimpprint.m4:8: run info '(automake)Extending aclocal'
/usr/share/aclocal/gimpprint.m4:8: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:8: warning: The macro `AC_FOREACH' is obsolete.
configure.ac:8: You should run autoupdate.
autoconf/general.m4:198: AC_FOREACH is expanded from...
aclocal.m4:7044: _AM_SET_OPTIONS is expanded from...
aclocal.m4:6847: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
configure.ac:78: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:209: AC_HELP_STRING is expanded from...
autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from...
aclocal.m4:1943: AC_ENABLE_SHARED is expanded from...
aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:66: AC_PROG_LIBTOOL is expanded from...
configure.ac:78: the top level
aclocal.m4:1982: AC_ENABLE_STATIC is expanded from...
aclocal.m4:2021: AC_ENABLE_FAST_INSTALL is expanded from...
autoconf/general.m4:1391: AC_ARG_WITH is expanded from...
aclocal.m4:2218: AC_PROG_LD is expanded from...
configure.ac:78: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:2415: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from...
autoconf/general.m4:1905: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from...
aclocal.m4:619: _LT_AC_LOCK is expanded from...
aclocal.m4:1105: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2730: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2661: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:1897: _LT_AC_TAGCONFIG is expanded from...
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists
configure.ac:78: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:170: AC_LANG_SAVE is expanded from...
aclocal.m4:4051: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4003: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
configure.ac:78: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from...
aclocal.m4:4095: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4059: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
configure.ac:119: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:119: You should run autoupdate.
admin/autotools/m4/acx_pthread.m4:246: ACX_PTHREAD is expanded from...
configure.ac:119: the top level
configure.ac:119: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:119: You should run autoupdate.
autoconf/c.m4:73: AC_LANG_C is expanded from...
configure.ac:119: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:119: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:8: installing `admin/autotools/missing'
configure.ac:8: installing `admin/autotools/install-sh'
src/Makefile.am: installing `admin/autotools/depcomp'
Makefile.am: installing `./INSTALL'

OK, bunch of warnings. That's the craziness of autotools, but most of time they seems to be harmless for obsolete macros.

/tmp/openal-trunk/OpenAL-Sample$ ./configure 
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking target system type... i386-pc-solaris2.11
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/gnu/bin/mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
checking whether the C compiler supports __attribute__... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/gnu/bin/grep
checking for egrep... /usr/gnu/bin/grep -E
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/gnu/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E -traditional-cpp
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no

Whoa, look at that, it failed for the most standard header files. I would never imagine this to happen. Something is seriously screwed up.

checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /usr/gnu/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for pkg-config... pkg-config
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h: check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/ioctl.h: proceeding with the preprocessor's result
configure: WARNING: sys/ioctl.h: in the future, the compiler will take precedence
configure: WARNING: ## --------------------------------------------------- ##
configure: WARNING: ## Report this to openal-devel-AT-opensource.creative-DOT-com ##
configure: WARNING: ## --------------------------------------------------- ##
checking for sys/ioctl.h... yes
checking sys/time.h usability... no
checking sys/time.h presence... no
checking for sys/time.h... no
checking time.h usability... no
checking time.h presence... no
checking for time.h... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for nanosleep... no
checking for usleep... no
checking for Sleep... no
checking for snprintf... no
checking for _snprintf... no
checking for cos in -lm... yes
checking whether pthreads work with -pthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with -mt... no
checking whether pthreads work with -pthread... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
checking for windows.h... (cached) no
checking sys/select.h usability... no
checking sys/select.h presence... no
checking for sys/select.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking types of arguments for select... int,int *,struct timeval *
checking for __int8... no
checking whether gcc accepts -finline-functions... yes
checking whether gcc accepts -ffast-math... yes
checking whether gcc accepts -fomit-frame-pointer... yes
checking whether byte ordering is bigendian... yes

Big Endian? Come on, this is a x86 laptop.

checking for dlfcn.h... (cached) no
configure: WARNING: Dynamic loading of libraries is not available.
checking whether gcc accepts -mmmx... yes
checking whether gcc accepts -mmmx -msse -msse2... yes
checking for yasm... no
checking for nasm... /usr/local/bin/nasm
checking whether gcc accepts -fvisibility=hidden... no
checking for ALSA compiler flags... unknown
checking for alsa/asoundlib.h... no
checking for ALSA backend support... none
checking for sys/soundcard.h... no
checking for OSS backend support... none
checking for native Darwin backend support... none
checking for esd-config... esd-config
checking for ESD compiler flags... none
checking for esd.h... no
checking for ESD backend support... none
checking for dmedia/audio.h... no
checking for native IRIX backend support... none
checking for null backend support... static
checking for sdl-config... sdl-config
checking for SDL compiler flags... -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
checking for SDL.h... no
checking for SDL backend support... none
checking for sys/audioio.h... no
checking for native Solaris backend support... none
checking for WAVE backend support... static
checking for windows.h... (cached) no
checking for native Windows backend support... none
checking for Vorbis compiler flags...
checking for vorbis/vorbisfile.h... no
checking for AL_EXT_vorbis supprt support... none
checking for smpeg-config... no
checking for SMPEG compiler flags... unknown
checking for smpeg.h... no
checking for AL_EXT_mp3 extension support... none
checking for void *... no
checking size of void *... 0
configure: creating ./config.status
config.status: creating Makefile
config.status: creating admin/Makefile
config.status: creating admin/pkgconfig/Makefile
config.status: creating admin/pkgconfig/openal-config
config.status: creating admin/pkgconfig/openal.pc
config.status: creating admin/RPM/openal.spec
config.status: creating common/Makefile
config.status: creating common/include/Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating src/arch/Makefile
config.status: creating src/arch/i386/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands

Gees, the compiler environment is so screwed up that most test actually fails, and I cannot even tell whose fault it is. :-(

Wednesday May 14, 2008

I have being upset that Solaris doesn't get latest Wireless Toolkit and decided to do something about it. The first thing I did is trying to build phoneME on Solaris as I was told that CLDC/MIDP is the main reason why Wireless Toolkit won't be available on Solaris(Aren't those available for Solaris with WTK2.1?), although I doubt all the different optional JSRs might be in problem as well.

Anyway, I started to port PCSL last year when worked on Robosapien, dropped it as I switched to other projects, and picked it up again recently. Thanks to Hinkmond, Gary and Yevgeny, the PCSL patch is now in the trunk. To build PCSL on Solaris:

gmake NETWORK_MODULE=bsd/generic

Moved on to CLDC, after tinkering around the build system and a patch, I can now build CLDC with

LD_ALTEXEC=/usr/gnu/bin/ld gmake

Noted that it has to be gnu ld, for some reason I don't know, the Solaris ld doesn't want to work by giving me following error:

linking ../bin/cldc_vm_g ...
ld: elf error: file ../bin/libcldc_vmtest_g.a: elf_getarsym
ld: fatal: File processing errors. No output written to ../bin/cldc_vm_g
collect2: ld returned 1 exit status
make[1]: *** [../bin/cldc_vm_g] Error 1
make[1]: Leaving directory `/export/home/henryjen/prj/phoneme/cldc/build/solaris_i386_gcc/target/debug'
make: *** [_debug] Error 2

Does anyone have an idea on what's going on with Solaris ld?

Monday May 12, 2008

I have being running Nevada(think it as Solaris Express Community Edition if you are not a Sun employee) on my laptop since I joined Sun, upgrades from one build to another. Lately, I use Live Upgrade and that works great.

With the Image Packaging System available in OpenSolaris, I had being looking forward to migrate, but considered the fact that OpenSolaris does not support upgrade of existing Solaris, the desire to upgrade simply cannot be satisfied because I don't want to risk interruption of my daily work. The laptop is where I do all my work.

With the latest OpenSolaris 2008.05 live CD distributed at JavaOne, seeing the cool visual effect of compiz(Yes, I am that shallow to love eye candies), and after JavaOne it is usually OK to take a little break, so I took the plunge.

As I have being using live upgrade, I would like to free one of the slice used for the old BE and install OpenSolaris in that slice. I knew OpenSolaris at this point can only install to a Solaris partition or use the whole disk, so what should I do? This discussion gave me good hints, and thanks to Detlef Drewanz, his detail instructions make the migration a much easier experience.

Note the process requires a secondary HDD. I do have a spare IDE HDD, and a must-have SATA/IDE to USB 2.0 Adapter by Vantec.

So here is a quick note on what I did, not exactly, but roughly recalled: 

  1. Connect the HDD with the USB adapter.
  2. Boot from OpenSolaris live CD, and install to the USB HDD.
  3. Reboot into the existing Nevada. 
  4. ludelete <old BE>
  5. zpool create osol <free slice>, in my case, /dev/dsk/c0d0s3.
  6. zpool import rpool. This will make the OpenSolaris installation available in Nevada.
  7. zfs send -R rpool/ROOT/opensolaris@install | zfs receive -d osol
  8. mount -F zfs osol/ROOT/opensolaris /mnt
  9. cp /etc/zfs/zpool.cache /mnt/etc/zfs/zpool.cache
  10. cp /kernel/misc/sysinit /mnt/kernel/misc/
  11. cp /kernel/misc/amd64/sysinit /mnt/kernel/misc/amd64/
  12. touch /mnt/reconfigure
  13. vim /mnt/etc/vfstab to make sure correct pool is used.
  14. vim /boot/grub/menu.lst to add the new entry for OpenSolaris
  15. bootadm update-archive -v -R /mnt
  16. Reboot! Remove the USB HDD while rebooting.
  17. Enjoy OpenSolaris by configuring visual effect and start to install stuff with pkg. :-) 

 

Sunday May 11, 2008

Time flies by, it has been ten months since last post. :-)

Recovering from another JavaOne, this year I participated in Project Hydrazine, created a web tool that can be used to create new services given a RSS/ATOM feed or just XML document contains recurrent elements. The tool also allows you to easily provision services on your phone. The team had created a solid foundation for this web tool to be possible.

Here is my favorite story at the JavaOne Project Hydrazine booth: A developer came see the demo, and he said Slashdot when we asked his favorite feed, so we locate the RSS feed, and in minutes we got to read Slashdot on the phone. Imagine combine this tool with Yahoo Pipes, you can get fully personalized services on your phone.

If you were not there at JavaOne, you probably would like to check out here for sessions available online. Personally, I think the lottery program powered by the Blue Wonder demo is pretty neat, congratulations on another good work for JavaOne, Mike.

 

 

Tuesday Jul 03, 2007

I had being using fetchmail + exim4 + courier IMAP server at home to allow me get IMAP service for my Gmail service. One reason is of course, I like to use thunderbird or evolution better than web-based interface. Another important reason is that, as many developers, I have quite a few mailing list subscription for different open source projects, I would like to automatically sort emails from those subscription into different folders, which I have being using procmail for that purpose.

But my Ubuntu desktop at home somehow screwed up the root file system after I tried the "switch user" and "automatically login" feature(to allow my one-month-to-five-year-old son playing games from the web), and that old P4 server consumes 80-100 watts constantly while my laptop only consumes 25 or so, I decided to ditch the home server until I can get my hands to a NSLU2 or other similar devices.

With that decision, I would like to give Gmail web interface a chance as I do like the conversation view although many people seems to hate it. But, I need to sort emails from various mailing list subscription with correct label, so that I can read them when I like, delete them permanently easily while allow me to keep other emails in archive(I have used 800MB+ quota due to those archived emails).

Supposedly, I should be using filter and label systems to do that. But as you may know, Gmail does not offer filter based on arbitrary headers, although there are mailing lists put prefix on Subject, but that is less reliable than using headers like List-Id or List-Post. Thus, I decided to write a simple Ruby script with gmailer library to do just that.

Unfortunately, Google does not like the idea of scripting and locked my account. Shortly after the account was unlocked, even I apply label manually from the web caused another lock.

I don't really understand the mindset of not providing simple features like arbitrary header filter against regular expression, maybe 80-20 rule would explain. But not allowing people to do it with simple script?

 

Unless Google is willing to loosen the restriction a little bit or provide
a better solution to create filters, I guess I will have to setup another server.

 

This blog copyright 2009 by slowhog