DragonLace.Net
Home of the GNAT AUX and future DRACO Ada compilers.

One of the big issues for the Ada Web Server on BSD is that the connection with timeout option was not functioning properly. It turns out this was due to a hardcoding that was specific to Linux and Solaris error messages. The source was patched to hardcode it to BSD error messages and now the connections timeout properly. In fact, it always did, but the error messages were more verbose than the standard "timeout". Since then, Adacore has updated the code such that it is not platform-dependent, and future versions of AWS will not require this BSD patch.

The only functionality that is not passing the regression tests is the "server push" option. The BSD's aren't auto-unregistering clients because the code is looking for a broken-pipe message which doesn't appear on BSD. This isn't really an issue because the programmer can still manually unregister the client and server-push isn't universally supported by browsers anyway, so it's sort of a niche feature.

Some features haven't been tested yet such as LDAP and IPv6, but the standard functionality of AWS is working well on BSD now.

Posted Sat Jan 01 03:43:51 2011

There exists seven ports for FreeBSD and an analogous seven packages for Pkgsrc which serves DragonFlyBSD and NetBSD. These ports/packages are mature enough that the process to introduce them into their respective trees will begin soon.

We've uses these ports/packages to build binaries for the following platforms:

  • FreeBSD i386
  • FreeBSD AMD64
  • DragonFlyBSD i386
  • DragonFlyBSD x86_64

The primary binaries available for these four platforms are:

  • GNAT AUX Ada Compiler
  • GNAT Programming Studio (GPS)
  • Ada Web Server (AWS)

Supporting binaries available for these four platforms are:

  • GnatPython (used for AWS regression testing)
  • GTKAda (GTK binding required by GPS)
  • XMLAda (General purpose XML library used by several projects)
  • GPRBuild-AUX (used to build multiple-language projects)

All packages will build on NetBSD AMD64, but binaries are not available for this platform at the moment. GtkAda doesn't seem to build on NetBSD i386 and thus no GPS has ever been built on this platform. The issue is some kind of linker problem and more investigation is required. It is not known at this time if the problem will hold up the submission of the packages into the pkgsrc tree.

Posted Sat Jan 01 12:35:08 2011

Any new port of GNAT will automatically fail any test involving stack checking and signal handling. Each port needs a platform-specific DWARF2 unwind mechanism added to the configuration, and it's not at all trivial to create this code.

Like the majority of the BSDs, no modern version of GNAT previously existed so nobody had ever created the unwind code for NetBSD. Unlike the other BSDs, NetBSD will likely require a separate signal handler scan pattern for each major version of the OS. FreeBSD, DragonFlyBSD, and OpenBSD all use sysctl to determine if the examined frame is a signal trampoline and thus are more robust.

The i386 NetBSD unwind support has been added to the code base and now NetBSD32 GNAT AUX passes 100% of the ACATS and gnat.dg test suite. As an aside, GNAT AUX builds and tests noticibly faster on NetBSD 5.1 than the other BSD platforms, so NetBSD 5.1 seems to be a very good platform for Ada development (pending the gtkada fix allowing the build of GPS of course.)

Update

While NetBSD32 GNAT AUX passes all tests, it has two flaws which are not covered by any existing test. A known problem is that it can't link to the Unwind_Resume function. When the MD_UNWIND_SUPPORT was added, a new issue with not recognizing Unwind_GetIPInfo cropped up. This results in not being about to build either AWS or GPS, although other packages are buildable. The _Unwind_Resume issue has not been seen on the NetBSD64 version of GNAT. Hopefully the other issue won't appear there when MD_UNWIND_SUPPORT is added to the NetBSD64 version soon.

Update 2

Both of these aforementioned issues are coming from the software packages.
They haven't been seen on other platforms because they are using GCC 4.2. NetBSD is using GCC 4.1. GtkAda was linking to the system shared library of libgcc rather than the newly built GNAT one and this has been corrected.
AWS has a similar issue, but the fix hasn't been found. The bottom line is the compiler itself is working.

Posted Mon Jan 03 13:44:54 2011

All seven ports (GNAT-AUX, XML/Ada, GPRBuild, GTK/Ada, GPS, GNATPython, and AWS) were submitted to the FreeBSD Ports community on 9 January. The report that tracks the request is PR 153828 and they've just started the testing on the submission, so hopefully they'll be available to FreeBSD users soon.

Today, the same ports minus AWS were submitted to NetBSD's pkgsrc. Since DragonFlyBSD also uses pkgsrc, users wth i386 and x86_64 processors of both operating systems will be able to build these from source. When the 2011Q1 bulk packages are built, they'll be able to just install the binaries from standard repositories. This will take about 3 months because the 2010Q4 snapshot is just getting built now.

Ever since Unwind Support was added to NetBSD, the Ada Web Server stopped building on NetBSD. It's linking to the system gcc library (too old) rather than the GNAT version of it. It's actually only a tool that's not build (awsres). Ideally the authors of AWS will be able to suggest a fix, otherwise the three options are either exclude NetBSD from the platform list (iow DragonFlyBSD is the only platform that can build it) or somehow patch the source to skip building the awsres tool. So for now, the AWS package hasn't been submitted.

The pending PRs on NetBSD are 44436 through 44441.

Posted Sat Jan 22 07:18:45 2011

This weekend, a GNAT AUX cross compiler was built for Android (ARM architecture).
While there are no regression test results available, we can at least demonstrate that a helloworld program written in Ada runs on the Android SDK emulator.

Screenshop of program execution

The standard GCC version of GNAT runs flawlessly on the ARM v7 port of Linux with the default sjlj exception handling, but to our knowledge it's never been ported to the Android operating system before.

The purpose for this cross compiler is that Android applications can be written entirely in Ada, and that they interface natively with the c libraries that control the phone/tables IO events. Starting with Android 2.3 (Gingerbread) it's possible to write applications in languages other than java. The intention was to make C and C++ programmers happy, but it opened the door for the rest of us.

Speaking of which, credit needs to be given to Mike Long for blazing the trail. He blogged about getting a Fortran application running on his Android device, and even has a nice You Tube video to prove it. We'll try to produce similar results soon enough, but check out Fortran on Android. Stay tuned for more developments about Ada on Android.

Posted Sat Jan 29 17:43:02 2011
Last edited Fri May 24 16:28:01 2013
© 2010 John Marino | design elements by styleshout | artwork by Arturo Aguirre