Continuing the exploration. in make.log I find multiple problems with maybe_unused in big_decimal.c:
bigdecimal.c:249:5: error: ‘maybe_unused’ attribute cannot be applied to types
249 | ENTER(1);
I can fix that with a patch for maybe_unused — but so far haven’t managed to get all the way to a working build.
Wild guess: everyone who currently has a working build started on an earlier Mac OS X/XCode Tools combo where Ruby 3.0.4 could build, then upgraded to a newer OS. The previously built binary works, but cannot be compiled on 15.3.1 and possibly some other versions.
Now obviously these are issues in Ruby, not in the core iNat code base. However, it does warn us that:
A) iNat is vulnerable to perhaps undiscovered bugs and security issues in Ruby 3.0.4 that are not going to be fixed by the Ruby maintainers.
B) We could have a lot of trouble building iNat in the future if any of the currently working laptops are lost or damaged
Possibly we could work around B by installing an older OS/XCode, installing Ruby there, and then upgrading the OS. If anyone knows the last MacOS/XCode tools versions that they were able to setup, I can downgrade a MacBook to that and see if that works. It’s also possible someone with more Ruby experience than me can get this all the way to a working install on the current OS. Linux might also be an option for building.
However, it does feel like right now the iNat codebase doesn’t have very firm foundations, and fixing this should be a high priority code health item. I haven’t yet been able to bring it up on Ruby 3.4.1. Maybe I can try 3.1 as an intermediate step.