Fix for assertion error when expanding macro.
[iverilog.git] / macosx.txt
blob8fad41c766b80de39e4a7f74390c23cfcc1cd85e
2 This file describes the procedure to build and install Icarus Verilog
3 on Mac OS X.  I assume that you have experience with Unix and
4 Terminal.app and a basic knowledge of how to download, compile and
5 install software from source form.
7 Yasuhisa Kato wrote another set of instructions that has also been
8 known to work: <http://adwis.com/verilog/index.html>. You may try
9 those instructions instead of these, although they are essentially
10 quite similar.
12 1)  Obtain and install a libdl compatibility library.
14   If you don't already have /usr/local/lib/libdl.{a,dylib} and
15   /usr/local/include/dlfcn.h, you can obtain the source for a
16   compatibility layer from at least one of two places:
18   http://download.sourceforge.net/fink/dlcompat-20010831.tar.gz
19   http://www.omnigroup.com/~bungi/dlcompat-20010831.tar.gz
21   Unpack this tar file and read the README and Makefile.  Install the
22   library according to the instructions.  Installation in /usr/local
23   is strongly recommended since otherwise autoconf very likely won't
24   be able to find it.
26 2) Make sure you have a copy of the 'gperf' tool.  This does not come
27    with the Mac OS X 10.1 developer tools, so you probably don't.  You
28    can check with:
30      %  which gperf
32   If not found, grab a gperf source package and install it. See "GPERF
33    FOR MACOSX" below.
35   Snapshots of Icarus Verilog source now come with the
36   lexor_keyword.cc file pre-made, so if you have trouble with gperf,
37   then just make sure the distributed lexor_keyword.cc is newer then
38   lexor_keyword.gperf, and use that.
40 3) If working with a CVS snapshot, you must run autoconf in several
41    directories.  This is aided by the 'autoconf.sh' script at the
42    top of the source tree:
44    sh ./autoconf.sh
46    This will also run the gperf command, so make sure you'd completed
47    step #2 first.
49 4)  Configure, build and install the Icarus Verilog sources as normal.
51   The only change you need to make here is to use a configure command like:
53     % CC="cc -no-cpp-precomp" ./configure
55   This assumes you are using 'sh', 'zsh', or 'bash'.  If you are using
56   'csh' or 'tcsh', then you'll want something like:
58     % setenv CC "cc -no-cpp-precomp"
59     % ./configure
61   You can, of course, add other configure options.
63 6) NOTE: 'make check' will not work until after 'make install' has been run
64    since dynamically loaded code is searched for in the install location
65    rather than the build location.  The dlopen emulation library doesn't
66    support a search path option.
68    If you are worried about overwriting a working installation with a new,
69    potentially broken one, you can always configure using --prefix="/some/path",
70    and install there to make sure everything is working and then re-configure
71    with the real path you want to install at, make clean, and make install.
73 5) Done!
76 GPERF FOR MACOSX
78   Get version 2.7.2 of gperf from here:
80     <ftp://ftp.gnu.org/gnu/gperf/gperf-2.7.2.tar.gz>
82   Get a MacosX patch from here:
84     http://www.eternal.nest.or.jp/~shiro/binaries/gperf-2.7.2-macosx-patch.gz
86   Apply the patch to the gperf-2.7.2 source that you previously
87   downloaded, then follow the remaining gperf installation
88   instructions.