Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Version #1060

Open
3 of 7 tasks
nameloCmaS opened this issue Dec 24, 2024 · 1 comment
Open
3 of 7 tasks

macOS Version #1060

nameloCmaS opened this issue Dec 24, 2024 · 1 comment

Comments

@nameloCmaS
Copy link
Contributor

nameloCmaS commented Dec 24, 2024

Currently DLite only supports Linux and Windows.

The compatibility of Linux and macOS is close enough that it would be possible to make few changes to enable compatibility.

#221 already makes reference to this issue, but only mentions extending the Python wheel.

These changes have been largely worked through to date and will be pulled to this repository in batches to avoid a flood of new and updated code to review.

The order of Pull requests will be roughly as follows:

  • Minor tweaks Update .gitignore files #1063
  • Core code changes to enable the code to compile / changes to include macOS support where platforms checked in if-else and match-case statements. MacOS - changes to the core code to allow DLite to compile on MacOS #1064
  • CMake changes macOS CMake Updates #1077
  • Changes to the CI Tests to allow the changes to be checked. The proposal is to make the CI compile Windows and macOS on top of the Linux version already implemented. This should be under a separate issue.
  • Changes to the tests themselves. These will be appropriately grouped.
  • Documentation changes to reflect macOS support.
  • Other issues raised and bug fixes pulled which have been found during this work.

These can be under one WIP Pull request of lots of smaller ones as per the maintainer's preferences. This issue to be updated as items progress.

@jesper-friis
Copy link
Collaborator

Great that you are willing to add support for MacOS. Very appreciated, as I have no experience or access to this platform.

Splitting the PRs up in batches is a good approach. As long there are no large (so far) unused code bloats and all tests passes, I think that it is fine to take them one by one.

jesper-friis pushed a commit that referenced this issue Jan 24, 2025
…1064)

MacOS - changes to the core code to allow DLite to compile on MacOS. Pre-processor updates, lib changes, and switch changes for code handling files.

To allow compiling on MacOS, this update includes:
- Pre-processor updates.
- Switch changes for code handling files.
See #1060 for proposed changes.

Commentary per file

byteorder.h.in
- Added generated comment at top of file as a warning once processed.
- Including error in preprocessor HAVE__BYTESWAP_* (missing double underscore).
- Added MacOS equivalents of endian.h and byteswap.h plus defines to align naming of functions.

getopt.h
- Moved #ifndef _GETOPT_H_ after #include statement as original position prevented the loading of getopt.h (at least - on MacOS).

config.h.in
- Added HAVE_ defines that were set in the CMake config but unused in the codebase.
- Uncommented have statements as these were set in the CMake config.

Remaining files
- Pre-processor updates.
- Switch changes for code handling files.
- Updated doxygen comments where function name was incorrect in fileutils.c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants