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