Tag Archives: macports

OpenSSL problem on (older?) Macs

I had a whole bunch of problems break my podcast all at once, and I’m slowly figuring them out, one by one.

One of the problems is keeping both ruby 2.7.4 and 3.0.2 from building:

Installing openssl-1.1.1l...

BUILD FAILED (Mac OS X 10.13.6 using ruby-build 20211109)

Inspect or clean up the working tree at /var/folders/2h/930zdx_d2dv8l6tg8m_kw_fh0000gn/T/ruby-build.20211114160436.20979.mnlPJV
Results logged to /var/folders/2h/930zdx_d2dv8l6tg8m_kw_fh0000gn/T/ruby-build.20211114160436.20979.log

Last 10 log lines:
        ^
clang  -I. -Iinclude -fPIC -arch x86_64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/luke/.rbenv/versions/2.7.4/openssl/ssl\"" -DENGINESDIR="\"/Users/luke/.rbenv/versions/2.7.4/openssl/lib/engines-1.1\"" -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/luke/.rbenv/versions/2.7.4/include  -MMD -MF crypto/rand/randfile.d.tmp -MT crypto/rand/randfile.o -c -o crypto/rand/randfile.o crypto/rand/randfile.c
crypto/rand/rand_unix.c:385:47: error: use of undeclared identifier 'kCCSuccess'
    if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
                                              ^
2 errors generated.
make[1]: *** [Makefile:4637: crypto/rand/rand_unix.o] Error 1

Because I’m the next thing to a Normie, I never discover a new problem. This one has been observed since September (or earlier). That post says “the OpenSSL fellows do not develop on MacOS.” Fortunately, some people do. But I have to learn how to use the workarounds.

Macports Cheatsheet

I used to use homebrew, but before that I used MacPorts. (And long, long, before that, fink.) The past year or two I’ve come back to MacPorts. But I forget what the commands are. (Honestly, I get them confused with apt, but that’s a separate problem.)

The usual thing to do is to search and then install:

  • port search whatever
  • port info whatever
  • port variants whatever
  • port install whatever +somevariant

The other thing is to update the stuff you’ve already installed

  • port -d selfupdate
  • port list outdated
  • port upgrade outdated

And sometimes get rid of the old stuff

  • port list inactive
  • port uninstall inactive

Update: I left out two important commands:

  • port list installed # what got installed
  • port list leaves # what you installed

MacPorts revisited

I’m setting up my new (old) iMac and I thought I’d give MacPorts another try. I used it since the late 2000s. (I forget why I moved from Fink to MacPorts.) For the last five (?) years or so I’ve used Homebrew, but I’ve always been uneasy about making /usr/local writable, and never convinced by the blandishments on the Homebrew site. I heard about Nix, but before I tried something really different, I thought I’d give MacPorts another look.

So far, so good. I prefer to need sudo to install software. The only real problem I’ve encountered is that the MacPorts version of Pandoc is so old it can’t read docx files. (#sad!) But Pandoc has its own installer, so I’m trying that out too.

Useful Tools

Since I’ve been setting up a new computer, I’ve had the opportunity to think about the apps I use. I don’t have time or energy to put together a comprehensive list, but here are a few of my “can’t-live-with-them” apps.

Mac Mini at Work

Chrome (and the iReader extension), Safari, and Opera. Chrome is my main browser, but sometimes I need to work in two Google accounts at the same time. Then I fire up Safari. On very rare occasions I need a third online personality; when I do, I break out Opera. I also have Firefox, of course, but I hardly ever use it.

Xee and Skim. Macs come with Preview.app, which is fine, so far as it goes. It will let you open pretty much any type of image file. But it won’t let you go through a folder full of them in a hurry. That’s where Xee comes in. A side benefit of Xee is that it won’t screw up the EXIF data in your image files. Preview.app is fine for reading (and minor editing of) PDF files, too. But the user interface gets more bizarre with each release of Mac OS X. With Lion, I officially declare it a mess, and use Skim unless there’s a compelling reason to use Preview.app.

MacVim. Some people prefer Emacs or TextMate or BareBones BBEdit or TextEdit or whatever, but they’re wrong. Vi is right. MacVim is the best Mac implementation of VIM. Having said that, TextWrangler is a pretty awesome free-as-in-beer editor from BareBones software. It almost makes me want to try out BareBones’ BBEdit. I find TextWrangler especially helpful in converting text from one format to another.

NodeBox (and its derivatives, Nodebox 2 and Nodebox for OpenGL) are “generative design” applications. I’m not sure what that means, but whatever it is, it includes being able to write small programs to draw pictures. (Think of this as the modern equivalent of the venerable pic(1) and grap(1) programming languages. See also Graphviz.)

Handbrake and VLC. Handbrake is how I make backups of my DVDs. VLC is like the DVD Player application that comes with a Mac, except VLC works and it doesn’t crash all the time. How it does captioning isn’t the prettiest, I admit. On the other hand, it not only permits you to take screen captures, it provides a feature of its own to do it. I wish VLC remembered where you quit watching a DVD, but you can’t have everything.

MacPorts. Can’t live with them. Can’t imagine life without them. Therein lies the relevant conundrum. The HomeBrew project might ultimately supplant MacPorts, but I’m nervous about its install location. I’ve tried Fink, but not lately.

MacPorts tip

I started getting messages when I tried to update my MacPorts tools. I can’t say when it started, because I don’t do it very often. (Like maybe once a month. Bad me.) But it would bomb out, telling me

Error: checksum (md5/sha1/rmd160) mismatch for port.

Then it sent me down a wrong path, suggesting it was because my ISP’s DNS was serving ads or something. But it turns out the why isn’t important, because the what to do about it was right there in the FAQ:

$ sudo port selfupdate
$ sudo port clean --dist {portname}
$ sudo port install {portname}

All I had to do was clean out the bad portfile and try again.

Bloody MacPorts

Here’s what I hate about MacPorts:

--->  Fetching xorg-bigreqsproto
--->  Verifying checksum(s) for xorg-bigreqsproto
--->  Extracting xorg-bigreqsproto
--->  Configuring xorg-bigreqsproto
--->  Building xorg-bigreqsproto
--->  Staging xorg-bigreqsproto into destroot
--->  Installing xorg-bigreqsproto @1.1.0_0
--->  Activating xorg-bigreqsproto @1.1.0_0
--->  Cleaning xorg-bigreqsproto
--->  Fetching xorg-inputproto
--->  Verifying checksum(s) for xorg-inputproto

etc.

You cannot blink without installing X11. You can’t build python 2.6 without tk, and tk requires X. In order to get a bloody scripting language, you have to install a windowing system, built in the 1980s, that’s been obsolete 10 years. Why, on God’s green earth, is anybody still using X on a Mac? Why aren’t MacPorts ports written so the default is to omit X?