Compiling for FreeBSD

Richard Gipps <[email protected]> Fri, 31 Mar 2017 22:08:26 +1100
Newsgroups gmane.comp.gnu.gnucap.general
Message-ID <[email protected]>
     I got the latest version [1] compiling for FreeBSD with a bit of 
fiddling and thought I would record what I did here for reference:

1. FreeBSD uses PMake rather than GNU Make. Part of the compilation 
fails with PMake. To change to GNU Make perform the following steps:

     a) Download and install GNU Make: pkg install gmake-4.2.1_1.

     b) cd /usr/bin

     c) mv make make.backup (in case you need to change back)

     d) create a symbolic link: ln -s /usr/local/bin/gmake make

1. Add the following line to gnucap\lib\test_readline.cc

     #include <stdio.h>

     I am note sure how the configure script could work on any system 
without this change as readline.h references a FILE* but does not 
include stdio.

2. run the configure script.

3. In gnucap/lib/Make2 change -ldl to -lc as on FreeBSD, libdl is part 
of libc.

4. run make



[1] gnucap-2c4f8fa128f8d9485c8258c49b397c03f362c7be.tar.gz


Richard.