User Tools

Site Tools


Building Unfolding tools

for OSX

  1. Use MacPort to install GCC:
    sudo port install gcc8 +universal
    #sudo port select --list gcc
    sudo port select --set gcc mp-gcc8
  2. Install OpenSSL, Bison and DOS2Unix:
    sudo port install bison
    sudo port install openssl
    sudo port install dos2unix
  3. Use OSX flags:
    cp flags_osx flags

    The changes are as follows:

    • the flag -static is replaced with -static-libstdc++ -static-libgcc in CFLAGS
    • the flags -Wl,–whole-archive and -Wl,–no-whole-archive are removed from CXXFLAGS
  4. Run make cleanall and remove all static libraries (*.a files)
  5. Run make – the relevant tool binaries will be in directories of the same names

MacPort has recently updated Bison to v3.6.2 which has a new way to detect reduce/reduce conflicts. This affects generating a parser from unflib/pn_parse_hl.y grammar – the following error is reported by Bison: reduce/reduce conflicts: 162 found, 54 expected.

A workaround is to change the number of expected reduce/reduce conflicts from 54 to 162:

sed -i'' 's/%expect-rr 54/%expect-rr 162/g' unflib/parse_hl.y
Copyright © 2014-2020