Install from source error: "zmq-shim.c zmq-shim.c:3:10: fatal error: mit-scheme.h: No such file or directory"
Hi,
I tried following the directions for installing from source.
O/S is: Linux Mint 20.3 Una base: Ubuntu 20.04 focal
MIT Scheme installed correctly as per the first section from https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/11.2/mit-scheme-11.2-x86-64.tar.gz
For the second section I used https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz
The third section got stuck on the make step.
It produced the following output:
echo '(generate-shim "zmq" "#include <zmq.h>")' | /usr/local/bin/mit-scheme --batch-mode ;Including zmq.cdecl... done ;Generating "zmq-shim.c"... ;Warning: Unknown type: zmq_timer_fn ;... done ;Generating "zmq-const.c"... done ;Dumping "zmq-types.bin"... done cc -I/usr/local/lib/mit-scheme-x86-64 -Wall -fPIC pkg-config --cflags libzmq -o zmq-shim.o -c zmq-shim.c zmq-shim.c:3:10: fatal error: mit-scheme.h: No such file or directory 3 | #include <mit-scheme.h> | ^~~~~~~~~~~~~~ compilation terminated. make: *** [makefile:28: zmq-shim.o] Error 1
I have seen similar issues here (and it looks like they were resolved); but I still can't seem to figure out how to make this work.
I can't tell for sure what's going on (and unfortunately I'm not able to run or install MIT scheme at the moment since I upgraded to an M1 mac 😭)
It seems like it's not able to locate that mit-scheme.h header file... the best advice I have is to look at the makefile, step through the stages manually, see exactly where it goes wrong, and try to see if that tells you anything.
(I have been intending for a while to take a fresh look at this kernel and likely just rewrite it, and I should be able to do that with the next MIT Scheme release which will at least work in emulation mode on my computer.)
The file zmq-shim.c has this requirement, #include <mit-scheme.h>, on its third line. In addition to the MIT Scheme source from section 1, I see the file also at /usr/local/lib/mit-scheme-x86-64-11.2/mit-scheme.h
I assume that would be as expected?
How does the process know where to look for this and can I help it?
For me--on Debian 11--this solves the issue.
SCHEME=$(which mit-scheme)
AUXDIR=$(dirname $(find / -name mit-scheme.h))
make SCHEME=$SCHEME AUXDIR=$AUXDIR
make SCHEME=$SCHEME AUXDIR=$AUXDIR install