© 2018-2019 by Zack Smith. All rights reserved.
With MacOS, as with Windows, a great many useful free/libre open-source programs and libraries are not included with the operating system. They are missing by default, so you have to go through some effort to add them. For some people, these are essential tools and to go without them is a hardship, like going without paved roads or clean drinking water. Sure, you can probably find a paid equivalent in the App Store, but this is like arguing you can always take a toll road or buy bottled water. If installation a free program is not a large inconvenience, or a security risk, might as well.
The number of missing free/libre programs and libraries is huge and many dependencies exist. It's an ecosystem, after all.
On Windows people usually rely on Cygwin for this, which lets you select and download a huge number of precompiled binaries and takes care of dependencies quite nicely.
On the Mac people often go with Homebrew but this is owned by Github i.e. Microsoft. Not the most trustworthy source. Or there is MacPorts.
But let's question an assumption. Are binaries a good thing to download? The problem with downloading binaries is that, whether they are executables and libraries, there is always the risk that they can contain malware, such as spyware or worse. Few people take the effort to verify who it is that provided these binaries. The exact responsible person is often completely concealed. Fewer people are in a position to say whether the server hosting them was hacked and the binaries replaced with malware-infected files. But there are many bad players out there, so you should beware. They don't want you to think critically, to be skeptical, to question at all.
Just one example: The CIA once bragged that they have a presence on many iOS developers' Macs. So you have to wonder. If that is true, how did they achieve it? Which developer computers were compromised?
I assert that the wise choice of action is to never download binaries and always build from source code. Always download source code yourself from the official site, as the Gentoo Linux project does. Herein I shall describe how this can be done.
There are four situations you will encounter when building from source code:
- The software builds easily, typically with a provided configure script.
- The software builds but this requires light-to-moderate effort because it calls for a special procedure.
- The software was made for whatever reason nearly impossible to build, and no one except a paid specialist would endure the horrible experience of doing a build, because it is basically a software enema. These packages are onerous to build. (Example: TOR Browser)
- The software is incompatible with MacOS e.g. it is Linux-only, or is abandonware, or relies on incompatible libraries. (Examples: links, gnupg)
1a. Easy (using
Most software falls into the first category. Software in this category sometimes requires using an older version, because newer MacOSes break some things. The following seem build just fine using my installer usual.sh:
- libvorbis-1.3.6 # requires ogg
- fontconfig-2.8.0 # later versions do not build.
- icu (requires renaming)
Note that the above order is not strict. Certain packages rely on other packages so in some cases the above ordering reflects these dependencies but for the most part it doesn't.
The International Components for Unicode
package has to be renamed to from
icu.tar.gz for the above script to accept it.
1b. Easy (using
Lots of programs don't have a
configure script but rather use
For this purpose, a revised installer is needed,
which I call usualc.sh:
This script works for these:
- usualc.sh libzip-1.5.1
- usualc.sh glfw-3.2.1
- usualc.sh openjpeg-2.3.0
This is easy but it's sensitive to the order of compilation, which is:
Several applications require special procedures.
./configure; cd build; sudo make install
./configure --with-included-unistring --without-p11-kit)
./configure --enable-cocoa --target-list=i386-softmmu,x86_64-softmmu --audio-drv-list=coreaudio
- glib-2.58.1 (see script below)
- htop (see script below)
- MPlayer-1.3.0 -- requires an older ffmpeg e.g. 3.0, the latest code doesn't work.
- WebKit -- note, this is 19 GB when built.
To build 1.8.1:
glib is required for
qemu 3.0.0. The script to build it is in the Scripts section below.
This is needed for
wget. It requires
libunistring but after that's installed,
gnutls configure script ignores it. It requires p11-kit but this does not build on MacOS.
During the final stage of
gnutls installation, it fails because MacOS's
is incompatible with GNU
This is needed for
wget. It builds fine however wget's configure script ignores it
and ignores MacOS's built-in OpenSSL.
- TOR Browser
- rawtherapee (depends on GTK)
- db-4.4.20 -- C++ headers are the problem.
- bitcoin-0.16.2 -- relies on db.
- Dillo (relies on FLTK)
- wine -- requires 32-bit executables, which as of MacOS Mojave maybe aren't allowed.