maude-lang / Maude

Language based on Rewriting Logic
GNU General Public License v2.0
78 stars 10 forks source link

Notes for building from source on macOS #5

Closed rljacobson closed 1 year ago

rljacobson commented 1 year ago

There is not much in the way of build instructions. I took some notes during my attempt at building Maude on macOS 12.6. I thought they might be useful to other people. Would you be interested in including something similar to this in the Maude repository?

Building on macOS

A couple of old brew files exist for installing old versions of Maude with Homebrew. There does not seem to be a guide anywhere on compiling Maude from source.

Dependencies required:

Compilation Dependencies

Dependencies of the build system rather than of the project code itself. This list is not exhaustive.

Build instructions

Maude appears to use the "standard" autotools build system, which is ancient by today's standards, but if it ain't broke... The configure script is not included in the sources, but it can be generated from configure.ac, which is included. To generate it, run:

$ autoreconf --install

Then run configure:

$ ./configure

Then make. Use the flag -jN, replacing N with the number of cores your computer has. This is likely to significantly reduce the build time.

$ make -j4

If the build fails with an error about a header file not being found, it is likely due to one of the dependencies above being missing. Install the dependency, then run make again. The build will pick up where it left off.

stevenmeker commented 1 year ago

The INSTALL file now has detailed instructions from building from source for both Linux and Mac.

rljacobson commented 1 year ago

@stevenmeker On Apple Silicon, libbuddy fails to build. This issue is actually with an outdated config tool. If you replace tools/config.guess and tools/config.sub in the libbuddy source tree with the most recent versions, everything is fine.

Obviously this isn't an issue with Maude, but there doesn't seem to be an explanation anywhere else on the internet of this problem and solution. That might just be a reflection of my google fu, though.