From: Adam
Subject: Clisp 2.38 compile woes
Date: 
Message-ID: <du7dlg$rcq$1@lust.ihug.co.nz>
My first few attempts to compile CLisp 2.38 did not go well. It seems I
cannot follow the INSTALL instructions accurately enough. 

I'm on Mandrake 10.0 Linux, and have Cmucl running, and have just removed an
older CLisp package of 2.30 or so. 

Would this list recommend I use an RPM of CLisp 2.35 or thereabouts ? 
It seems there's no RPM of 2.38 for Mdk 10.0 just now. 

Or persist with getting success from the compile ?  

All comments, references, suggestions or recommendations welcome. 
TIA. 

From: Pascal Bourguignon
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <87hd6gznav.fsf@thalassa.informatimago.com>
Adam <······@example.com> writes:

> My first few attempts to compile CLisp 2.38 did not go well. It seems I
> cannot follow the INSTALL instructions accurately enough. 
>
> I'm on Mandrake 10.0 Linux, and have Cmucl running, and have just removed an
> older CLisp package of 2.30 or so. 
>
> Would this list recommend I use an RPM of CLisp 2.35 or thereabouts ? 
> It seems there's no RPM of 2.38 for Mdk 10.0 just now. 
>
> Or persist with getting success from the compile ?  

Did you try:

cd clisp-2.38 ; ./configure --build /tmp/clisp-build  --install

?



Here is the script I use to compile clisp on linux:

#!/bin/bash
version=$(awk -F= '/PACKAGE_VERSION=/{print substr($2,2,index($2," ")-2);}' ./src/configure)
rm -rf /tmp/clisp-${version}-build/
time ./configure \
     --prefix=/usr/local/languages/clisp-${version} \
     --with-libz-prefix=/usr/local \
     $(for m in \
           zlib \
           bindings/glibc \
           clx/new-clx \
           pcre \
           rawsock \
           regexp \
           syscalls \
           wildcard \
        ; do \
        if expr match "$m" 'i18n\|regexp\|syscalls' >/dev/null;\
        then true already there ;\
        else echo -n "--with-module=$m  " ;\
        fi ; done) \
     --build /tmp/clisp-${version}-build \
     --install

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This universe shipped by weight, not volume.  Some expansion may have
occurred during shipment.
From: Adam
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <du8r3f$dk8$1@lust.ihug.co.nz>
Pascal Bourguignon wrote:

> Did you try:
> 
> cd clisp-2.38 ; ./configure --build /tmp/clisp-build  --install
> 

Yes. It compiles succesfully up to a point after which I can't follow,
[shown here].   So, either; i) it will not procede due to no libsigsegv, or
ii) it has completed but something is wrong with the install part, and it
cannot be found. 

I cannot seem to find a clisp*.* executable with 'find / '.


[ . . . ] 
gcc -g -O2 -I. -I/home/ahc/nlisp/clisp-2.38/ffcall/callback/trampoline_r
-c /home/ahc/nlisp/clisp-2.38/ffcall/callback/trampoline_r/test2.c
/bin/sh ./libtool --mode=link gcc -g -O2 -x none test2.o trampoline.lo  -o
test2
gcc -g -O2 -x none test2.o trampoline.o -o test2
./test1
Works, test1 passed.
./test2
test2 passed.
touch tests.passed.i686-pc-linux-gnu
make[1]: Leaving directory
`/tmp/clisp-build��--install/callback/trampoline_r'
gcc -g -O2 -I. -I/home/ahc/nlisp/clisp-2.38/ffcall/callback
-c /home/ahc/nlisp/clisp-2.38/ffcall/callback/minitests.c
/bin/sh ./libtool --mode=link gcc -g -O2 -x none minitests.o libcallback.la
-o minitests
gcc -g -O2 -x none minitests.o -o minitests  ./.libs/libcallback.a
./minitests > minitests.out
LC_ALL=C uniq -u < minitests.out > minitests.output.i686-pc-linux-gnu
test '!' -s minitests.output.i686-pc-linux-gnu
Configure findings:
  FFI:        yes (user requested: default)
  readline:   yes (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
  generational garbage collection and
  stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
  mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
  wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.2.tar.gz
  tar xfz libsigsegv-2.2.tar.gz
  cd libsigsegv-2.2
  ./configure --prefix=${prefix} && make && make check && make install
  cd ../..
  ./configure --with-libsigsegv-prefix=${prefix}
--build /tmp/clisp-build��--install
If you insist on building without libsigsegv, please pass
  --ignore-absence-of-libsigsegv
to this script:
  ./configure --ignore-absence-of-libsigsegv
--build /tmp/clisp-build��--install
[···@localhost clisp-2.38]$
[···@localhost clisp-2.38]$ clisp
bash: clisp: command not found
[···@localhost clisp-2.38]$
 

Should I be SU at any point ? 

Should the untarred clisp-2.38 sources be anywhere in particular before I
start ?  I have them off my Home directory at present. 

libsigsegv  I believe I have installed. Again, the source for this was
located in a directory off my Clips-2.38 source directory, off my Home
directory. [Tail of libsigsegv compile/install shown below].

The Clisp-2.38 compile still does not seem to find that libsigsegv is
around. Must I register my new libraries somehow ? (I would have thought
that the libsigsegv install would have put them somewhere where they can be
found).  

For libsigsegv I tried Installing as SU, so maybe that was wrong and the
libraries cannot be seen (without chown, chgrp) by a normal user ? 


[ . . . . ]
make[1]: Entering directory
`/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'
make[2]: Entering directory
`/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'
make[2]: Nothing to be done for `install-exec-am'.
make TARGETSTACK="install-recursive install-am install-data-am"
install-data-hook
make[3]: Entering directory
`/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'

Now use the package; you can remove it later via 'make uninstall'.

make[3]: Leaving directory `/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'
make[2]: Leaving directory `/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'
make[1]: Leaving directory `/home/ahc/nlisp/clisp-2.38/tools/libsigsegv-2.2'
[····@localhost libsigsegv-2.2]# exit
From: Pascal Bourguignon
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <873bi0hr0q.fsf@thalassa.informatimago.com>
Adam <······@example.com> writes:

> Pascal Bourguignon wrote:
>
>> Did you try:
>> 
>> cd clisp-2.38 ; ./configure --build /tmp/clisp-build  --install
>> 
>
> Yes. It compiles succesfully up to a point after which I can't follow,
> [shown here].   So, either; i) it will not procede due to no libsigsegv, or

It says so plainly:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> ./configure: libsigsegv was not detected, thus some features, such as
>   generational garbage collection and
>   stack overflow detection in interpreted Lisp code
> cannot be provided.
> Please do this:
>   mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
>   wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.2.tar.gz
>   tar xfz libsigsegv-2.2.tar.gz
>   cd libsigsegv-2.2
>   ./configure --prefix=${prefix} && make && make check && make install
>   cd ../..
>   ./configure --with-libsigsegv-prefix=${prefix}
> --build /tmp/clisp-build��--install
> If you insist on building without libsigsegv, please pass
>   --ignore-absence-of-libsigsegv
> to this script:
>   ./configure --ignore-absence-of-libsigsegv
> --build /tmp/clisp-build��--install
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


> Should I be SU at any point ? 

Not necessarily.  If you want to install to a directory you can't
write, you'll have to build under an account that can.  Otherwise,
there's no reason to use su.


> Should the untarred clisp-2.38 sources be anywhere in particular before I
> start ?  I have them off my Home directory at present. 

You can have the sources anywhere.


> libsigsegv  I believe I have installed. Again, the source for this was
> located in a directory off my Clips-2.38 source directory, off my Home
> directory. [Tail of libsigsegv compile/install shown below].
>
> The Clisp-2.38 compile still does not seem to find that libsigsegv is
> around. Must I register my new libraries somehow ? (I would have thought
> that the libsigsegv install would have put them somewhere where they can be
> found).  

Read again the output of configure: it shows explicitely how you can
tell it where libsigseg can be found, if you've not installed it in a
standard place.

You can also try: ./configure --help


> For libsigsegv I tried Installing as SU, so maybe that was wrong and the
> libraries cannot be seen (without chown, chgrp) by a normal user ? 

It's a possibility, but usually, root's umask allows reading for all.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

WARNING: This product warps space and time in its vicinity.
From: Adam
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <dub184$dut$1@lust.ihug.co.nz>
OK.  So Clisp-2.38 requires libsigsegv to be installed, otherwise other
steps to except libsigsegv are required. 

To install libsigsegv, the instructions are in its INSTALL file. 
I change to that directory, and type ./configure which runs and finishes. 

Although I do note during its first Build Tools phase, the message; 
>>>>
[ . . ]
checking dynamic linker characteristics... cat: ld.so.conf.d/*.conf: No such
file or directory GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
[ . . ]
<<<<

;installing libsigsegv,

make   runs and completes, without error, 

make check   runs and completes, saying all 4 tests passed

make install   runs but cannot write to /usr/local/lib, so I switch to SU
and run  make install - which then completes without error. A message is
reported saying 'remember to run libtool . . .'.  So I run libtool as
quoted as SU, and that finishes normally. 

libsigsegv libraries are now in /usr/local/lib/ with root permissions; 

[···@localhost libsigsegv-2.2]$ ll /usr/local/lib/libsig*
-rw-r--r--  1 root root 54698 Mar  4 15:50 /usr/local/lib/libsigsegv.a
-rwxr-xr-x  1 root root   793 Mar  4 15:50 /usr/local/lib/libsigsegv.la*

After libtool ran, the following message appeared; 
----------------------------------------------------------------------
Libraries have been installed in:
   /home/ahc/nlisp/clisp-2.38/tools/i686-pc-linux-gnu/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

so, although the libraries have turned up in /usr/local/lib/  libtool is
under the impression and reports they are still in the source directory off
my /home/ 

the quoted line, from libsigsegv make install, to use for libtool was; 
libtool --finish /home/ahc/nlisp/clisp-2.38/tools/i686-pc-linux-gnu/lib

However, I now return to Clisp-2.38; 

from the top directory of the sources, .../clisp-2.38/  I run; 

./configure    

i) I notice a reoccurance of the message; 
checking dynamic linker characteristics... cat: ld.so.conf.d/*.conf: No such
file or directory GNU/Linux ld.so

ii) ./configure reports unable to find libsigsegv; 

test2 passed.
touch tests.passed.i686-pc-linux-gnu
make[1]: Leaving directory
`/home/ahc/nlisp/clisp-2.38/src/callback/trampoline_r'
./minitests > minitests.out
LC_ALL=C uniq -u < minitests.out > minitests.output.i686-pc-linux-gnu
test '!' -s minitests.output.i686-pc-linux-gnu
Configure findings:
  FFI:        yes (user requested: default)
  readline:   yes (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
  generational garbage collection and
  stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
  mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
  wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.2.tar.gz
  tar xfz libsigsegv-2.2.tar.gz
  cd libsigsegv-2.2
  ./configure --prefix=${prefix} && make && make check && make install
  cd ../..
  ./configure --with-libsigsegv-prefix=${prefix}
If you insist on building without libsigsegv, please pass
  --ignore-absence-of-libsigsegv
to this script:
  ./configure --ignore-absence-of-libsigsegv
[···@localhost clisp-2.38]$


So, should these libraries not be owned by root ? 
Or should I rerun libtool as SU but pointed to /usr/local/lib ? 
Or does /usr/local/lib/  need ldconfig  run on them ? 


Sorry to be such a pest, Pascal. Any help very much appreciated. 

> 
> Read again the output of configure: it shows explicitely how you can
> tell it where libsigseg can be found, if you've not installed it in a
> standard place.
> 
> You can also try: ./configure --help
> 

They are in a standard place, except owned by root. 
From: Pascal Bourguignon
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <87d5h2hg8r.fsf@thalassa.informatimago.com>
Adam <······@example.com> writes:
> [...]
> libsigsegv libraries are now in /usr/local/lib/ with root permissions; 
>
> [···@localhost libsigsegv-2.2]$ ll /usr/local/lib/libsig*
> -rw-r--r--  1 root root 54698 Mar  4 15:50 /usr/local/lib/libsigsegv.a
> -rwxr-xr-x  1 root root   793 Mar  4 15:50 /usr/local/lib/libsigsegv.la*
>
> After libtool ran, the following message appeared; 
> ----------------------------------------------------------------------
> Libraries have been installed in:
>    /home/ahc/nlisp/clisp-2.38/tools/i686-pc-linux-gnu/lib
> [...]
> so, although the libraries have turned up in /usr/local/lib/  libtool is
> under the impression and reports they are still in the source directory off
> my /home/ 

Yes, this is strange.


> ./configure    
>
> i) I notice a reoccurance of the message; 
> checking dynamic linker characteristics... cat: ld.so.conf.d/*.conf: No such
> file or directory GNU/Linux ld.so

This must be a different problem.  libsigsegv is a static library (.a)
not a dynamic library (.so).  here you have a problem of configuration
with the dynamic libraries.


> ii) ./configure reports unable to find libsigsegv; 

Why doesn't it find them in /usr/local/lib?

Try: ./configure --with-libsigsegv-prefix=/usr/local


> So, should these libraries not be owned by root ? 

It doesn't matter, as long as the user who run ld can read them.


> Or should I rerun libtool as SU but pointed to /usr/local/lib ? 

I don't know.  Try it.


> Or does /usr/local/lib/  need ldconfig  run on them ? 

If you have shared libraries in /usr/local/lib, certainely.
What's in /etc/ld.so.conf ?



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa
From: Adam
Subject: Re: Clisp 2.38 compile woes
Date: 
Message-ID: <dudg54$tjg$1@lust.ihug.co.nz>
Still no luck.  I've tried pointing to /usr/local/lib in the configure
options, and tried ldconfig, but the Clisp-2.38 gets stuck at the same
place, unable to see libsigsegv.   Most strange. 

>> i) I notice a reoccurance of the message;
>> checking dynamic linker characteristics... cat: ld.so.conf.d/*.conf: No
>> such file or directory GNU/Linux ld.so
> 
> This must be a different problem.  libsigsegv is a static library (.a)
> not a dynamic library (.so).  here you have a problem of configuration
> with the dynamic libraries.

OK. It sounds and looks unrelated.  As other big programs ./configure and
make from source, perhaps it is unrelated to my current problem. 
 
>> ii) ./configure reports unable to find libsigsegv;
> 
> Why doesn't it find them in /usr/local/lib?

I don't know. They can be seen there;

[···@localhost ahc]$ ll /usr/local/lib/libsig*
-rw-r--r--  1 root root 54698 Mar  5 09:11 /usr/local/lib/libsigsegv.a
-rwxr-xr-x  1 root root   793 Mar  5 09:11 /usr/local/lib/libsigsegv.la*
 
> Try: ./configure --with-libsigsegv-prefix=/usr/local

Same message reported.  Tail of this 
./configure --with-libsigsegv-prefix=/usr/local 
shown at bottom. 

 
>> So, should these libraries not be owned by root ?
> 
> It doesn't matter, as long as the user who run ld can read them.

Yep. Well they can be seen by [usr]$, not an ownership issue. 
 
>> Or should I rerun libtool as SU but pointed to /usr/local/lib ?
> 
> I don't know.  Try it.

Tried it. Seemed benign. No change to ./configure result.
 
>> Or does /usr/local/lib/  need ldconfig  run on them ?
> 
> If you have shared libraries in /usr/local/lib, certainly.
> What's in /etc/ld.so.conf ?
 
I did ldconfig, but no change in ./configure result. 

[···@localhost clisp-2.38]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt3/lib
[···@localhost clisp-2.38]$

And no files are shown in /etc/ld.so.conf.d/ ?

[···@localhost clisp-2.38]$ ll /etc/ld.so.conf.d/
total 0

I looked for a --no-cache option for configure, because so much has happened
it would be good to clear out any intermediary artifacts. I suppose I will
try again from a new directory. 



;;; tail of ./configure --with-libsigsegv-prefix=/usr/local 

[ ... ]
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/home/ahc/nlisp/clisp-2.38/src/callback/trampoline_r'
cd vacall_r; make check
make[1]: Entering directory
`/home/ahc/nlisp/clisp-2.38/src/callback/vacall_r'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory
`/home/ahc/nlisp/clisp-2.38/src/callback/vacall_r'
cd trampoline_r; make check
make[1]: Entering directory
`/home/ahc/nlisp/clisp-2.38/src/callback/trampoline_r'
./test1
Works, test1 passed.
./test2
test2 passed.
touch tests.passed.i686-pc-linux-gnu
make[1]: Leaving directory
`/home/ahc/nlisp/clisp-2.38/src/callback/trampoline_r'
./minitests > minitests.out
LC_ALL=C uniq -u < minitests.out > minitests.output.i686-pc-linux-gnu
test '!' -s minitests.output.i686-pc-linux-gnu
Configure findings:
  FFI:        yes (user requested: default)
  readline:   yes (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
  generational garbage collection and
  stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
  mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
  wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.2.tar.gz
  tar xfz libsigsegv-2.2.tar.gz
  cd libsigsegv-2.2
  ./configure --prefix=${prefix} && make && make check && make install
  cd ../..
  ./configure --with-libsigsegv-prefix=${prefix}
--with-libsigsegv-prefix=/usr/local
If you insist on building without libsigsegv, please pass
  --ignore-absence-of-libsigsegv
to this script:
  ./configure --ignore-absence-of-libsigsegv
--with-libsigsegv-prefix=/usr/local
[···@localhost clisp-2.38]$