[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] openpty patch again
From: |
Gabriel Dos Reis |
Subject: |
Re: [Axiom-developer] openpty patch again |
Date: |
01 Dec 2006 01:36:15 +0100 |
address@hidden writes:
| I'm resubmitting a shorter version of a 300K patch I sent this
| morning.
I did not receive that patch...
| This time I generated the patch without the diffs for configure
| and a couple of Makefile.in files. I guess my version of configure is
| different from Gaby's, it basically changed every line in configure.
I'm using Autoconf 2.59; what is yours?
| I think I got a working build of axiom on Mac OS X 10.4 again.
Yay!
| http://www.hpcf.upr.edu/~humberto/axiom-macos-ppc-20061130.tar.gz
|
| untar this somewhere, then point AXIOM at the
| target/powerpc-apple-darwin8.8.0 directory:
|
| $ tar zxf axiom-macos-ppc-20061130.tar.gz
| $ export AXIOM=`pwd`/target/powerpc-apple-darwin8.8.0
| $ PATH=$AXIOM/bin:$PATH
| $ axiom
|
| Success!
|
| This was built from the svk mirror:
|
| $ svk info
| Checkout Path: /Users/humberto/src/axiom/build-improvements
| Depot Path: /mirror/axiom/branches/build-improvements
| Revision: 328
| Last Changed Rev.: 327
| Mirrored From: https://svn.sourceforge.net/svnroot/axiom, Rev. 327
| Copied From: /axiom/trunk/axiom, Rev. 32
| Merged From: /axiom/trunk/axiom, Rev. 32
|
| that I checked out on Tuesday. That revision builds on Mac OS X, but
| axiom won't work because sman and clef build without working pty support
| (AXIOMsys does work).
|
| I reworked Waldek's better pty patch to work with the new
| config/axiom-c-macro.h file, and to check for the proper include file
| for openpty, at least on Mac and linux. I don't know if ptys work on MS
| Windows.
I don't think they, but I may be wrong -- I'm not a Windows developer
and I approach this whole stuff with a very engrained unix mind.
In my locat tree, I've divided the C runtime support (libspad.a) into
five components:
\begin{itemize}
\item Core runtime support,
\item interface with the operating system (filesystem, etc.),
\item communication through sockets,
\item user-interface through terminals, and
\item graphics components.
\end{itemize}
Core runtime support is hash.c and halloc.
interface with OS is anything havind to do with files, directories and
the like.
sockets is sockio-c.c
terminal-based ui is clef and sman
graphics is hyperdoc and, wel, graphics.
In my local tree it is possible to enable each individual component,
so your patch fits nicely.
| The original openpty patch is:
|
| http://lists.nongnu.org/archive/html/axiom-developer/2006-11/msg00236.html
|
| My version is below.
you would have gotten brownie points if you integrated
| The procedure to build this version of axiom is not too bad. Fink still
| seems to cause problems if the build machinery can see it, so I delete
| it from the path.
we can configure-detect that and set PATH accordingly.
| One caveat is that you need latex, makeindex, and
we can ask configure to return the absolute path so that there would
be no need to symlink from somewhere else.
| maybe tex for the axiom build to succeed, so I install them from fink,
| and link them to /usr/local/bin.
|
|
| $ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin
| $ ./configure
| $ make
|
| The darn build takes like 6 hours on my dual G5 2.5 GHz Mac.
:-(
| I have some doubts about the patch, since I'm not really sure how to
| build configure, I'm not certain I did it right.
I very much appreciate your effort and patience with this.
| I don't have commit priviledges on the code base, and I don't want them
| until I'm more familiar with svn/svk, so could someone else please check
| in the patch?
Yes, I would like to work a little bit on it with you.
| Finally, this patch is against revision 326, because svk complains my
| axiom tree isn't local when I try to revise the patch against the
| current build-improvements head. I followed the svk instructions at:
|
| http://wiki.axiom-developer.org/AxiomSilverBranch
|
| but svk patch complains:
|
| $ svk patch --view pty-again
| Target not local nor mirrored, unable to view patch.
>From the top my head, I don't see what that means. I'll have to go back.
[...]
| === configure.ac.pamphlet
| ==================================================================
| --- configure.ac.pamphlet (revision 326)
| +++ configure.ac.pamphlet (patch pty-again level 1)
| @@ -676,8 +676,28 @@
| AC_CHECK_HEADER([regex.h], [], [AC_MSG_ERROR([Axiom needs <regex.h>])])
| @
|
| +\subsubsection{openpty}
|
| +[[clef]] and [[sman]] use ptys to communicate with [[AXIOMsys]]. The
| +existing code in silver doesn't work on MacOS X. We will try to build
| +with the Unix98 standard [[openpty]] function. We need to detect two
| +headers and a library. Linux has openpty defined in [[pty.h]], MacOS X
| +define it in [[util.h]]. FreeBSD is supposed to have a definition in
| +[[libutil.h]].
I like this.
| +<<headers>>=
| +AC_CHECK_HEADERS([pty.h util.h])
| +@
| +
| +On linux the openpty function is in [[libutil]]. We need to add that to
| +the list of libraries, at least for [[sman]] and [[clef]].
It would be good if you could integrate the suggestions here:
http://lists.nongnu.org/archive/html/axiom-developer/2006-11/msg00687.html
In particular, we want to distinguish between the symbol openpty
(HAVE_OPENPTY) and its declaration (HAVE_OPENPTY_DECL).
[...]
| === src/lib/openpty.c.pamphlet
| ==================================================================
| --- src/lib/openpty.c.pamphlet (revision 326)
| +++ src/lib/openpty.c.pamphlet (patch pty-again level 1)
| @@ -10,17 +10,9 @@
| \tableofcontents
| \eject
| \section{MAC OSX and BSD platform changes}
| -Since we have no other information we are adding the [[MACOSXplatform]]
variable
| -to the list everywhere we find [[LINUXplatform]]. This may not be correct but
| -we have no way to know yet. We have also added the [[BSDplatform]] variable.
| -MAC OSX is some variant of BSD. These should probably be merged but we
| -cannot yet prove that.
| -<<mac osx platform change 1>>=
| -#if defined(SUN4OS5platform) ||defined(ALPHAplatform) ||
defined(HP10platform) || defined(LINUXplatform) || defined(MACOSXplatform) ||
defined(BSDplatform)
| -@
| -<<mac osx platform change 2>>=
| -#if defined(SUNplatform) || defined(HP9platform) || defined(LINUXplatform)
|| defined(MACOSXplatform) || defined(BSDplatform)
| -@
| +We should really use autotools to check for Unix 98 pty support.
| +Before this is done below we hardcode information about each platform.
Yes.
| +
| \section{License}
| <<license>>=
| /*
| @@ -71,6 +63,11 @@
| #include <stropts.h>
| #endif
|
| +#ifdef HAVE_PTY_H
| +#include <pty.h>
| +#elifdef HAVE_UTIL_H
There is no standard C preprocessor directive #elifdef. I believe you
wanted to say
#elif defined(HAVE_UTIL_H)
Again, many thanks for your work and patience with this patch.
-- Gaby