about summary refs log tree commit diff
path: root/pkgs/development/interpreters/clisp
diff options
context:
space:
mode:
authorPhilip Taron <philip.taron@gmail.com>2023-12-09 10:15:45 -0800
committerPhilip Taron <philip.taron@gmail.com>2023-12-11 16:28:32 -0800
commitbaed870448c01b07b2799401ce546ed80cc99693 (patch)
tree39ee964456dfd46d2e3aaa82babe76cc656ad5a2 /pkgs/development/interpreters/clisp
parentc23c5dae44c661c5fd1f2e1458749181d8822111 (diff)
clisp: fix build
Without this patch, the following build error occurs for me on NixOS:

```
$ nix-build -A clisp --check
<snipped>
Running phase: buildPhase
build flags: SHELL=/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash
ln -s ../src/.gdbinit .gdbinit
rm -f build-aux
ln -s ../src/build-aux build-aux
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib && make CFLAGS="-g -O2 -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -pthread -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -DDYNAMIC_MODULES  -fPIC -DPIC " top_srcdir="/build/source/src"
make[1]: Entering directory '/build/source/builddir/gllib'
 cd /build/source/src && /nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash /build/source/src/build-aux/missing automake-1.16 --gnits gllib/Makefile
/build/source/src/build-aux/missing: line 81: automake-1.16: command not found
WARNING: 'automake-1.16' is missing on your system.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
make[1]: *** [Makefile:1333: ../../src/gllib/Makefile.in] Error 127
make[1]: Leaving directory '/build/source/builddir/gllib'
make: *** [Makefile:648: gllib/libgnu.a] Error 2
```

This message was also reproduced by @2xsaiko on their NAS machine.

I don't know why this error sometimes occurs and sometimes does not.
On my Ubuntu machines, this error does not occur, and instead it does this:

```
Running phase: buildPhase
build flags: SHELL=/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash
ln -s ../src/.gdbinit .gdbinit
rm -f build-aux
ln -s ../src/build-aux build-aux
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib && make CFLAGS="-g -O2 -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -pthread -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -DDYNAMIC_MODULES  -fPIC -DPIC " top_srcdir="/build/source/src"
make[1]: Entering directory '/build/source/builddir/gllib'
make[2]: Entering directory '/build/source/builddir'
make[2]: Nothing to be done for 'am--refresh'.
make[2]: Leaving directory '/build/source/builddir'
cd .. && make  am--refresh
make[2]: Entering directory '/build/source/builddir'
make[2]: Nothing to be done for 'am--refresh'.
make[2]: Leaving directory '/build/source/builddir'
<snipped>
```

In any case, these changes work successfully on all platforms I've tested them on:

1. NixOS
2. Ubuntu 22.04
3. MacOS x86_64
4. MacOS aarch64
Diffstat (limited to 'pkgs/development/interpreters/clisp')
-rw-r--r--pkgs/development/interpreters/clisp/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix
index 127541c727ec0..0ff0f6a498169 100644
--- a/pkgs/development/interpreters/clisp/default.nix
+++ b/pkgs/development/interpreters/clisp/default.nix
@@ -58,7 +58,7 @@ stdenv.mkDerivation {
   };
 
   strictDeps = true;
-  nativeBuildInputs = lib.optionals stdenv.isDarwin [ autoconf269 automake libtool ];
+  nativeBuildInputs = [ autoconf269 automake libtool ];
   buildInputs = [libsigsegv]
   ++ lib.optional (gettext != null) gettext
   ++ lib.optional (ncurses != null) ncurses
@@ -81,6 +81,7 @@ stdenv.mkDerivation {
   postPatch = ''
     sed -e 's@9090@64237@g' -i tests/socket.tst
     sed -i 's@/bin/pwd@${coreutils}&@' src/clisp-link.in
+    sed -i 's@1\.16\.2@${automake.version}@' src/aclocal.m4
     find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i
   '';