May 17, 2008

Winston PrakashVisual Web FAQ revised for NB 6.1

May 17, 2008 04:29 PM GMT

The contents of the Netbeans Visual Web has been revised for the Netbeans 6.1 release.

http://wiki.netbeans.org/NetBeansVWPUserFAQ

This FAQ is not created by development team or doc team, but collection from articles contributed by various developers and users from blogs, forum etc. Any interested contributer can add to this FAQ. Details at http://wiki.netbeans.org/HowToAddFAQEntries

The main topics covered in this FAQ are

 

GeertjanCode Generator SPI Officially Available

May 17, 2008 04:24 PM GMT
Sometime ago this blog provided a preliminary example of a code generator. However, at the time, all that info wasn't official yet and you had to set an implementation dependency on one of the APIs. In the meantime, if you look at the NetBeans API Changes since Last Release document (which you should keep tabs on religiously, if you're a NetBeans Platform developer), you'll see this notification: "Code Generation SPI added":

The Code Generation SPI consists of two interfaces. The CodeGenerator implementations registered for various mime types serve for creating code snippets and inserting them into documents on the Insert Code editor action invocation. The CodeGeneratorContextProvider implementations registered for the mime types could provide the respective CodeGenerators with an additional context information.

Fine. What does all that mean? Firstly, interestingly, it means that the CodeGenerator class (and its supporting classes) are now officially supported and are exposed to the NetBeans API Javadoc. So, read the description to get an overview of it all.

Secondly, guess what? You can create code generators for any MIME type you want. So, you could add one/more to your HTML files... such as here:

So, the above appears when I press Alt-Insert in an HTML source file. What happens when I select the code generator item is up to me (i.e., the implementor of the API). In the case of Java source files, you can make use of the rather cool (though very cryptic) Retouche APIs. Let this document be your friend. I have found it pretty tough going, but gradually things become clear. Below, step by step, is my first implementation of a code generator. In the process, you'll see the Retouche APIs in action.

  1. Get a very recent post 6.1 development build and create a new NetBeans module.

  2. Set dependencies on Editor Library 2, Javac API Wrapper, Java Source, and Utilities API.

  3. Let's start very gently:

    import java.util.Collections;
    import java.util.List;
    import org.netbeans.spi.editor.codegen.CodeGenerator;
    import org.openide.util.Lookup;
    
    public class HelloGenerator implements CodeGenerator {
    
        public static class Factory implements CodeGenerator.Factory {
    
            @Override
            public List create(Lookup context) {
                return Collections.singletonList(new HelloGenerator());
            }
        }
    
        @Override
        public String getDisplayName() {
            return "Hello world!";
        }
    
        @Override
        public void invoke() {
        }
        
    }

  4. Register it in the layer.xml file like this, in other words, register the Factory that you see in the Java code above:

    <folder name="Editors">
        <folder name="text">
            <folder name="x-java">
                <folder name="CodeGenerators">
                    <file name="org-netbeans-modules-my-demo-HelloGenerator$Factory.instance"/>
                </folder>
            </folder>
        </folder>
    </folder>

  5. Now you're good to go. Just install the module and invoke the code generators as always, Alt-Insert, and then you'll see the new one added:

  6. OK, now we'll do something useful. We'll start by getting the JTextComponent from the Lookup. That JTextComponent is the Java editor and if we use getText, we can get the text of the Java editor. We can also get the Document object, which is all that we need in order to get the JavaSource object, via JavaSource javaSource = JavaSource.forDocument(doc);, which, in turn, is our entry point into the Retouche APIs. So, here we go:

    public class HelloGenerator implements CodeGenerator {
    
        private JTextComponent textComp;
    
        private HelloGenerator(JTextComponent textComp) {
            this.textComp = textComp;
        }
    
        public static class Factory implements CodeGenerator.Factory {
    
            public List create(Lookup context) {
                Item textCompItem = context.lookupItem(new Template(JTextComponent.class, null, null));
                JTextComponent textComp = textCompItem.getInstance();
                return Collections.singletonList(new HelloGenerator(textComp));
            }
        }
    
        @Override
        public String getDisplayName() {
            return "Hello world!";
        }
    
        @Override
        public void invoke() {
        }
        
    }

    I don't know whether the above is the optimal way of doing this, but at the end of the day we now have a JTextComponent. In the next part, I've simply taken code from the Java Developer Guide, referred to earlier, and implemented the invoke exactly as described there, so see that document in order to understand the code below:

  7. Define the invoke method like this, which as stated above is completely taken from the Java Developer Guide:

    @Override
    public void invoke() {
        try {
            Document doc = textComp.getDocument();
            JavaSource javaSource = JavaSource.forDocument(doc);
            CancellableTask task = new CancellableTask() {
                @Override
                public void run(WorkingCopy workingCopy) throws IOException {
                    workingCopy.toPhase(Phase.RESOLVED);
                    CompilationUnitTree cut = workingCopy.getCompilationUnit();
                    TreeMaker make = workingCopy.getTreeMaker();
                    for (Tree typeDecl : cut.getTypeDecls()) {
                        if (Tree.Kind.CLASS == typeDecl.getKind()) {
                            ClassTree clazz = (ClassTree) typeDecl;
                            ModifiersTree methodModifiers = make.Modifiers(Collections.singleton(Modifier.PUBLIC), Collections.emptyList());
                            VariableTree parameter = make.Variable(make.Modifiers(Collections.singleton(Modifier.FINAL), Collections.emptyList()), "arg0", make.Identifier("Object"), null);
                            TypeElement element = workingCopy.getElements().getTypeElement("java.io.IOException");
                            ExpressionTree throwsClause = make.QualIdent(element);
                            MethodTree newMethod = make.Method(methodModifiers, "writeExternal", make.PrimitiveType(TypeKind.VOID), Collections.emptyList(), Collections.singletonList(parameter), Collections.singletonList(throwsClause), "{ throw new UnsupportedOperationException(\"Not supported yet.\") }", null);
                            ClassTree modifiedClazz = make.addClassMember(clazz, newMethod);
                            workingCopy.rewrite(clazz, modifiedClazz);
                        }
                    }
                }
                @Override
                public void cancel() {}
            };
            ModificationResult result = javaSource.runModificationTask(task);
            result.commit();
        } catch (Exception ex) {
            Exceptions.printStackTrace(ex);
        }
    
    }

  8. Excellent. At this point, check that you have this impressive list of import statements:

    import com.sun.source.tree.AnnotationTree;
    import com.sun.source.tree.ClassTree;
    import com.sun.source.tree.CompilationUnitTree;
    import com.sun.source.tree.ExpressionTree;
    import com.sun.source.tree.MethodTree;
    import com.sun.source.tree.ModifiersTree;
    import com.sun.source.tree.Tree;
    import com.sun.source.tree.TypeParameterTree;
    import com.sun.source.tree.VariableTree;
    import java.io.IOException;
    import java.util.Collections;
    import java.util.List;
    import javax.lang.model.element.Modifier;
    import javax.lang.model.element.TypeElement;
    import javax.lang.model.type.TypeKind;
    import javax.swing.text.Document;
    import javax.swing.text.JTextComponent;
    import org.netbeans.api.java.source.CancellableTask;
    import org.netbeans.api.java.source.JavaSource;
    import org.netbeans.api.java.source.JavaSource.Phase;
    import org.netbeans.api.java.source.ModificationResult;
    import org.netbeans.api.java.source.TreeMaker;
    import org.netbeans.api.java.source.WorkingCopy;
    import org.netbeans.spi.editor.codegen.CodeGenerator;
    import org.openide.util.Exceptions;
    import org.openide.util.Lookup;
    import org.openide.util.Lookup.Item;
    import org.openide.util.Lookup.Template;

  9. Now install the module again. Then open a Java source file. Let's say it looks like this:

    package org.netbeans.modules.my.demo;
    
    public class NewClass {
    
    }

    Press Alt-Insert anywhere in the source file, choose "Hello world!", and now you will see this instead of the code above:

    package org.netbeans.modules.my.demo;
    
    import java.io.IOException;
    
    public class NewClass {
    
        public void writeExternal(final Object arg0) throws IOException {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    
    }

Hurray. You have your first code generator. In an HTML source file, the above invoke method could be as simple as this, which would print <h2>hello</h2> at the caret:

@Override
public void invoke() {
    try {
        Caret caret = textComp.getCaret();
        int dot = caret.getDot();
        textComp.getDocument().insertString(dot, "<h2>hello</h2>", null);
    } catch (BadLocationException ex) {
        Exceptions.printStackTrace(ex);
    }

}

The very cool thing about these code generators is that you can keep typing, i.e., your fingers don't leave the keyboard in order to go to a menu item via the mouse, etc. You're typing as normal, then you press Alt-Insert, you select something, and then you go on typing. Being able to make your own contributions to the list of Java code generators (plus, being able to make them for other MIME types) is a really powerful enhancement to NetBeans IDE.

SidharthInstalling OpenSSO (B4) on Glassfish

May 17, 2008 04:22 PM GMT

OpenSSO is a self-contained J2EE application and the installation is a breeze. Here's the detailed steps.

1.  Create a base directory. "/opensso_bits"

2.  Install GlassFish. If you already have GlassFish running, go to step-4.

3.  Create a GlassFish domain - "fam".

To Create new GlassFish domain.  
Create "/tmp/passfile" with following content,
AS_ADMIN_ADMINPASSWORD=adminadmin
AS_ADMIN_MASTERPASSWORD=changeit

Create glassfish domain with the following commandline
./asadmin create-domain --adminuser admin --passwordfile /tmp/passfile --portbase 7000 fam

4.  Start Glassfish instance and make the following changes to the instance on which opensso is being deployed (fam)

cd <GLASSFISH_HOME>/bin
./asadmin start-domain fam

./asadmin delete-jvm-options  --port 7048 --user admin "\\-client"
./asadmin create-jvm-options  --port 7048 --user admin "\\-server"

./asadmin delete-jvm-options  --port 7048 --user admin "\\-Xmx512m"
./asadmin create-jvm-options  --port 7048 --user admin "\\-Xmx1G"

5.  Important (Optional for first time opensso install on a system).

If you already have opensso deployed and configured on the GlassFish instance,

- Undeploy opensso (via GlassFish admin console)
- Delete the configuration directory, as used during the previous configuration. (e.g. rm -rf /opensso)
- Delete the Access Manager directory (Usually in the users home directory). (e.g. rm -rf /AccessManager)

6.  Restart the glassfish instance.

cd <GLASSFISH_HOME>/bin
./asadmin stop-domain fam
./asadmin start-domain fam

7.  Deploy OpenSSO on the Glassfish domain "fam".

- Go to Glassfish admin console. (http://<host>.<domain>:7048)
- Login as admin/adminadmin
- On left nav bar, click on "Web Applications"
- Click on "Deploy".
- Browse and locate opensso.war ( "/opensso_bits/opensso/deployable_war/opensso.war" )
- Under "General"
- Application Name - opensso
- Context Root - opensso

- Click "Ok"

8.  Go to the deoployed opensso instance.

- Under "Custom Configuration", select "Create New Configuration".
- General
- Password - <password for amadmin>
- Confirm Password - <same as above>

Server Settings (Most of the following are populated by the installer and can be left as it is.)

- Server URL - <e.g. http://sid.opensso.com:8080>
- Cookie Domain - <e.g. .opensso.com>
- Platform Locale - <e.g. en_US>
- Configuration Directory </openssoconfig>

Configuration Store - (e.g. Use all Defaults, as populated by installer).

- Data Store Type - <e.g. Embedded (Open DS)>
- Port - <e.g. 50389>
- Encryption Key - <e.g. as populated by installer>
- Root Suffix - <e.g. dc=opensso,dc=java,dc=net>

User Store Settings (e.g. Use Defaults, as populated by installer)

- Embedded.

Site Configuration (e.g. Use Defaults, as populated by installer)

- Will this instance be deployed behind a load balancer as part of a site configuration? <No>

Agent Information

- Default Agent [amldapuser]
- Password - <select password, should be different from the password for amadmin>
- Confirm - <same as above>

Click "Next".

Summary

Click "Create Configuration".

9.  You'll see a message "Configuration Complete", "Proceed to Login".

Click on "Proceed to Login"

10.  Login as amadmin with the corresponding password.

Arun GuptaAsk The "JRuby + NetBeans + GlassFish" Experts

May 17, 2008 04:15 PM GMT

NetBeans and GlassFish have changed the landscape of Ruby, JRuby and Rails development and deployment. Code completion, debugging, similar development and deployment environment and many other features (NetBeans, GlassFish) together make it a compelling offering.

Tor Norbye, Brian Leonard and Charles Nutter are fielding questions on Ruby/JRuby/Rails support in the NetBeans IDE and GlassFish in a week-long Ask The Expert session (May 19-23). A complete archive of the Q&A will be available later. You can submit your question here.

If "Ask The Expert" window is missed, the questions can always be asked on user@jruby.codehaus.org, users@glassfish.dev.java.net and users@ruby.netbeans.org.

Technorati: ruby jruby rubyonrails netbeans glassfish

Winston PrakashNetbeans Visualweb user tips and code snippets

May 17, 2008 04:09 PM GMT
I'm planning to post useful programming tidbits provided by Netbeans Visual Web users in my blog.  If you have any interesting tips, code snippets or ideas for enhancements and want to share them with others and get their comments, send me an e-mail at wjprakashATnetbeansDOTorg. I''l post them in my blog.

Yasuhiro Fujitsuki(JA) rdesktop 1.6.0

May 17, 2008 04:00 PM GMT
先週、rdesktop の最新版 rdesktop 1.6.0 がリリースされました。

http://www.rdesktop.org/

スマートカード対応やALSA対応等、1.5.0から様々な改善はあるのですが、 一番大きいのが下記だと思います。(rdesktop-announceに投稿されたメールから抜粋)。

* Fix for connection to Windows 2008 Server

Windows Vista や Windows 2008 の RDP 6.0 に対応です。 Sun Ray を利用している場合は Windows Connector がありますが、 それ以外の環境の場合(OpenSolaris上とか)で Windows に RDP で 接続したい場合は rdesktop ということで。

Pat Pattersonlinks for 2008-05-17

May 17, 2008 03:23 PM GMT

Jim GrisanzioInsight

May 17, 2008 03:22 PM GMT
Absolutely unbelievable.

Yasuhiro Fujitsuki(JA) Fedora 9 Part2

May 17, 2008 03:14 PM GMT
自宅のノートPC(NEC Lavie RX) に Fedora 9 をインストールしてみました。
DVD版にはバグがあるようで、デフォルトでは日本語入力ができないし、フォントが一部入っていなかったり色々あるようです。
とりあえず、
# yum -y groupinstall 'Japanese Support' --exclude=xorg-x11-server-Xorg

というようにすると日本語環境がインストールされるようです。 ただ、KDEをインストールしている場合、

Transaction Check Error:
  package kdelibs-4.0.3-7.fc9.i386 is already installed

Error Summary
-------------

とエラーが出て、yumがちゃんと動きませんので、 下記のように個別にインストールする必要があります。

# yum install kde-i18n-Japanese kde-l10n-Japanese man-pages-ja \
openoffice.org-langpack-ja_JP scim-anthy scim-lang-japanese anthy kasumi

# yum update fonts-japanese

ただ、この状態ではKDE環境でIMEが起動してくれません…。(調査中)

KDE 4はなかなか良いですが、まだ安定性に欠ける感じですね。 新しくなったメニューはコンパクトなんですが、ちょっと使いにくいというか 馴れが必要だと感じました。
私の環境ではログアウト時にエラーが出るのとIMEの関係で今のところ常時利用は厳しそうな感じがします。

と、OpenJDKの話。 Fedora 9 では、IcedTea から OpenJDKに変更されています。 ということで、java-version としてみたところ。

# java -version
java version "1.6.0"
OpenJDK  Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)

となりました。
fedoraのリポジトリでは既にアップデートが提供されています。 アップデート前は「開発」、アップデート後は「Lost & Found」(KDE)もしくは「その他」にOpenJDKがらみのアプリケーションが2つ登録されています。



Java Monitor & Management Console を起動してみましたが、 下図のように日本語がちゃんと表示されていますので、 この辺の設定は不要みたいですね。 明朝フォントになっているのでちょっと気に入りませんが。^-^;



Masako OfuchiJavaFX.COM をみててうれしかったこと

May 17, 2008 03:13 PM GMT

JavaFX.com をなにげなくみていたら、Flikcr から動的に画像を瞬時に ひっぱってくる JavaFX のデモ動画にこんな検索文字列が!

これは、Sun Tech Days を国際フォーラムで実施した関係でしょうか・・?
JavaFX のキーパーソンもいらっしゃってましたしね。

さて、このデモは JavaOne 2008 のキーノートでも紹介されたので、以下でも見られます。

リッチグリーンのキーノート 4 つめのビデオ

この Flickr 画像表示デモがはじまるのは 13 分くらいのところなんですが、 jamesgosling って検索してるところで、James Gosling と Sun Tech Days@国際フォーラム で共演?した日本人のあのエグゼクティブの写真がまじってたとか・・・
これは最前列に限りなく近いところで見ていたお方じゃないとわかんないだろうなぁ。。。 (ちなみに Gosling の写真も彼の撮影した写真があったらしいです。)

もっと JavaOne ビデオがみたいーという方はコチラへどうぞ。 JavaOne ジェネラルセッションのビデオ一覧

HPCThis week on the Sun HPC Community Portal

May 17, 2008 03:00 PM GMT

Check out these items of note this week on the Sun HPC Community Portal:

Videos:

* Andy Bechtolsheim on Open Storage Townhall
* YouTube: New Sun x64 Systems with Quad-Core Processors
* Future Filesystems: Intelligent, Object-based Storage

Blogs:

* Andy Bechtosheim to Keynote Sun HPC Consortium in Dresden
* Growing Flowers with Datacenter Heat
* Announcing Grid Engine 6.2 Beta Binaries

Events:

* Design Automation Conference, Los Angeles, CA, June 8-13

* Sun HPC Consortium, Dresden, Germany, June 15-17

* International Supercomputing Conference ISC08, Dresden, Germany, June 17-20

Roman StroblFoss Camp Prague

May 17, 2008 12:19 PM GMT

Quick note: I just did a presentation with Arseniy Kuznetsov (NetBeans director) about NetBeans at FOSS camp. It was kind of cool to demo Matisse in front of people like Mark Shuttleworth :) I think the demos were well received and we also had a discussion about getting NetBeans into Main Ubuntu repository (it is now available in Ubuntu Universe). There seems to be a potential for NetBeans to become a really popular IDE among Linux developers - we support many languages they use. The main missing language seems to be Python - and as you probably know Sun hired two Python/Jython developers to work on that - so the future of Python support in NetBeans is very bright.

FOSS Camp was an unconference, actually we were the only presenters who were using a projector (sorry about that but it would be hard to draw features of the IDE on a flipchart :). I wonder how many of the Ubuntu guys noticed I delivered my presentation on OpenSolaris (Gnome looks almost identical on Linux and OpenSolaris). It was nice for a change to visit an unconference, it definitely has a more "human" atmosphere with more 2-way communication than we see at typical conferences. Maybe it's time for NetBeans to organize some unconference as well? Just an idea.

HPCYouTube: Building an Open Storage Community

May 17, 2008 12:00 PM GMT

In this video, Sun's Matthew Baier talks about the new Open Storage Community with Lynn Rohrer.

JimmoSolaris chosen over Linux for better performance

May 17, 2008 10:20 AM GMT

It's nice to hear a success story, no matter how big or small, so I was pleased to see that Real Time Matrix Corp. had a pleasant surprise when the compared the performance Solaris 10 to Fedora.

Despite being a committed Linux environment, they decided to try out Solaris 10 while they had a T1000 on trial...and ended up feeling quite pleased with the result, claiming that Solaris 10 had "50 times the throughput" of the Fedora configuration.

For the full story, take a look at the online article.

Simon Phippslinks for 2008-05-17

May 17, 2008 08:32 AM GMT

Takayuki OkazakiMac OS X 10.5(Leopard)からOS X 10.4(Tiger)へ

May 17, 2008 08:21 AM GMT
img2008-043
自宅のパソコンがずいぶん調子が悪くなってしまい、ブラウザも頻繁にフリーズするし、PhotoshopやIllustrator、NetBeansを使ったりしているとみるみる機嫌が悪くなる。もともとLeopardを入れるときにはクリーンインストールではなくて、アップグレードインストールしていたのでいろいろおかしなデータが残っていたりしたはずで、その辺が原因のような気もしなくはないので、Leopardをクリーンインストールするという選択肢もあったのですが、いくつかの都合でまずはTigerにダウングレードすることにしました。
img2008-045
一つ目の理由はJava for Mac OS X 10.5 Update 1が手元のマシンでは使えないことです。どういう訳かAppleからリリースされているJava SE 6は64-bit版のみ。うちのパソコンはCPUがIntel Core Duo 1.8GHzというタイプで、32-bit CPUです。このため64ビットアプリケーションは動作しません。おかげでJava SE 6の選択肢が未だにSoyLatteしかありません。
img2008-055
次の理由はSonyのGPSロガー GPS-CS1Kがマウントできないためです。GPS-CS1KはもともとWindows用ですから、Macで使えないことに対してとやかく言うこともできないのですが、買ってしまった以上使えなくなってしまうと困ったことに・・・。Leopardにあげてから半年以上、GPSのログは参照できないままになっていました。これについては実はOS X 10.4.11でも実は解決できないのですが、それについてはまた別途。
img2008-072
3つ目の理由は、Leopardであることに対してそれほど執着するほど必要な機能がないことでした。Leopardの新機能で紹介されている中で、ないと困る機能は日本語辞書ぐらいでしょうか。それにQuickLookも捨てがたいですが、もともとプレビューが高速に動作するのでそれほど気になりません。Spacesは、個人的にはあまり使わない機能で、SolarisやLinuxなどでは昔から装備されていますがほとんど使ったことはありませんでした。また、Spacesになってからも同様に滅多に使いませんでした。
img2008-070
以上のような理由から、いったんTigerで様子を見ることにしました。いれかえてからだいたい10日ほど経ちましたがかなり快適になりました。快適になった理由が再インストールによるものであることは間違いありませんが、まだTigerに変えたことが理由かどうかまではわかりません。次のような点でずいぶん快適になりました。 img2008-073
あと、せっかく再インストールをしたのでインストール時の設定メモを。いまさらTiger用の設定なのであまり参考にならないと思いますが・・。

インストール直後の設定

システム環境の設定

QuickTime

Safari

PDFをSafari内で開かないようにする。
$ defaults write com.apple.Safari WebKitOmitPDFSupport -bool true

Terminal.app

Bonjour (旧 Rendezvous)

オフにする。
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Spotlight

ディスク全体は検索対象としない。
$ sudo mdutil -i off /

Firefox

その他

ネットワーク上には.DS_Storeを作らせない。
$ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
ファームウエアパスワードの設定。 Mac OS X Install Disc 1にはいっている「/Applications/Utilities/ファームウエアパスワードの設定」で設定。

Takayuki OkazakiFirefox 3 RC1を入れてみた

May 17, 2008 07:30 AM GMT
Firefox 3 rc1
そろそろ試しておこうと思い、入れてみました。この最近追いかけてなかったんですが、結構変わっててびっくりしました。デザインもなんだかシャープな感じです。スクロールスピードもかなり早いですね。もう常用しても良さそうな感じ。

Henry JenOpenAL on OpenSolaris

May 17, 2008 07:29 AM GMT

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

Henry Jenautotools hell

May 17, 2008 07:22 AM GMT

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. :-(

Tim BrayFotD: May 16 Orange and Blue

May 17, 2008 07:08 AM GMT

Orange and blue and green, actually. I could give you the flower names and so on but why bother, it’s just some blossoms and leaves, cheery stuff.

Orange and blue blossoms against greenery

I think the leaves are as pretty as the flowers.

Peter Harveylinks for 2008-05-17

May 17, 2008 06:33 AM GMT

Takayuki OkazakiLomo Fisheye2水没・・

May 17, 2008 06:14 AM GMT
_DSC6636-D
Lomo Fisheye2、いきなり水没させてしまいました。それはその日の2ダイブ目のエントリ。ハウジングのロックが開いていて、ざぶざぶ水が入っています。ああ・・・。
img190
でもトイカメラのすごいところは作りがシンプルなだけあって、意外と復活してしまうことです。さすがに海水は厳しいところですが、水洗いして乾かしたところ無事復活。でもレンズの中に水分が入って曇っています。ストロボは光らなくなってしまいました。
img210
強い日差しで乾かしたらずいぶんと曇りもとれてきました。
img216
光が柔らかい感じになってこれはこれでフィルターっぽい働きをしてくれます。
_DSC6815-D
(Nikon D50 + SIGMA MACRO 105mm F2.8)
後日もう少し乾いてから試したところストロボも復活していました。すばらしい!デジカメではこんなことあり得ないですね。

Takayuki OkazakiトイカメラLomo Fisheye2 + Fisheye submarineで水中写真

May 17, 2008 05:48 AM GMT
この間買ったばっかりのLomo Fisheye2を持って伊豆の水中写真を撮ってきました。
img2008-068
場所は伊豆の大瀬崎というところです。
img2008-064
水中で泡を撮ってみました。フィルムは富士フィルムのNEOPAN 400 PRESTOです。Fisheye2は絞りF8、シャッタースピード1/100固定なので、フィルムの感度側でしか調整できません。水中は陸上に比べて暗いので、ISO 1600ぐらいのフィルムの方がいいかもしれません。
img2008-066
キビナゴの群れ。水深5mぐらいのところなので、まだ明るいです。
_DSC6587-D
水中でFisheye2の状態を映してみました。Fisheye2は軽いのでぷかぷか浮いてしまいます。
img2008-048
これも水深5mぐらいのところだと思いますが、水の透明度もよくなかったのでものすごく暗く映っています。
img2008-062
ソフトコーラルを撮ってみました。ストロボもまあまあ使えますね。
img2008-060
Fisheye submarineというハウジングは水深20mまでしか使えません。スノーケリングをするには十分ですが、ちょっと深めのポイントでダイビングをするには物足りなさを感じます。せめて、30mぐらい行けてほしいです。で、いきなり実験してみました。この写真はちょうど水深30mのところで撮ったものです。30mは無事クリアできました。
(証拠写真ということではないですが、右向きに映っている魚はサクラダイというやつで、深めの場所にいる魚です。)
img2008-061
ほぼ同じぐらいの深度でミノカサゴ。 ストロボの光が水中浮遊物にあたってマリンスノー状態です。モノクロで撮るとマリンスノーもそんなに悪くないですね。
img2008-063
この左手前にいるのが珍しいクチナシツノザヤウミウシです。でもこの写真では全然わかりませんね・・。
_DSC6604-D
こちらが同じものをNikon D50 + Sigma Macro 105mm F2.8 + Sea & Sea YS-110で撮ったものです。深めのところであんまり粘れなかったので、今ひとつな写真になってしまいました。

Bill WalkerThe world's coolest customer...

May 17, 2008 05:07 AM GMT

My project manager brings in homemade cookies and muffins several times a week. The customer buys lunch, pizza on Tuesdays, and Jason's Deli sandwiches on Thursdays. The whole team (about 30 people) are invited out for a happy hour once a week, including dinner at one of the local eateries. Very cool customer, very cool work. Oh yeah, I'm here doing work.

I'm doing a provisioning project, using Jumpstart and the JET toolkit to model and test the provisioning of dozens of the new T52x0 CMT servers, implemented and provisioned on-demand through the N1 Service Provisioning System. This is a tight schedule project, so ZFS, LDOMs, and some other new functionality and features are being left until the next update to the environment. We are using Solaris Containers and the N1 Service Provisioning System though. In fact, each server on the application side will have 36 full root zones running the Sun Glassfish Enterprise Server and Sun Java System Web Server.

There, enough links to make any shareholder happy.

This project has been full of interesting challenges. Try deploying around 100 servers along with the deployment architecture in 60 days. Of course, there were some standards and policies in place, but the customer wanted to streamline things, and increase efficiencies in patching and systems management. Now throw in 36 full root zones (containers) in each system, with 6 filesystems each, all running on the internal disk drives with no external storage. Hmmm... This is getting complicated (and very snug). Oh yeah, we need to implement Live Upgrade, and make sure that the whole project is well documented, easy to manage, flexible and modular so that the next revision of the provisioning and systems infrastructure can evolve in a simpler and more organized set of projects.

I'll post some of the more interesting challenges, issues, resolutions, and creative solutions as this project develops. Never a dull moment, or an end to the opportunities to be creative with this project!


cheers!
bill.



jyrivirkkiWeb Stack Road Trip

May 17, 2008 03:48 AM GMT

It's been very busy times lately so haven't had a chance to blog..

Thanks to everyone who came to my OpenSolaris AMP (slightly misnamed as it covered all of Web Stack) talk at CommunityOne last week.

Next week I will be at the Sun Tech Days conference in Mexico City again talking about OpenSolaris Web Stack. I hope to see some of you there!


scblogDOM Inspector in Firefox Sidebar

May 17, 2008 03:45 AM GMT

In this entry I talked about how to show Google Talk in Firefox Sidebar. Using the same technique you can show the DOM Inspector in the Firefox Sidebar. That way you can get the DOM Inspector in the same window as the page you are inspecting.

 Here is how. Just create a bookmark like this:

DOMInspectorInSideBar Bookmark

and then invoke the bookmark. Then use the File:Inspect Window > menu item to select the window you are browsing in. You will see something like this

DOMInspectorInSidebar

Unfortunately the Sidebar is not resizable. However this could be tweaked using the property overlay incantation overrding the flex attribute of the sidebar box. Also the popup dialogs to search for  nodes does not work. Once again some XUL overlay gimmickry could come handy here.

Useful? You decide.

Ryan ArnesonUsing the X4500 as a Backup Disk-Cache

May 17, 2008 03:34 AM GMT
I've published two papers to BigAdmin on how to use the Sun Fire X4500 as a large disk cache for disk-based backups with Symantec Netbackup and Sun's own Sun StorageTek Enterprise Backup Software.

Sun Fire X4500 Server as Storage Node for Sun StorageTek Enterprise Backup Softwware 7.4

Sun Fire X4500 as a Media Server for Symantec Veritas Netbackup 6.5

Both papers discuss using the X4500 running Solaris10 and the ZFS Filesystem to present a large (10-15TB) amount of disk-cache for fast backups and restores.

Check them out. Your feedback is welcome on the BigAdmin Wiki discussion pages.

Marc HamiltonWhat Is Our Most Popular Product This Month?

May 17, 2008 03:32 AM GMT
Let me give you some clues. Earlier this week Sun announced a number of new servers supporting AMD's latest quad core "Barcelona" processors like the Sun Fire x4140, with eight cores, 16 DIMM slots, and 8 internal drives with over 1 TB of storage capacity in a compact 1RU form factor and its big brother, the Sun Fire T5140, packing two eight core UltraSPARC T2 Plus CPUs with 128 threads in 1 RU is what you need. These are all tremendously powerful servers and have seen great customer adoption in the short time since their release. Of course Sun's education customers in the US are snapping up the eight core Sun Fire x2200 m2 which thanks to the US Education Essentials Matching Grant is discounted from the regular list price of $2815 to $1126. We remember we didn't have much money when we went to school either and don't think student's tuition should go to buying high over priced or out of date servers. But the product line that is getting some of the biggest increases, percentage wise, in customer interest is our most powerful server, the M9000.

Sybase certainly thought so, they recently set a Guinness World Record for the world's largest database, over 1 PetaByte of data and over six trillion rows of transaction data. Now that is a big database. What server did they choose to set this world record with? Sun's M9000. OK, so most users of Sun's MySQL database may be more interested in a x4440 and a Guinness beer, I'm not sure there are any 1 PetaByte MySQL databases yet. But I wouldn't bet against MySQL moving into this range in the future. Meanwhile, lots of customers who need to run really large databases and other open systems applications are turning to the capabilities of Sun's M9000.

Congratulations to Sybase on their new world record! Now I think I'll grab my Guinness, the liquid one not the hardback.

Ryan ArnesonIs Two and a Half Years Enough?

May 17, 2008 03:13 AM GMT
...wipes off the dust.

Well, that was certainly a long hiatus!

In the words of Jake Blues...

I ran out of gas. I, I had a flat tire. I didn't have enough money for cab fare! My tux didn't come back from the cleaners! An old friend came into town! Someone stole my car! There was an earthquake! A terrible flood! Locusts! IT WASN'T MY FAULT, I SWEAR TO GOD!

So you see, there were circumstances.

I truly have meant to blog about some of the things I've been up to, such as testing/certifying many of our storage products with VMware ESX, testing our NAS products with NDMP, writing white papers on the X4500 and backup software, just to name a few.

I'll do better going forward. Lots to talk about. Lots to show.


Timothy Kennedydiskread: reading beyond end of ramdisk (& how I recovered)

May 17, 2008 02:46 AM GMT
We had to do a maintenance to replace a NEM module in a Sun Blade 8000 Modular System. Two of my team mates went on down to the datacenter on other business and graciously offered to SWAP the NEM for me. The pulled the old one out, stuck the new one in. That's as simple as it should have been. Should have been. I wish. Instead, the chassis started to freak out, cycling it's power over and over, and somehow was taking the CMM with it. In between one set of cycles, I was able to connect to the CMM via console and paste in a bunch of commands to shut down chassis power. I let it sit for a moment, then began to power up the system. First the chassis, then the individual blades. One blade came up, no problem. The next two, though, were very much less than happy, spitting out errors like:
diskread: reading beyond end of ramdisk
	start = 0x2000, size = 0x2000
failed to read superblock
diskread: reading beyond end of ramdisk
	start = 0x2000, size = 0x2000
failed to read superblock
panic: cannot mount boot archive
Press any key to reboot

The GRUB menu was coming up OK, though, so I pressed the trusty any key, booted into Solaris 10 Failsafe mode. This was no picnic either.
SunOS Release 5.10 Version Generic_120012-14 32-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Booting to milestone "milestone/single-user:default".
Configuring devices.
Searching for installed OS instances...
NOTICE: /a: unexpected free inode 5825, run fsck(1M)
/dev/dsk/c2t0d0s0 is under md control, skipping.
To manually recover the boot archive on a root mirror,mount the first
side (the one that the system boots from) and run:

        bootadm update-archive -R 

umount: /a busy

No installed OS instance found.

Starting shell.
#
My immediate thought was "WTF? No installed OS instance found?" Closer inspection revealed that it had in fact found two possibilities, but one c2t1d0s0 was inconsistent and needed a fsck, and the second c2t1d0s0 was under md control, and so being skipped. An fsck of /dev/dsk/c2t0d0s0 revealed a few inconsistencies. Here's an example. I think this was actually the 3rd of 4th fsck I ran on this dev:
bash-3.00# fsck /dev/dsk/c2t0d0s0
** /dev/rdsk/c2t0d0s0
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
UNREF FILE  I=1457  OWNER=root MODE=100644
SIZE=657 MTIME=May 15 18:01 2008
RECONNECT? y

UNREF FILE  I=1458  OWNER=root MODE=100644
SIZE=675 MTIME=May 15 18:06 2008
RECONNECT? y

** Phase 5 - Check Cylinder Groups

CORRECT BAD CG SUMMARIES? y

CORRECTED SUMMARY FOR CG 0
FRAG BITMAP WRONG
FIX? y

FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUMMARY FOR CG 4
CORRECTED SUMMARY FOR CG 12
CORRECTED SUMMARY FOR CG 30
CORRECTED SUMMARY FOR CG 70
CORRECT GLOBAL SUMMARY
SALVAGE? y 

Log was discarded, updating cyl groups
46737 files, 1720899 used, 24099860 free (21460 frags, 3009800 blocks, 0.1% fragmentation) 

***** FILE SYSTEM WAS MODIFIED *****
So far, so good. Let's reboot, and see if we an come up in a multi-user state. So ... reboot ... wait ... wait ...
Same panic as our previous boot. We're missing something. A further delve into google reveals that I need to recreate the ramdisks for boot. A boot into failsafe mode again, allows me to fsck c2t0d0s0, which is mounted on /a, and remount it -o rw. bootadm update-archive fails, due to fs inconsistency. Another fcsk, we're in single user, nothing is using that disk, so I just ran the fsck without remounting -o ro. Now, let's skip bootadm and just move straight along to /boot/solaris/bin/create_ramdisk.
bash-3.00# /boot/solaris/bin/create_ramdisk -R /a
Creating ram disk for /a
updating /a/platform/i86pc/boot_archive...this may take a minute
That's it. That's the little piece of magic that fixed it. After that, I was able to reboot, and the server came right up into runlevel 3. Not without a few minor errors, but at least it was up.
SunOS Release 5.10 Version Generic_127112-11 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: generic
NOTICE: /: unexpected free inode 9193, run fsck(1M) -o f
NOTICE: /: unexpected free inode 5961, run fsck(1M) -o f
WARNING: /: unexpected allocated inode 9637, run fsck(1M) -o f
Loading smf(5) service descriptions: 1/1
/dev/md/rdsk/d60 is clean
/dev/md/rdsk/d30 is clean
/dev/md/rdsk/d20 is clean

generic console login:
At this point it was pretty simple to complete the fix, which, not wanting to reboot into failsafe mode and fsck a bunch more to recover from the unexpected free and allocated inodes, I wrote a script to: by turns, detach each have of the root mirror, clear the detached metadevice, newfs the raw device, re-create the metadevice, and attach it once again to the mirror. Let it sit long enough to complete the resync, and repeat the same steps on the other half of the mirror.
#!/bin/sh
#
# fix-mirror.sh
#
# 05-16-2008 Tim Kennedy 
#
# This script will take one argument, which should be the 
# metadevice of the mirror you want to rebuild.  This script
# will determine the Submirrors, and one at a time, detach,
# clear, newfs, re-init, and reattach them.
# For me this has solved problems with ailing filesystems,
# while replacement storage is procured.
#
# YMMV.  Use at your own risk.  This is not in any way to
# be considered a Sun Microsystems product, and is not in
# any way supported by Sun Microsystems.
#
 
PATH=/usr/bin:/usr/sbin
export PATH
 
MIRROR=$1
 
check_return () {
        RETURN=$1
        if [ $RETURN = 0 ]; then
                printf "%-6s\n" "[ok]"
        else
                printf "%-6s\n" "[err]"
                echo 
                echo "please check the last step manually to see why it failed."
                echo
                exit 1
        fi
}
 
for m in `metastat $MIRROR | grep "Submirror of $MIRROR" | cut -d: -f1`; do
        echo "Found Submirror $m"
        DEVICE=`metastat -p $m | awk '{print $NF}'`
        printf "%-72s" "    -- metadetach $MIRROR $m"
        metadetach $MIRROR $m >/dev/null 2>&1
        check_return $?
        printf "%-72s" "    -- metaclear $m"
        metaclear $m >/dev/null 2>&1
        check_return $?
        printf "%-72s" "    -- newfs /dev/rdsk/$DEVICE"
        echo y | newfs /dev/rdsk/$DEVICE >/dev/null 2>&1
        check_return $?
        printf "%-72s" "    -- metainit $m 1 1 /dev/dsk/$DEVICE"
        metainit $m 1 1 /dev/dsk/$DEVICE >/dev/null 2>&1
        check_return $?
        printf "%-72s" "    -- metattach $MIRROR $m"
        metattach $MIRROR $m >/dev/null 2>&1
        check_return $?
        printf "%-72s" "    -- checking resync status before continuing "
        while [ 1 ]; do
                STATE=`metastat -c $MIRROR | head -1 | grep resync`
                if [ "x${STATE}" = "x" ]; then
                        printf "%-6s\n" "[ok]"
                        break;
                else    
                        sleep 60
                fi
        done
done
Now these blades are happy once again. We'll see how long that lasts or if they continue to have problems of any sort. My hope is for the former. Have a good weekend.

Charles DitzelA Java Green Moment : Consolidation, CoolThreads Servers and Energy

May 17, 2008 02:23 AM GMT
Java apps running on a server take energy. My favorite servers are not quad-core procs - they are 8 core procs (with 64 hardware threads) and they are built to save energy. Bingo. The push to virtualization is about saving energy and money. More...

Jim GrisanzioOpenSolaris is Hiring

May 17, 2008 02:09 AM GMT
Nice to see OpenSolaris engineering at Sun looking for more people:

Roger Dong yudong为地震死伤者祈祷

May 17, 2008 01:08 AM GMT

昨天我们公司的现场救助志愿者发回邮件的时候,公司里许多人哭了。不过令人欣慰的是,这次天灾以后我们看到了一个团结的民族,一个理性的民族,一个充满希望的国家和民族。我们看到了台湾同胞血浓于水的兄弟感情,得到了国际上的朋友的支持。我们甚至感染了那些以往对我们并不那么友好的一部分人。

死者已逝 - 为他们点一只蜡烛。天堂的路上,不再孤独。

(转一篇俄罗斯国家新闻网报道) 

中国不需要同情,中国需要理解;中国不需要安慰,中国需要支持。我们愿以杯水之力,尽寸尺之能,和中国人民站在一起。我们知道,一个总理能在两小时就飞赴 灾区的国家,一个能够出动十万救援人员的国家,一个企业和私人捐款达到数百亿的国家,一个因争相献血、自愿抢救伤员而造成交通堵塞的国家,永远不会被打 垮。

希望必将与中国同在。

让我们为生者祝福,为死者祈祷。中国,走好。

Andrew RutzBooks I've read since January, 2007 ...

May 17, 2008 12:54 AM GMT

theaquariumScala's Lift on GlassFish v3

May 17, 2008 12:53 AM GMT
ALT DESCR

I'm beginning to think we "undersold" GFv3 TP2 when we called it a Technology Preview as pretty much anything we are throwing at it works! Check out Vivek's latest note on Scala Lift Framework.

Starting with a Maven Archetype, it creates a Scala Lift project using a Derby database that can deploy on GFv3 and, with a small change it can use v3 tp2 embedded for ease of development through mvn glassfish:run. Neat!

Todd FastApplications for the Masses by the Masses: Why Engineers Are An Endangered Species

May 17, 2008 12:49 AM GMT

I did a session last week at JavaOne 2008 where I talked about how application development, and the role of application developers, is changing. Here's the abstract:


When we engineers normally think of applications, we think of elaborate technology that takes highly trained developers weeks, months, or years to develop and debug. But our days are possibly numbered. In this era of light-speed boom and bust, the demand for technology is higher than ever and engineers and their traditional development techniques simply can’t keep up. What’s needed is “disposable applications,” applications so quick and easy to write that they are cheaper to throw away than to maintain and which the increasing numbers of casual technologists can consume and even create themselves.

Fueling this demand in recent months has been the release of high-profile web platforms (such as Facebook, Ning, Meebo, and others) that increasingly enable nontechnical users to compose mashups and other social and situational applications out of widgets and RESTful-style web services, all built by use of lightweight technologies and composed right from the browser.

This session describes how these factors are coming together to produce a new paradigm of application development in which hordes of 16-year-olds are in charge and software engineers are overwhelmed by the flood of applications created by tech-savvy novices. It also examines the roles of high technology versus technology for the masses and shows that they are actually complementary and a boon to engineers and nonengineers alike.

...

I presented to about 500 people over two sessions on Wednesday and Friday, and despite the fact that I could not show a demo, it was a rapt audience. Since then, coverage has been popping up around the Web.

Here are slides and links to articles and other material:

SlideShare | View | Upload your own

Articles

Blogs

Jason BeloroLogical Domains (LDoms) 1.0.3 is available

May 17, 2008 12:23 AM GMT
I skipped a post for LDoms 1.0.2 but I knew 1.0.3 was right on its heels and now its available for download here!

LDoms 1.0.3 adds a number of virtual I/O enhancements with Solaris 10 5/08 OS and supports the UltraSPARC T2 Plus, UltraSPARC T2 and UltraSPARC T1 based servers:

Supported Servers

Included in the download are optional LDoms System Management Tools:

LDoms Documentation available at http://docs.sun.com/app/docs/coll/ldom1.0

See The Download Page, README and/or Release Notes for required Software and patches

Support

Developer Blogs

May 16, 2008

dannycowardTop 10 JavaOne 2008 Rich Client things

May 16, 2008 10:23 PM GMT


Here's my top 10 list from Java on the client at JavaOne this year. Enjoy x 10 !

Top 10
What is it ?
Know more...
JavaFX SDK
The JavaFX SDK is (almost) here !
Hot demos (there were quite a few) and a cool new website are all good, but signing up for the SDK to get it next month or so is going to be awesome. Its built with Java, built on Java. Its built in Java.
JavaFX can run parleys.com. Did I