Build environment for developing TeXmacs

Hi! I was thinking about trying to edit the source code of TeXmacs and contribute some slight improvements upstream, but my first problem is that I am having trouble building it. My platform is macOS 12.3 and I am using an M1 machine. It seems that the first step is to downgrade several libraries on my machine to some very old versions, and I am worried that doing so may impede my other development projects, so I was wondering if there is a preferred workflow for clean-room development (perhaps using a virtual machine).

Is anyone else having similar issues? I don’t have a lot of experience with virtualization (I left the software industry right before things like Docker became de rigueur), but maybe that is the right way for me to go.

1 Like

There are various ways around. I usually build all the needed library locally in a development directory and use them when configuring TeXmacs, without disrupting my working environment. Essentially you need Qt4 base, guile 1.8, and freetype. For freetype you can use your standard installation but Qt4 and guile 1.8 should be installed locally. Alternatively there is also a small SDK which is what we use to build our distribution. I copy here the instructions I received from Joris in order to use it, I haven’t yet tested it myself:

You can install our SDK(s) as follows:

   cd tmsdk
   curl -o tmSDK.tar
   tar -xvf tmSDK.tar
   cd SDKsrc
   ./ -5	%(for Qt 5.12, or -4 for Qt4, or -6 for Qt6 (in progress))
   ./ -a	%(or e.g. ./ -a -s10.14 -l10.14 for a specific version)

Next, download the TeXmacs sources and configure with

   ./configure --with-tmrepo=/Users/vdhoeven/tmsdk/SDK      %  (replace vdhoeven/tmsdk)

This works fine for me for Qt4 and Qt5 (both on my iMac and my Mac Mini (Qt5 only) with M1). Work is in progress for Qt6. We also build our binary packages this way (with as many libraries being linked statically as possible).

1 Like

I think tmsdk is a black box. I’d like to build GNU TeXmacs on macOS using dependencies from homebrew.

Here is the build guide maintained by me:

Might not work on M1!