1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
|
Prerequisites
=============
Maude requires following the tools:
GNU g++ https://gcc.gnu.org/
or
Clang https://clang.llvm.org/
C++ compiler
GNU bison https://www.gnu.org/software/bison/
Parser generator
flex https://github.com/westes/flex
Lexical analyzer generator
GNU automake https://www.gnu.org/software/automake/
Needed for aclocal
GNU autoconf https://www.gnu.org/software/autoconf/
Package configuration macros - needed for Yices2 builds
It is recommended that you use the latest versions of bison and
flex since Maude is known to tickle bugs in certain older versions.
You should use a C++ compiler that at least supports C++11.
Maude requires the following packages:
GNU libsigsegv https://www.gnu.org/software/libsigsegv/
Page fault handling library
GMP https://gmplib.org/
GNU Multiple Precision Arithmetic library; C++ bindings needed
Tecla http://www.astro.caltech.edu/~mcs/tecla/
Command line editing library
BuDDy https://github.com/utwente-fmt/buddy
Binary Decision Diagram library
Optionally, one of the following packages is needed to enable
Maude's experimental SMT features:
Yices2 https://github.com/SRI-CSL/yices2
or
CVC4 https://cvc4.github.io/
SMT Solver library
=================
Building on Linux
=================
You will need GNU g++, GNU bison, flex and GNU autoconf installed
via your distro's package manager.
Rather than build the dependencies from scratch, you might find some
or all of them available via your distro's package manager but you
will need to install the "developer" packages to get the header files.
Configuring the 3rd party packages
==================================
Decide where you are going to install them.
OPTLIB=...
libsigsegv
----------
curl -LJO https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.13.tar.gz
tar xvf libsigsegv-2.13.tar.gz
cd libsigsegv-2.13
mkdir Opt
cd Opt
../configure \
CFLAGS="-g -fno-stack-protector -O3" \
--prefix=$OPTLIB \
--enable-shared=no
make
make check
make install
GMP
---
curl -LJO https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
tar xvf gmp-6.3.0.tar.xz
cd gmp-6.3.0
mkdir Opt
cd Opt
../configure \
--prefix=$OPTLIB \
--enable-cxx \
--enable-fat \
--enable-shared=yes \
--build=x86_64-pc-linux-gnu
make
make check
make install
BuDDy
-----
curl -LJO https://github.com/utwente-fmt/buddy/releases/download/v2.4/buddy-2.4.tar.gz
tar xvf buddy-2.4.tar.gz
cd buddy-2.4
mkdir Opt
cd Opt
../configure LDFLAGS=-lm \
CFLAGS="-g -fno-stack-protector -O3" \
CXXFLAGS="-g -fno-stack-protector -O3" \
--prefix=$OPTLIB \
--disable-shared
make
make check
make install
Telca
------
Tecla does not support building in a subdirectory.
curl -LJO https://sites.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz
tar xvf libtecla-1.6.3.tar.gz
cd libtecla
./configure \
CFLAGS="-g -fno-stack-protector -O3" \
--prefix=$OPTLIB
make
make install
Yices2
------
Yices2 does not support building in a subdirectory and ships without
a configure file. Yices requires a dynamic GMP library to build, even
though we don't want dynamic libraries.
curl -LJO https://github.com/SRI-CSL/yices2/archive/refs/tags/Yices-2.6.4.tar.gz
tar xvf yices2-Yices-2.6.4.tar.gz
cd yices2-Yices-2.6.4
autoconf
./configure \
--prefix=$OPTLIB \
--with-static-gmp=$OPTLIB/lib/libgmp.a \
--with-static-gmp-include-dir=$OPTLIB/include \
CFLAGS="-g -fno-stack-protector -O3" \
LDFLAGS="-L$OPTLIB/lib" \
CPPFLAGS="-I$OPTLIB/include"
make
make check
make install
Building Maude
==============
First, hide or delete dynamic libraries that were made for 3rd party packages
to ensure only static libraries are linked against.
cd $OPTLIB/lib
mkdir Hidden
mv *.so* Hidden
In the root Maude directory, run
autoreconf -i
to generate the build scripts, unless you have downloaded the source
tarball from the release section of the repository, which already
include them. Then,
mkdir Opt
cd Opt
../configure \
--with-yices2=yes \
--with-cvc4=no \
--enable-compiler \
CXXFLAGS="-g -Wall -O3 -fno-stack-protector" \
CPPFLAGS="-I$OPTLIB/include" \
LDFLAGS="-L$OPTLIB/lib" \
GMP_LIBS="$OPTLIB/lib/libgmpxx.a $OPTLIB/lib/libgmp.a"
make
make check
cd src/Main
cp maude maude.linux64
strip maude.linux64
Check dependencies:
ldd maude.linux64
===============
Building on Mac
===============
These are the build steps I use for making a MacOS 10.13 (High Sierra)
and later, x86-64 binary using Xcode 14.2. You will also need a recent
version of bison because the bison that ships with Xcode is ancient, and
autoconf because Yices2 ships with a configure.ac but no configure.
Rather than building the dependencies from scratch, you might find some
or all of them available under a MacOS package manager such as Homebrew
(https://brew.sh/) or MacPorts (https://www.macports.org/).
Configuring the 3rd party packages
==================================
Decide where you are going to install them.
HSLIB=...
libsigsegv
----------
curl -LJO https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.13.tar.gz
tar xvf libsigsegv-2.13.tar.gz
cd libsigsegv-2.13
mkdir HighSierra
cd HighSierra
../configure \
CFLAGS="-g -fno-stack-protector -O3 -mmacosx-version-min=10.13" \
--prefix=$HSLIB \
--enable-shared=no
make
make check
make install
GMP
---
Note that 6.3.0 or later is needed for Apple silicon because of the
register x18 issue.
curl -LJO https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
tar xvf gmp-6.3.0.tar.xz
cd gmp-6.3.0
mkdir HighSierra
cd HighSierra
../configure \
CFLAGS="-g -fno-stack-protector -O3 -mmacosx-version-min=10.13" \
CXXFLAGS="-g -fno-stack-protector -O3 -mmacosx-version-min=10.13 -std=c++11" \
--prefix=$HSLIB \
--enable-cxx \
--enable-fat \
--enable-shared=yes
make
make check
make install
BuDDy
-----
BuDDy has a missing execute permission on its install script.
curl -LJO https://github.com/utwente-fmt/buddy/releases/download/v2.4/buddy-2.4.tar.gz
tar xvf buddy-2.4.tar.gz
cd buddy-2.4
mkdir HighSierra
cd HighSierra
../configure LDFLAGS=-lm \
CFLAGS="-g -fno-stack-protector -O3 -mmacosx-version-min=10.13" \
CXXFLAGS="-g -fno-stack-protector -O3 -mmacosx-version-min=10.13 -std=c++11" \
--prefix=$HSLIB \
--disable-shared
make
make check
chmod a+x ../tools/install-sh
make install
Telca
------
Tecla does not support building in a subdirectory and requires one of the
source files to be hacked in order to compile under clang.
curl -LJO https://sites.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz
tar xvf libtecla-1.6.3.tar.gz
cd libtecla
Add #include <sys/ioctl.h> as the first line of enhance.c
./configure \
CFLAGS="-fno-stack-protector -O3 -mmacosx-version-min=10.13" \
--prefix=$HSLIB
make
make install
Yices2
------
Yices2 does not support building in a subdirectory and ships without
a configure file. Yices requires a dynamic GMP library to build, even
though we don't want dynamic libraries.
curl -LJO https://github.com/SRI-CSL/yices2/archive/refs/tags/Yices-2.6.4.tar.gz
tar xvf yices2-Yices-2.6.4.tar.gz
cd yices2-Yices-2.6.4
autoconf
./configure \
--prefix=$HSLIB \
--with-static-gmp=$HSLIB/lib/libgmp.a \
--with-static-gmp-include-dir=$HSLIB/include \
CFLAGS="-fno-stack-protector -O3 -mmacosx-version-min=10.13" \
LDFLAGS="-L$HSLIB/lib" \
CPPFLAGS="-I$HSLIB/include"
make
make check
make install
Building Maude
==============
First, hide or delete dynamic libraries that were made for 3rd party packages
to ensure only static libraries are linked against.
cd $HSLIB/lib
mkdir Hidden
mv *.dylib Hidden
Then in the root Maude directory:
mkdir HighSierra
cd HighSierra
../configure \
--with-yices2=yes \
--with-cvc4=no \
--enable-compiler \
BISON="path to recent bison" \
CXXFLAGS="-Wall -O3 -fno-stack-protector -fstrict-aliasing -mmacosx-version-min=10.13 -std=c++11" \
CPPFLAGS="-I$HSLIB/include" \
LDFLAGS="-L$HSLIB/lib -Wl,-no_pie" \
GMP_LIBS="$HSLIB/lib/libgmpxx.a $HSLIB/lib/libgmp.a"
make
make check
cd src/Main
cp maude maude.darwin64
Note that stripping the binary on Macs seems to break libsigsegv for some reason.
Check dependencies:
otool -L maude.darwin64
|