This note covers some problems we’ve had with Xcode/the Command Line Tools (CLTs) at version 15.
Sunday, 11 February 2024
Wednesday, 7 June 2023
Alire on macOS, revisited
This note covers some of the considerations that’ll apply when running Alire on macOS.
Sunday, 20 November 2022
Building GCC 12.2.0 on Ventura for aarch64
These are notes on building GCC 12.2.0 and GNAT tools for Apple silicon.
There were two main problems:
- the base package was built on an Intel machine (lockheed - named after Shadowcat’s companion dragon), running Monterey (macOS 12).
- the build machine, an M1 mac Mini (temeraire - named after Naomi Novik’s dragon) was by this time running Ventura (macOS 13), but I wanted to make sure that users could continue to run on Monterey.
Saturday, 6 March 2021
Developing for Cortex MCUs on a Raspberry Pi
Recently, on the Gitter Ada Programming Language lobby, there have been discussions on cross-compiling for Cortex M micro-controllers, specifically the BBC micro:bit, using the Raspberry Pi.
TL;DR: it's not going to be easy, unfortunately. Maybe later (or earlier?) Raspbian releases will help.
Monday, 10 June 2019
MacOS Software Development Kit changes
This post is based on the README from the corresponding Github repository.
That repository attempts to cope with expected changes in Apple’s approach to software development kits, specifically where to find the system headers (you’d expect /usr/include).
Monday, 19 November 2018
Mojave vs. GCC
After you've installed Xcode (or, my preference, the Command Line Tools via xcode-select -install) so that you can install and use GNAT, you may expect to be able to compile C code too.
Mojave may surprise you with
$ gcc casing.c -o casing
casing.c:1:10: fatal error: stdio.h: No such file or directory
1 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
The reason, according to this question and its answers, is that Apple's developer tools, in particular the clang compiler, know where to find the include files under /Library/Developer; GCC doesn't (I'm sure it could be made to, but ...) and so we have to add an extra step to install them in the normal place:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / Password: installer: Package name is macOS_SDK_headers_for_macOS_10.14 installer: Installing at base path / installer: The install was successful.You may need to repeat this after macOS or Command Line Tools (or Xcode) updates.
Mojave vs. GDB
Apple's software development tools are based on LLVM, and Apple don't seem to feel it necessary to keep GCC and friends up to date with changes in the Apple tools or security policies.
GDB has been particularly affected by this. You can see why a tool which is capable of interacting with running programs would have to be treated with caution.
Tuesday, 2 June 2015
Building a runtime system for arm-eabi
The public version of the AdaCore Ravenscar RTS is released under the full GPL. It seemed as if it would be a good idea (and fun!) to produce an independent RTS with the GCC Runtime Library Exception (FAQ).
Friday, 1 May 2015
Building GCC 5.1.0 for arm-eabi
These notes describe building GCC 5.1.0 for the Cortex M4 on Mac OS X.
My target board is the STM32M4F29I Discovery.
Thursday, 30 April 2015
Building GCC 5.1.0
These notes describe building GCC 5.1.0 for Mac OS X, with Ada, C, C++, Fortran, Objective C, Objective C++, and various GNAT tools.
Sunday, 30 November 2014
Relocating GCC
AdaCore's doinstall is an excellent way of installing the compiler where you want to. Unfortunately, GCC 4.9 uses the shared libgcc_s.1.dylib, which has no @rpath-type constructs, and so the compiler executables expect to find libgcc_s.1.dylib in the place it was built for. (Not to mention libstdc++.6.dylib.)
Tuesday, 11 November 2014
Building GNAT GPL 2014 for arm-eabi
These notes describe building GNAT GPL 2014 for the Cortex M4 on Mac OS X.
My target board was the STM32M4F29I Discovery.
Tuesday, 30 April 2013
Building GCC 4.8.0
These notes describe building GCC 4.8.0 for Mac OS X, with Ada, C, C++, Fortran, Objective C, Objective C++, and various GNAT tools.
Friday, 8 February 2013
Patched GCC!
2013-02-07 Simon Wright <simon@pushface.org> PR target/50678 * init.c (__darwin_major_version): New function for x86-64/Darwin. (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround on Darwin 12 and above.
Monday, 14 January 2013
Tracking down a Program_Error
A StackOverflow question about a Storage_Error exception when trying to implement a FastCGI example in Ada prompted me to investigate.
Thursday, 24 May 2012
Building GCC with Ada on Solaris x86
This note documents (with some elisions!) building FSF GCC for Ada on Solaris 11 for x86.