gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: Porting to NetBSD x86


From: Magnus Henoch
Subject: [Gcl-devel] Re: Porting to NetBSD x86
Date: Sun, 19 Dec 2004 17:56:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin)

Richard M Kreuter <address@hidden> writes:

> Richard M Kreuter <address@hidden> writes:
>
>> By randomly hacking on the FreeBSD and OpenBSD defs and headers, I
>> can get part way through the build, but compiling the lisp files
>> fails at gcl_sloop.lsp, with this error message and backtrace:
>>
>> | Error: The storage for STRING is exhausted.
>> |        Currently, 30 pages are allocated.
>> |        Use ALLOCATE to expand the space.
>
> I should've googled more before sending the previous message.
> Increasing the data size with the following shell command made this
> problem go away:
>
> $ ulimit -S -d 262144

That's strange; lines 245 and onwards in o/main.c try to do the same
thing.

> There are a few other problems getting all the way through the build
> of gcl cvs on NetBSD 2.0 on x86:
>

[...]

> * NetBSD doesn't ship with ncurses, but a curses library instead.
>   This only becomes an issue when trying to build with readline
>   support.  The rl_completion_matches test in configure fails, because
>   "-lcurses" is needed.  Modifying the configure script makes this
>   problem go away, but is obviously the wrong way to do things.

This patch might be a solution:

--- configure.in        19 Dec 2004 17:31:32 +0100      
+++ configure.in        Sun Dec 19 17:31:32 2004
@@ -1316,15 +1316,20 @@
 RL_OJBS=""
 RL_LIB=""
 if test "$enable_readline" = "yes" ; then
+      CURSESLIB=""
+  AC_CHECK_LIB(ncurses, initscr,
+                              CURSESLIB="-lncurses",
+                        AC_CHECK_LIB(curses, initscr,
+                                              CURSESLIB="-lcurses"))
    AC_CHECK_HEADERS(readline/readline.h,
          AC_CHECK_LIB(readline,main,
                    AC_DEFINE(HAVE_READLINE) 
-                     TLIBS="$TLIBS -lreadline -lncurses"
+                     TLIBS="$TLIBS -lreadline $CURSESLIB"
                    RL_OBJS=gcl_readline.o
 # Readline support now initialized automatically when compiled in, this lisp
 # object no longer needed, 20040102 CM
 #                 RL_LIB=mod/gcl_readline.o
-                     ,,-lncurses))
+                     ,,$CURSESLIB))
 
 # These tests discover differences between readline 4.1 and 4.3
       AC_CHECK_LIB(readline,rl_completion_matches,
This patch tries to use ncurses, and uses curses if ncurses is not
available.  Maybe it should be the other way around.

A thought: when I hacked GCL to support OpenBSD, it turned out to be
easier to use FreeBSD.{h,defs} and add suitable conditionals, and to
add some checks to configure.in.  (OpenBSD.{h,defs} are still in a
quite bit-rotten state)  Maybe that could be useful for NetBSD as
well?

Magnus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]