Currently FLTK uses UniformTypeIdentifiers on macos >= 11. This is done using both CMake by checking the CMAKE_SYSTEM_VERSION >= 20 for the linking and MAC_OS_X_VERSION_MAX_ALLOWED (in src/Fl_Native_File_Chooser_MAC.mm ) during the compilation.
According to the discussion here: https://github.com/fltk-rs/fltk-rs/discussions/1541 this leads to issues when targeting macos 10 via cross-compilation.
The following Dockerfile would reproduce the issue. It uses a container which installs the osxcross toolchain:
FROM juanplopes/crossbuild
RUN git clone https://github.com/fltk/fltk --depth=1
ENV CROSS_TRIPLE=x86_64-apple-darwin
WORKDIR /workdir/fltk
ENV MACOSX_DEPLOYMENT_TARGET="10.9.0"
RUN crossbuild cmake -Bbin -DFLTK_BUILD_GL=OFF -DCMAKE_SYSTEM_NAME="Darwin" -DCMAKE_SYSTEM_VERSION="19.0.0"
RUN crossbuild cmake --build bin --parallel
removing the CMAKE_SYSTEM_VERSION breaks the build because CMake/setup.cmake relies on it being set. Using CMAKE_SYSTEM_VERSION 19 would cause a linker error. I haven't tried targeting macos 10 using an actual macos system, so I can't tell if this would also cause a build error there.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.