Pre-Alpha RC1

June 2nd, 2008 at 22:46 · Filed Under Ada, At Work, Blogging, Days in My Life, Software Development, Web · Comment 

I am in the midst of getting the KazeServer to roll out. During this pre-Alpha RC1 stage, works have been a little pressured especially cleaning up parts of the codes to make it neater and more efficient. A number of factors are also affecting during pre-Alpha stage.

One of them is the gnat Ada compiler issue on Ubuntu Hardy Heron or 8.04. Hardy comes with gnat-4.1 with a number of packages not added. Without these packages, I can’t build AWS-2.3. So, I have to roll out Alpha RC1 on Mac OS X until Ubuntu Intrepid or 8.10 with gnat-4.3 is released (hopefully with gnat-4.3 by October). I have another option which is I have to move to Debian Etch with gnat-4.1 but including the libaws-2.2.

libaws-2.2 is a pre-built library for AWS on Debian Etch. I am developing using gnat-4.4 and AWS-2.3 on Mac OS X. Moving to Debian Etch means I am downgrading the version of gnat and AWS and I feel a little skeptical about it. This is one thing I hate most, version inconsistency among the Linux distro.

After talking to my friends on this matter, it looks like I have few choices but to target on Mac OS X for the moment considering the tasks of installing and get the Debian Etch up and a whole lot of uncertainties in gnat-4.1 and AWS-2.2.

Can’t build AWS in Ubuntu

May 26th, 2008 at 9:44 · Filed Under Ada, Computing, Linux, Software Development · 1 Comment 

About two weeks ago, I installed Ubuntu Hardy Heron in VMware Fusion on my MacBook (running Leopard). After some playing around with Ubuntu on my MacBook, I began to install software components such as the Ada compiler so that I could do testing on my MacBook without switching to the Ubuntu box.

I am working on a web-enabled application developed with AWS (Ada Web Server). This application is developed on Mac OS X. Building and testing on mac OS X has no problem at all. To compile the source on Ubuntu, I need AWS. So, I tried to install AWS packages from Ubuntu but found only broken dependencies. Then I decided to build one myself. The build has failed because the gnat (Ada compiler) from Ubuntu is 4.2. It lacks two Ada packages, a-calfor.ad[sb] (Ada.Calendar.Formatting) and a-catizo.ad[sb] (Ada.Calendar.Time_Zones). AWS depends on these to build.

I posted to comp.lang.ada and AWS list. It looks like I have no choice but to bootstrap gnat-4.3 myself or install from Ubuntu Intrepid or wait for the next Ubuntu release of gnat-4.3.

HOWTO - Building GtkAda project with xcode

October 7th, 2007 at 11:35 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 2 Comments 

My current project (here) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding on MacAda.org is very old and supports only gnat-3.3 and PPC (I hope I am not wrong on this).

I have to turn to Gtk+ which will require GtkAda and X11 on Mac OS X. I compiled my test code written for GtkAda very well on console. But when I imported the codes into xcode project, it did not compile. I got the following errors:


error: "gtk.ads" must be recompiled ("a-except.ads" has been modified)
error: "gdk.ads" must be recompiled ("a-except.ads" has been modified)
error: "glib.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-object.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-type_conversion_hooks.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada.ads" must be recompiled ("system.ads" has been modified)
error: "gtkada-bindings.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada-c.adb" must be recompiled ("system.ads" has been modified)
...

I sought help from GNAT-OSX mailing list (September 2007 archive), but there was no avail. I spent many days investigating the cause of the errors. I found out that gtkada source codes would be compiled and produced .ali and .o files in the build directory when I used gnatmake to build my GtkAda application.


$ gnatmake testproject.adb `gtkada-config`

To build a GtkAda project in xcode, follow the instructions below:

  1. In the project browser, under the Group & Files column, locate Targets and the your project name. Right click your project name and select Add Link Binary With Libraries. Select GtkAda libraries from /opt/local/lib/gtkada and necessary libraries from /opt/local/lib.
  2. Select your project name and click on the Info button. In Build tab, select Search Paths under Collection. Include /opt/local/include/gtkada in Header Search Paths. Also include /opt/local/lib and /opt/local/lib/gtkada in Library Search Paths.
  3. Select Source in your project. Select Add to Project … in Project menu. Include all the GtkAda source files in /opt/local/include/gtkada.

HOWTO - Installing gnat-4.3 on Mac OS X

October 4th, 2007 at 23:15 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 4 Comments 

Perhaps someone has written this before but it seems no where to be found. So I just write a simple HOWTO about installing gnat-4.3 on Mac OS X.

My installation is on MacBook 2.16GHz Intel Core 2 Duo running Mac OS 10.4.10 with Xcode 2.4.1. Pre-requisition is to have Xcode installed before installing gnat-4.3.

  1. Go to MacAda.org to download gnat-4.3 and other necessary tools. Launch the installation in the disk image.
  2. Make the following softlinks:
    
    $ ln -s /usr/local/ada-4.3/bin/gcc /usr/bin/gcc-4.3
    $ ln -s /usr/local/ada-4.3/bin/g++ /usr/bin/g++-4.3
    
  3. Launch gcc_select:
    
    $ sudo gcc_select 4.3
    

Xcode 2.3 and gcc-4.2 (Ada)

July 13th, 2006 at 0:33 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Mac OS X, Software Development · Comment 

I have finally decided to update to Xcode 2.3 and gcc-4.2. There is not much information about how to install except from the MacAda mailing list. So, I decided to post the How-To here.

Here are the procedures:

  1. Uninstall previous Xcode installation by
    $ sudo perl /Developer/Tools/uninstall-devtools.pl
  2. Restart the computer
  3. Download and install Xcode 2.3
  4. Download and install gcc-3.3 Ada compiler from MacAda
  5. Download and install gcc-4.2 Ada compiler
  6. Unzip and untar the gcc-4.2 package with
    $ tar -zxvf fsf-ppc-gcc-4.2.0-20060429.tgz

    or

    $ tar -zxvf fsf-i686-ada-4.2-20060409.tgz

    depending if you are using PowerPC or Intel Mac.

  7. Move the directory ada-4.2 to /usr/local
  8. Download and install Ada Plugin for Xcode and follow the instructions.

I tested Xcode by compiling some projects and it is great. But I still cannot manage to build Ada dynamic library with it. It looks like some problems with the flags. Here’s the error and warning messages I got:

warning -L: directory name (/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/default) does not exist
unknown flag: -Wl, -single_module

Solution for building dynamic shared Ada library with Xcode

July 9th, 2006 at 22:51 · Filed Under Ada, Call Me a Geek, Computing, Hacking, Mac OS X, Software Development · Comment 

Finally, I got some answer from the mailing list. It is a problem with Xcode 2.2 and gcc 3.3 and it seems like an update to Xcode 2.3 and gcc/gnat 4.2 is inevitable.

The reason I am skeptical about software update is that I have a number of on going development. A simple tiny glitch in the new update will cause big havoc especially after all the recompilation of source codes.

Anyhow, I am glad to hear the solution and I will update my development tools soon after I have made a few confirmation.