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

Development of Ada ports in Pkgsrc has started, and is going pretty well. While Pkgsrc claims it has been ported to many systems including all five that are supported by DragonLace, effectively it is only used by NetBSD and DragonFlyBSD. So far, there are packages for GNAT AUX, XML/Ada 4.1, GPRbuild (which is a custom version only for use with GNAT AUX), GNATPython, and Ada Web Server (AWS). The packages for GTKAda and GNAT Programming Studio 5 are the next in line. The packages have not been incorporated in the Pkgsrc repository yet, but they are available in the DragonLace git repository.

While building AWS, it was discovered that non-blocking sockets were not supported for at least the 64-bit versions of DragonFly BSD, NetBSD, and OpenBSD. FreeBSD64 seemed not to mind. In the end, the fix was to create a BSD-specific version of the thin-sockets binding and recompile GNAT. None of the published binaries have this fix, but the pkgsrc versions will build correctly.

Notes:

  • The 32-bit NetBSD pkgsrc package isn't building. It is likely a problem with the NetBSD installation, so this will be retested with a new installation of NetBSD 5.1
  • The DragonFly BSDs have a weird exception handling bug that is very hard to reproduce in a small test case, but it has been seen in the 32-bit version while build GPRbuild and AWS. GPRbuild was altered to avoid "normal" exceptions to work around the issue, but this is a band-aid. AWS is also showing symptoms during exceptions for file-not-found file open procedures, but not in small test cases. The symptom is trying to recall variables from an empty stack
  • The 10 NetBSD failures are due to the lack of MD Unwind Support for the platform. This will be added to handle null dereference pointers and enable stack checking.
  • The FreeBSD and DragonFly BSD MD Unwind Support may not be correct for all platforms and will be reviewed. It was thought this is the source of the error mentioned above but disabling it althogether did not solve the issue. Update: The code has been reviewed and updated for the 64-bit versions.
Posted Wed Dec 01 12:55:36 2010

32-Bit GNAT AUX

Despite passing all testsuite tests, the 32-bit versions of GNAT AUX were having some serious issues with exception handling. They would only show up on complex programs, and couldn't be reproduced with a simple stand-alone test. With the help of Adacore's Eric Botcazou, the problem was narrowed down to a platform-specific traceback function. Once the 32-bit GNAT AUX were switched to use GCC_UNWINDER mechanism. the latest builds (4 DEC 2010) stopped exhibiting the exception handling defect.

GNAT Programming Studio

GTKAda and the GNAT Programming Studio have been added to the Pkgsrc tree that we are developing. GPS has been built successfully on both DragonFly platforms and 64-bit NetBSD. There was a problem with the 32-bit version of GPS on NetBSD which hasn't been examined carefully yet.

Pkgsrc

Adacore has been accepting BSD patches for GnatPython, AWS, and GPS, so the packages are being converted to use the latest development code rather than the yearly release. AWS is at version 2.10 (more info below), GPS is at version 5.0, and GtkAda is at version 2.22. No binary packages have been released yet, we are waiting for the development to stablize.

FreeBSD

Development on the FreeBSD ports has started. So far, XML/Ada, GPRbuild-AUX, GnatPython, and AWS have been successfully built. GNAT-AUX, GtkAda, and GPS ports are still pending.

Ada Web Server (AWS)

The AWS build is performing pretty well, although there are still a few regression tests failing. The most serious is the socket connect with timeout functionality, and it may require a significant patch to the code base. The problem is probably related to the recently added thin-binding package for BSD sockets, and the socket polls for BSD are returning something AWS doesn't expect (it appears the poll is correct though and AWS may have been taking advantage of a quirk all this time). The bottom line is that AWS is in good, but not perfect shape. It's certainly usable as long as timeout connections are avoided for now.

Posted Sun Dec 12 05:32:29 2010

The development ports for FreeBSD have been getting tweaked, and new ports for GNAT AUX, GTKAda, and the GNAT Programming Studio have been added on top of that. For 32-bit intel architectures, everything is working well. GPS 5.0 seems to be working as expected, but it hasn't been run through the paces.

The AMD64 version of the GNAT AUX on FreeBSD is another story. While only 15 ACATS tests are failing, it's in worse shape than indicated. GPS won't even build without an GNAT "ICE" (Internal Compiler Error). The Ada Web Server builds, but it's failing about 90% of it's regression tests. At this point, the FreeBSD64 version of GNAT AUX is probably only suitable for helloworld type programs if that. The 64-bit versions of DragonFlyBSD and NetBSD are in perfect working order, so those needing 64-bit GNAT on BSD should look at those platforms first. Whatever ails FreeBSD64 hasn't been found yet, but we'll keep looking.

The next step is to produce some binary packages, and the step after that is to get these ports added to the FreeBSD ports repository.

Posted Mon Dec 20 18:08:11 2010

What a great way to close out the old year! With the assistance of a FreeBSD thread expert, Kostik Belousov, we determined that the only problem the 64-bit version of GNAT AUX had was that it was trying to execute tasks off the stack. This isn't allowed by default on FreeBSD. In fact, the only BSD that does allow this by default is DragonFly. OpenBSD, NetBSD, Darwin, and Solaris all specifically change the permissions on the stack by the page before using it as a trampoline. Apparently nobody ever bothered to create the same functionality for FreeBSD.

Luckily for us, the trail blazed by the *nixes allowed similar functionality to be developed for FreeBSD 64 quickly. The results were instantly gratifying as the FreeBSD64 GNAT AUX passed all tests immediately, and uses the Zero-Cost exception handling again as well.

The downloadable binary has already been updated to the patched Dec 21 snapshot, and the FreeBSD packages will be developed soon, and submitted to the ports once everything is verified working. The i386 packages have already been built (for DragonFly BSD as well) but haven't been made available just yet. But soon!

Posted Fri Dec 31 19:15:30 2010
Last edited Fri May 24 16:28:01 2013
© 2010 John Marino | design elements by styleshout | artwork by Arturo Aguirre