Skip to main content

MacPorts texlive Broken by zlib 1.2.6

It's this time of the year - zlib gets updated, and things break. I run texlive latex distribution from MacPorts, and a recent update to zlib (from 1.2.5 to 1.2.6) broke texlua. When trying to activate texlive packages,  mtxrun (executed by texlua) throws the following error:

texlua PANIC: unprotected error in call to Lua API (zlib library version does not match - header: 1.2.5, library: 1.2.6)

Thus, we have to downgrade to zlib 1.2.5. I'll presume you routinely clean your outdated ports, thus it's not a simple matter of deactivating zlib 1.2.6 and reactivating the old one. That's the price one pays on being a bit OCD with that. The root of the problem is, of course, that port clean outdated does not allow selecting packages whose replacements were installed before a certain date. You'd need that functionality to only clean up ports whose upgraded replacements have hung around for a bit to prove their worth.


First, we have to determine the ports repository revision where the port got updated. The simplest way is to go to the websvn interface for macports subversion, and look up zlib there. Thus we see that 1.2.6 came to be in rev 89487. We need a revision prior to that (89486).


It's assumed that you run bash as your shell. If you don't, simply run bash before running any of the commands below.


If don't have a private ports source tree, here's how you can create one in your home directory:

cd
mkdir -p ports/archivers
srcconf=/opt/local/etc/macports/sources.conf
newconf=~/sources.conf
echo file://$(pwd)/ports | cat /dev/stdin "$srcconf" > "$newconf"
sudo bash -c "cat $newconf > $srcconf"
rm "$newconf"

We then check out the old zlib, and reindex the tree:

cd ~/ports
svn co -r 89486 http://svn.macports.org/repository/macports/trunk/dports/archivers/zlib archivers/zlib
portindex

At that point, you're ready for the downgrade:

sudo port uninstall -f zlib
sudo port clean --all zlib
sudo port install zlib +universal

If you're not interested in a universal variant, you can skip '+universal'.

You'll want to reactivate texlive (and any related packages):

texlive=$(port installed | awk '/(texlive|texlive-[^ ]+)/ { print $1 }')
sudo port deactivate -f $texlive
sudo port activate $texlive



Comments

  1. Thanks Kuba! I have exactly the same problem and came across your post from Google. I didn't exactly follow your route, but instead I directly checked out the old zlib and replaced the new one in the tree. Probably simpler, but might forget about it next time I `port upgrade outdated`. :)

    ReplyDelete

Post a Comment

Popular posts from this blog

Both INCLUDEPATH and DEPENDPATH are usually needed in qmake .pro project files.

qmake, the build tool provided with the Qt toolkit, converts project files written in its own mini-language to platform-specific Makefiles.

This process includes adding necessary dependencies to the Makefile, so that changes in source files trigger rebuilding of the outputs that depend on said sources.

If your project is spread across directories, you'll likely add an INCLUDEPATH line to your .pro file so that the #include directives look sane -- say #include "library/foo.h" instead of #include "../library/foo.h". This can be done by adding INCLUDEPATH += "../" to the .pro project file.

This, by itself, doesn't cause the files in include directories to be treated as dependencies. This is a sane default, since you likely don't want to rebuild your whole project if a system library changes -- assuming, of course, that the library is meant to stay binary compatible between releases!

Thus, if any of your source files references a file from somewhe…

Asterisk 1.8 with SELinux on RHEL 6 / CentOS 6

Asterisk 1.8 is the current long term support (LTS) version of Asterisk. You can find it in the atrpms repository. Using atrpms requires a bit of ingenuity, since you must enable yum priorities. Here's how I've set up my yum priorities and excludes to play well with RHEL (lower priority is higher):

# /etc/yum/pluginconf.d/rhnplugin.conf
priority = 9

# files in /etc/yum/repos.d - current samba and subversion override those of RHEL
sernet-samba - 5
wandisco - 6
rhnplugin - 9
centos-base - 20, includepkgs=xfs* fftw-* glpk-* dell-firmware-repository - 30 dell-omsa-repository - 30 rpmforge-repo - 50, exclude=hdf5*
epel - 60, exclude=dahdi* atrpms - 70
I'm using a bunch of non-redhat packages, including Asterisk, recent subversion, octave, xfs tools, and Dell server management tools.

For Asterisk proper, I'm running an AGI caller id script, and a fax receiving script. The fax script uses cups to print. Those scripts require exceptions to the targeted SELinux policy. Note that the polic…

Details of Migrating Zimbra 6 to Zimbra 8

I have a small Zimbra system that needed to be migrated from 6.0 to 8.0. Generally:
You must update to 6.0.16 on the source system. The account export functionality is broken in versions prior to 6.0.15 and will fail on some accounts.Start with a fresh 8.0 install. On a small system (dozens of users), that seems like the simplest option.Keep the 6.0 system running. Use the migration wizard in 8.0's admin console (Tools & Migration -> Account Migration) to move over account records only.
Set "type of mail server" to Zimbra Collaboration Suite. Set "would you like to import mail" to No.Import from another Zimbra LDAP directory.Set the LDAP Search Base to "dc=foo,dc=com" where foo.com would be your domain. This saves work on manually moving accounts between systems.
To move account contents and filter settings between servers, you can do the following on the source server:
su - zimbra
ACCT=user@foo.com      # account to move
DEST=root@destination  # ss…