Subject: [clisp-list] Compiling clisp-2.30: No rule to make target `clisp-module'

From: Pascal Bourguignon <[email-masked]>
Date: Mon Nov 25 10:04:02 2002

While compiling clisp-2.30 on Linux 2.4.10-4GB (SuSE Linux 7.3) with:

   ./configure --prefix=/local/language/clisp --with-export-syscalls  --with-threads=POSIX_THREADS `cd modules ; for m in * ; do echo --with-module=$m ; done` --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/
   cd src
   ./makemake --with-dynamic-ffi  --prefix=/local/language/clisp --with-export-syscalls --with-threads=POSIX_THREADS --with-module=bindings --with-module=clx --with-module=oracle --with-module=postgresql632 --with-module=postgresql642 --with-module=queens --with-module=regexp --with-module=wildcard --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/   > Makefile
  make config.lisp
  make clean
  make

compilation ends with this error:

CLISP="`pwd`/lisp.run -M `pwd`/lispinit.mem -B `pwd` -N `pwd`/locale -Efile UTF-8 -Eterminal UTF-8 -norc" ; cd bindings ; dots=`echo bindings/ | sed -e 's,[^/][^/]*//*,../,g'` ; make clisp-module CC="gcc" CFLAGS="-W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  -fomit-frame-pointer -Wno-sign-compare -O2 -fexpensive-optimizations -pthread -DUNICODE -DMULTITHREAD -DPOSIX_THREADS -DEXPORT_SYSCALLS -DDYNAMIC_FFI -DNO_SIGSEGV -I." INCLUDES="$dots" LISPBIBL_INCLUDES=" ${dots}lispbibl.c ${dots}fsubr.c ${dots}subr.c ${dots}pseudofun.c ${dots}constsym.c ${dots}constobj.c ${dots}unix.c ${dots}xthread.c ${dots}stdbool.h ${dots}libcharset.h" CLFLAGS="-x none" LIBS="libcharset.a libavcall.a libcallback.a -lreadline -lncurses  -ldl   -lm" RANLIB="ranlib" CLISP="$CLISP -q"
make[1]: Entering directory `/local/src/clisp-2.30/src/bindings'
make[1]: *** No rule to make target `clisp-module'.  Stop.
make[1]: Leaving directory `/local/src/clisp-2.30/src/bindings'
make: *** [bindings] Error 2

What should be done?

-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him.  -- Robert Heinlein

---

From: Sam Steingold <[email-masked]>
Date: Mon Nov 25 11:28:35 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Compiling clisp-2.30: No rule to make target `clisp-module'"
> * Sent on Mon, 25 Nov 2002 19:02:46 +0100 (CET)
> * Honorable Pascal Bourguignon <[email-masked]> writes:
>
>    ./configure --prefix=/local/language/clisp --with-export-syscalls

so far - so good.

> --with-threads=POSIX_THREADS

not supported and probably does not work at all.

> `cd modules ; for m in * ; do echo --with-module=$m ; done`

huh?!!! did you try "ls modules"?
how do you expect amiga bindings to compile on your linux box?

> --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/

fine.

> make: *** [bindings] Error 2

of course - there is no such module as "bindings"

> What should be done?

specify only the modules you will _really_ need.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Linux - find out what you've been missing while you've been rebooting Windows

---

From: Pascal Bourguignon <[email-masked]>
Date: Mon Nov 25 18:32:03 2002

> not supported and probably does not work at all.

Well, I did not expect "[highly  experimental - use at your own risk]"
to mean that it would not even compile... :-)

> [...]

Yes I did.  But I did not "ls modules/*"...

May I suggest to have a homegeneous directory structure here, and have
in the modules/ directory only module subdirectories?

Something like:

cd modules
( cd bindings ; for f in * ; do mv $f ../bindings-$f ; done ) ; rmdir bindings
( cd clx ; for f in * ; do mv $f ../clx-$f ; done ) ; rmdir clx
mv clx-clx-manual.tar.gz clx-manual.tar.gz
mv clx-new-clx/Makefile.in clx-new-clx/Makefile.in.old
sed -e 's-../../-../-g' < clx-new-clx/Makefile.in.old > clx-new-clx/Makefile.in

Or alternatively,  have a  little note somewhere  about the  fact that
modules should be found deeply.  Perhaps in configure, since I infered
(cd modules ; for f in * ; ... ) from:

         --with-module=MODULE  build with add-on MODULE
                               this requires dynamic FFI and will turn it on
                               if the FFI checks pass
-->
         --with-module=MODULE  build with add-on MODULE, name of directory,
                               or one of the mutually exclusive
                               directory/subdirectory, in ./modules/
                               This requires dynamic FFI and will turn it on
                               if the FFI checks pass

Ok, now, compiling with:

  tar zxvf /local/ftp/pub/ftp.gnu.org/gnu/clisp/source/2.30/clisp-2.30.tar.gz 
  cd clisp-2.30/ 
  ./configure --prefix=/local/language/clisp --with-export-syscalls `cd modules ; for m in bindings/linuxlibc6 clx/new-clx oracle postgresql642 queens regexp wildcard ; do echo --with-module=$m ; done` --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/  
  cd src
  ./makemake --with-dynamic-ffi  --prefix=/local/language/clisp --with-export-syscalls --with-module=bindings/linuxlibc6 --with-module=clx/new-clx --with-module=oracle --with-module=postgresql642 --with-module=queens --with-module=regexp --with-module=wildcard --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/   > Makefile
  make config.lisp
  cp ../../clisp-pjb-config.lisp config.lisp 
  make

I get this:

make[1]: Entering directory `/local/src/clisp-2.30/src/oracle'
Makefile:28: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
make[1]: Leaving directory `/local/src/clisp-2.30/src/oracle'
make: *** [oracle] Error 2

May I suggest:

    mv modules/oracle/Makefile.in modules/oracle/Makefile.in.old
    sed -e 's/^  */^/' < modules/oracle/Makefile.in.old \
    | tr '^' '\011' > modules/oracle/Makefile.in

Oracle distributions are rather chaotic.  In my 8.0.5, I have nzt.h in
network/public, not in rdbms/public.  My ociextp.h is in plsql/public.
And several libraries are missing.

To be able to compile --with-module=oracle, I need to do these patches:

cd modules/oracle
patch -p0 <<'EOF'
--- link.sh        Tue Nov 26 00:38:41 2002
+++ link.sh.pjb     Tue Nov 26 00:40:57 2002
@@ -9,7 +9,7 @@
 
 # Get additional libs for Oracle client.  This may be
 # system specific and require some tweaking.
-NEW_LIBS="oracle.o oiface.o orafns.o -L ${ORACLE_HOME}/lib -lclntsh -ldl -lpthread -lm"
+NEW_LIBS="oracle.o oiface.o orafns.o -L ${ORACLE_HOME}/lib -lclntsh -lcommon -lcore4 -lnlsrtl3 -ldl -lpthread -lm "
 
 NEW_MODULES="oracle"
 TO_LOAD="oracle"
--- Makefile.in	Mon Nov 25 22:12:07 2002
+++ Makefile.in.pjb	Mon Nov 25 22:12:45 2002
@@ -3,13 +3,9 @@
 #
 # $Id
 
-# This will come from the environment
-ORACLE_HOME = /usr/local/oracle
-
 CC = @CC@
 CFLAGS = @CFLAGS@
-
-ORA_INCLUDES = -I.. -I ${ORACLE_HOME}/rdbms/demo -I ${ORACLE_HOME}/rdbms/public
+MY_INCLUDES = -I..
 
 # CLISP = clisp
 
@@ -22,19 +18,26 @@
 DISTRIBFILES = oracle.o orafns.o oiface.o link.sh Makefile oracle.lisp
 distribdir =
 
-all : orafns.o oracle.o oiface.o
+all : check_ora_include orafns.o oracle.o oiface.o
+
+check_ora_include:
+	@if [ -z "$(ORA_INCLUDES)" ] ; then \
+		echo "Please define ORA_INCLUDES in the environment with -I options " ;\
+		echo "indicating the oracle include directories." ;\
+		exit 1 ;\
+	fi
 
 oracle.c:       oracle.lisp
 	$(CLISP) -c oracle.lisp
 
 oracle.o:       oracle.c
-	$(CC) $(CFLAGS) $(INCLUDES) $(ORA_INCLUDES) -c oracle.c
+	$(CC) $(CFLAGS) $(INCLUDES) $(MY_INCLUDES) $(ORA_INCLUDES) -c oracle.c
 
 orafns.o:       orafns.c oiface.h
-	$(CC) $(CFLAGS) $(INCLUDES) $(ORA_INCLUDES) -c orafns.c
+	$(CC) $(CFLAGS) $(INCLUDES) $(MY_INCLUDES) $(ORA_INCLUDES) -c orafns.c
 
 oiface.o:       oiface.c oiface.h
-	$(CC) $(CFLAGS) $(INCLUDES) $(ORA_INCLUDES) -c oiface.c
+	$(CC) $(CFLAGS) $(INCLUDES) $(MY_INCLUDES) $(ORA_INCLUDES) -c oiface.c
 
 # Make a module
 clisp-module : all
EOF

When I use --with-module=postgresql642  I get this error:

full/lisp.run -B . -M full/lispinit.mem -norc -q -i bindings/linuxlibc6/linux bindings/linuxlibc6/wrap clx/new-clx/clx clx/new-clx/image oracle/oracle postgresql642/postgresql regexp/regexp wildcard/wildcard -x (saveinitmem "full/lispinit.mem")
;; Loading file /local/src/clisp-2.30/src/bindings/linuxlibc6/linux.fas ...
WARNING:
(COMMON-LISP:DEFCONSTANT NGROUPS_MAX _POSIX_NGROUPS_MAX) redefines the constant NGROUPS_MAX. Its old value was 32.
;; Loaded file /local/src/clisp-2.30/src/bindings/linuxlibc6/linux.fas
;; Loading file /local/src/clisp-2.30/src/bindings/linuxlibc6/wrap.fas ...
;; Loaded file /local/src/clisp-2.30/src/bindings/linuxlibc6/wrap.fas
;; Loading file /local/src/clisp-2.30/src/clx/new-clx/clx.fas ...
;; Loaded file /local/src/clisp-2.30/src/clx/new-clx/clx.fas
;; Loading file /local/src/clisp-2.30/src/clx/new-clx/image.fas ...
;; Loaded file /local/src/clisp-2.30/src/clx/new-clx/image.fas
;; Loading file /local/src/clisp-2.30/src/oracle/oracle.fas ...
;; Loaded file /local/src/clisp-2.30/src/oracle/oracle.fas
;; Loading file /local/src/clisp-2.30/src/postgresql642/postgresql.fas ...
*** - Incomplete FFI type ConnStatusType is not allowed here.

Actually I have postgresql 7.1.3.  Perhaps that's the reason why I get
this error?

So, finally, I can compile with:

./configure --prefix=/local/language/clisp --with-export-syscalls `cd modules ; for m in bindings/linuxlibc6  clx/new-clx oracle  queens regexp wildcard ; do echo --with-module=$m ; done` --hyperspec=http://www.informatimago.com/local/lisp/HyperSpec/  

and successfully make check.

Note: latest CVS checkout does not compile, missing a lot of symbols.