Thursday, March 12, 2009

Why Does Anyone Use OpenSolaris?

I was trying to help someone on the filezilla forums who uses OpenSolaris. They weren't too familiar with how to compile their own binary. Since OpenSolaris is free, I decided I would just download a copy, stick it in VirtualBox and try it out.

First of all, it looks nice, and all the vmware hardware seemed to work (more or less). The graphics driver seemed to be VESA based so my resolution was limited to 1024x768. Maybe the VirtualBox extensions would fix this.

Okay, my first gripe: The default installation doesn't come with any development tools. Okay, the whole thing did come on a single CD and includes Gnome, so I guess some stuff needs to be sacrificed, but the development tools? So I started Package Manager and looked for gcc. In comes my second gripe. Even though OpenSolaris is from Nov 2008, the gcc version they are hosting is 3.4.3. That's pretty old. Whatever, it should work for my needs.

There are several minor packages on which filezilla depends. It needs wxWidgets, libidn, libgcrypt, and gnutls. FileZilla depends on version 2.8 of wxWidgets, and the installer checks for the latest minor revision 2.8.9, but the package manager only had 2.8.8 (not as ancient as the gcc they're hosting, but still old). I couldn't find any of the other libraries. It also needs GNU gettext, but since I was able to run gettext and xgettext, I thought OpenSolaris came with that (more on that later).

Since I wasn't sure how to get around the FileZilla check for wxWidgets 2.8.9, I decided to build wxWidgets. Now we come to even more problems. wxWidgets seems to want to build the Motif version even though I got the wxGTK release. Oh, this must be because the gtk development headers aren't installed on OpenSolaris. BTW: I still can't find these. I saw a GTK package, but it's version 1.2. Who would use that these days? It's unsuitable IMO. Okay, we'll use the 2.8.8 package and figure out how to trick FileZilla later.

I was able to build libidn, libgcrypt, and gnutls without problem. That's about the only positive I ran into.

Since I can't figure out how to build wxWidgets since I can't find the gtk development package, I had to find a way to trick FileZilla into using the 2.8.8 version. First I decided to modify the configure.in script to accept version 2.8.8. When I first tried it, it ignored my changes. It didn't rerun autoconf for some reason. Oh yeah, it's not installed. Go back to Package Manager, and surprise, surprise, autoconf isn't one of the packages. Okay, well that solution won't work.

Let's tell wx-config to lie to FileZilla instead. Oh wait, there's no usable editor on this system. No nano, pico, or even emacs. I'm stick with vi. Since I have no idea how to use vi, I look at the graphical editor options and I find gedit. Okay, that will work, overkill that it is. BTW: nano isn't in the Package Manager either.

After telling wx-config to lie for us, FileZilla gives me a new error. We don't have dbus installed. Really I blame FileZilla for this. If dbus isn't available, it's configure script should disable support for it itself; we shouldn't have to pass --without-dbus on the configure line. Instead of trying to find dbus (which I'm already sure won't be found in package manager), I rerun with --disable-dbus.

On to the next error. Oh, msgmerge isn't installed. Apparently, gettext and xgettext are not from GNU gettext after all. So we need to go get that. I tried to build the 0.17 version from source and ran into some weird compile error. So I ran back to package manager and it had the 0.16 version, so I installed that. Finally, the configure script completes.

I have a quad core processor, so of course I use make -j5 to build. But no, we're not using GNU make. We're using Sun make, which doesn't support that option. So I'll just leave 75% of my CPU idling while it builds on a single core.

It quits with another cryptic message. One thing I noticed was that it said ld: fatal: library -lCstd: not found. Does this mean it can't find the C standard library? Well, that would be par for the course I guess.

If anyone has suggestions, I'm open to them. For now, I'm left with the question: Why does anyone use OpenSolaris?

edit: Someone mentioned that lCstd is the Sun CC C++ library, which is probably why it wouldn't work with gcc, but I'm not sure if that's right or not. It makes sense anyways.

I was able to find what I needed to build FileZilla. SUNWgnome-common-devel contains the GTK+ libraries. SUNWxwinc and SUNWxorg-headers are the X libraries and includes. SUNWgnu-idn was there all the time. Not sure how I missed it. Building wxWidgets and GNU gettext from source solved the rest of my problems. I put up a guide to compiling FileZilla under Solaris on the FileZilla wiki.

3 comments:

  1. I am running into the -lCstd issue now while trying to compile a wxWidgets app. First, gcc and friends are in /usr/sfw/bin. They were installed by default. I had to symlink gmake to make, same for gar and granlib. The `wx-config --cxxflags` turns into something with -mt that breaks compilation (this does not happen in my Linux setup). I tried with `wx-config --cppflags` instead. Not sure what the consequences are. Ayway, I am stuck with this lCstd thing now...

    ReplyDelete
  2. I completely agree. I tried OpenSolaris since my University is going to force me to Solaris 10 containers for a project I am doing. Lo and Behold, any bloody thing that I try to complile gives strange errors from gcc. I get this obligatory "-mt" in any CPPFLAGS that autoconf makes... It's very annoying. After 4 days of #$%^&*ing with it, I think I'll head back to either a Debian based, or RedHat based distro....

    ReplyDelete
  3. I Have tried Open Solaris on Virtual-box on Windows XP Pro SP3 and much as it looks quite pretty as a toy, I cannot see any practical use for it. As Sun Microsystem has been taken over by Oracle I cannot see it being developed further. I think Solaris itself is intended for use on a server. I imagine that one is better off using some version of Linux as so much has been written for Linux.
    If one really wants to make life difficult one can always try a version of BSD, which I believe makes an excellent server, and is still one of the biggest undergrinders of the internet. I found it difficult to really understand the hard drive partitioning in BSD.

    ReplyDelete