Nat! bio photo

Nat!

Senior Mull

Twitter Github Twitch

The upcoming mulle-objc 0.22.1 release (I): Cross Platform

logo

Intro

This is not the release announcement (yet). I’d like to explain ahead of time, what’s coming as to not overload the announcement itself. Ideally this will be a multi-part series, but lets see, how soon I lose interest in that ;)

Cross platform expanded

mulle-sde

The main platform in terms of development is and remains Linux. macOS as a “first class” citizen has been supported for a long time as well. WSL/MiNGW32 has tooling support, but it’s not fully supported as the “Foundation” does not have enough windows specifica.

I decided to try various other Unix platforms to see, if I could build the runtime there.

Due to the differences in the development environment, lots of changes had to be made to the cmake files and the mulle-sde scripts. So these additional platforms are now recognized and are expected to compile the mulle-data:

  • Android (x86)
  • Dragonfly BSD (5.6)
  • OpenBSD (7.2)
  • NetBSD (9.0)
  • Solaris (11)

You’d need to build the mulle-clang compiler yourself. It’s very likely that OS support is good enough in the Foundation for these OS to be fully supported, but it hasn’t been tested.

Reliance on external tools in shell scripts like base64 and uuidgen had to be removed and recoded in shell script.

To support more platforms there had to be major changes in mulle-bashfunctions, which require a major version bump. I jettisoned the old bash compatibility requirements for the ancient macOS shell, where zsh should be used exclusively now. This will free me to use more actual arrays in bash.

There are now built-in man and apropos commands to quickly look up functions and function info.

cmake

The cmake support has been updated to support the more rare OSes.

Changes to the cmake files facilitate building projects in a legacy environment, where the dependencies are not local to the project but installed in a global manner (like /usr/local). DEPENDENCY_IGNORE_SYSTEM_LIBARIES is still the default, but you can turn it off, if you want:

if( DEPENDENCY_IGNORE_SYSTEM_LIBARIES)
    find_library( MULLE_DATA_LIBRARY NAMES
        ${CMAKE_STATIC_LIBRARY_PREFIX}mulle-data${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
        ${CMAKE_STATIC_LIBRARY_PREFIX}mulle-data${CMAKE_STATIC_LIBRARY_SUFFIX}
        mulle-data
        NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH
    )
else()
    find_library( MULLE_DATA_LIBRARY NAMES
        ${CMAKE_STATIC_LIBRARY_PREFIX}mulle-data${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
        ${CMAKE_STATIC_LIBRARY_PREFIX}mulle-data${CMAKE_STATIC_LIBRARY_SUFFIX}
        mulle-data
    )
endif()

Post a comment

All comments are held for moderation; basic HTML formatting accepted.

Name:
E-mail: (not published)
Website: