Difference between revisions of "Platform Notes (Mac OS X)"
(Add specific information on configuring shared memory) |
|||
Line 39: | Line 39: | ||
To determine the current setting, see below: | To determine the current setting, see below: | ||
− | < | + | <pre> |
$ sudo sysctl -a | grep shmmax | $ sudo sysctl -a | grep shmmax | ||
kern.sysv.shmmax: 4194304 | kern.sysv.shmmax: 4194304 | ||
− | </ | + | </pre> |
In the above example, the <code>shmmax</code> value is <code>4194304</code>, and thus insufficient for proper FreeM operation. | In the above example, the <code>shmmax</code> value is <code>4194304</code>, and thus insufficient for proper FreeM operation. | ||
Line 53: | Line 53: | ||
* Copy it to <code>/Library/LaunchDaemons</code> | * Copy it to <code>/Library/LaunchDaemons</code> | ||
* Change the ownership of <code>/Library/LaunchDaemons/com.startup.sysctl.plist</code> to <code>root:wheel</code> | * Change the ownership of <code>/Library/LaunchDaemons/com.startup.sysctl.plist</code> to <code>root:wheel</code> | ||
+ | * Run <code>sudo launchctl load /Library/LaunchDaemons/com.startup.sysctl.plist</code> | ||
* Reboot | * Reboot | ||
See the following example: | See the following example: | ||
− | < | + | <pre> |
$ sudo cp scripts/com.startup.sysctl.plist /Library/LaunchDaemons/ | $ sudo cp scripts/com.startup.sysctl.plist /Library/LaunchDaemons/ | ||
$ sudo chown root:wheel /Library/LaunchDaemons/com.startup.sysctl.plist | $ sudo chown root:wheel /Library/LaunchDaemons/com.startup.sysctl.plist | ||
− | </ | + | $ sudo launchctl load /Library/LaunchDaemons/com.startup.sysctl.plist |
+ | </pre> | ||
Revision as of 07:27, 30 August 2023
Contents
Port Status
The Mac OS X port is a Tier 3 Port
The main branch will compile on macOS Monterey (12.6.8) on Intel, but the default shared memory size on this operating system is too small to accommodate the default FreeM shared memory segment size. Reducing the segment size results in the following error:
freem [FATAL]: memory allocation failure in job_init [errno 2 No such file or directory]
Verified Releases
TBD
Build Notes
In order to build FreeM on macOS, you will need to install the following:
- Apple XCode command-line tools
- Homebrew
Then, install the following with the brew package manager:
- automake
- autoconf
- gcc
- libtool
- texinfo
- texi2html
- git
Testing Details
We build the macOS port on the following hardware:
- MacBook Air (Early 2015) running macOS Monterey (12.6.8)
Required Kernel Tuning
You will need to set the kern.sysv.shmmax
sysctl parameter to at least 6000000.
To determine the current setting, see below:
$ sudo sysctl -a | grep shmmax kern.sysv.shmmax: 4194304
In the above example, the shmmax
value is 4194304
, and thus insufficient for proper FreeM operation.
See your macOS version below for instructions on modifying this value.
macOS Monterey
- Find the file
com.startup.sysctl.plist
file in thescripts
subdirectory of the FreeM distributionc - Copy it to
/Library/LaunchDaemons
- Change the ownership of
/Library/LaunchDaemons/com.startup.sysctl.plist
toroot:wheel
- Run
sudo launchctl load /Library/LaunchDaemons/com.startup.sysctl.plist
- Reboot
See the following example:
$ sudo cp scripts/com.startup.sysctl.plist /Library/LaunchDaemons/ $ sudo chown root:wheel /Library/LaunchDaemons/com.startup.sysctl.plist $ sudo launchctl load /Library/LaunchDaemons/com.startup.sysctl.plist
Starting the FreeM Daemon Automatically
Coming soon.
Port Challenges
Apple makes it extremely difficult to build traditional UNIX software, in the name of "security". Also, Apple silicon (M1 and descendants) cannot likely be supported with the current shared memory architecture.
We will most likely support only PowerPC and Intel Macs.