On Tue, Sep 15, 2009 at 10:29 AM, Kostas Oikonomou <k...@research.att.com> 
wrote:
> Hello,

Hi Kostas,

   It is good to hear from you.

>
> I have successfully built Open Axiom 1.3.0 on OpenSolaris
> 2009.06 (if you are unfamiliar with OpenSolaris, see
> www.opensolaris.org).

I used to have an old machine that was running OpenSolaris, but it died about
two years ago :-(  Since then, I have not had access to an OpenSolaris box
even though I get all traffic on the OpenSolaris project.

>  I had to tweak a few things, which I
> am listing below.  I hope these changes can be incorporated
> into the next release:

Many thanks for your feedback.  I have just checked in fixes based on
your suggestions.  There remains a few issues, and I would very
much appreciate your testing the branch 1.3.x to see whether
I got things right.  Thanks in advance.


>
> 1. For my system, OpenSolaris on an HP AMD64 machine,
> configure says:
>
> checking build system type... i386-pc-solaris2.11
> checking host system type... i386-pc-solaris2.11
>
> To get configure to do the right things, e.g. define
> SUNplatform for openpty.c, I edited it to replace "solaris*"
> with "*solaris*" everywhere.

I'm a bit puzzled by this because the configure.ac file does not
contain bare "solaris*".  Rather, I based the tests on "*solaris*".
More specifically, the relevant portion of configure.ac reads:

   *solaris*)
       AC_DEFINE([SUNplatform], [], [SunOS flavour])
       ;;

>
> 2. Next I tried building with Sun's compilers, which appears
> to be possible as far as I can tell by scanning configure.

Wow!  I'm glad to hear that you can actually build OpenAxiom
with the Sun compiler. I've changed the complaint about GNU C
compiler.  See the patch below (checked in.)  I put in this check
in the very early days of the axiom.build-improvements effort because,
at the time, the assumption was that we were going to use GCL and
GCL critically depends on GNU extensions.

Now we complain about lack of GCC only if we are building OpenAxiom
with the GCL runtime.

> However,
>
> ../open-axiom-1.3.0/configure --prefix=/opt/open-axiom/1.3.0
> --with-lisp=sbcl CC=cc
>
> didn't work.  It failed with "We need a C compiler from GCC".
>
> So I switched to gcc.
>
> ../open-axiom-1.3.0/configure --prefix=/opt/open-axiom/1.3.0
> --with-lisp=sbcl CC=gcc-4.3.2
>
> This worked.
>
> 3. Let OAB = build-open-axiom.
>
> a. I edited $OAB/src/lib/openpty.c to comment out this line:
>
> #endif
>
>   /* #  error "don't know how to open a pty" */
> #endif
>
> Otherwise the compilation of openpty.c failed.  I don't
> really know if this hack is right.

Basically, OpenAxiom needs openpty.  I think Solars should have
it could you look at config.log and tell me what the configure test
found?


>
> b. Edited $OAB/src/hyper/Makefile to add $(AXIOM_X11_LDFLAGS):
>
> $(OUTLIB)/htadd$(EXEEXT): $(htadd_objects) $(htadd_DEPENDENCIES)
>        ${LINK} -o $@ $(htadd_objects) $(htadd_LDADD)
> $(AXIOM_X11_LDFLAGS)
>
> c. Edited $OAB/src/sman/Makefile: add -lnsl to LDF
>
> d. $OAB/src/graph/viewman/Makefile: add -lsocket -lm to
> AXIOM_X11_LDFLAGS
>
> e. $OAB/src/graph/viewAlone/Makefile: add -lm to
> AXIOM_X11_LDFLAGS

The configure script was already compensating for -lsocket but
I failed to propagate the right variable to the right place.  I've
fixed that.  I also added an Autoconf test for -lnsl.

>
>
> After these changes, make and make install worked.

OK.  Please, could you check out a fresh copy of the 1.3.x
branch and test whether it builds correctly, or what remains to
be fixed?  I don't have access to an opensolaris box at the moment.

I'll answer the other half of your email in a different message.

Thanks!


-- Gaby

2009-09-16  Kosta Oikonomou <k...@research.att.com>
            Gabriel Dos Reis  <g...@cs.tamu.edu>

        * configure.ac.pamphlet: Don't insist on GNU C compiler if we
        don't use GCL.  Check for nsl on Solaris boxes.
        * config/var-def.mk (oa_c_libs): New.

src/
2009-09-16  Kosta Oikonomou <k...@research.att.com>
            Gabriel Dos Reis  <g...@cs.tamu.edu>

        * graph/viewAlone/Makefile.in (viewAlone_LDADD): Include
        $(AXIOM_X11_LDFLAGS) and $(oa_c_libs).
        * graph/viewman/Makefile.in (viewman_LDADD): Likewise.
        * hyper/Makefile.in (htadd_LDADD): Likewise.
        * sman/Makefile.in (session_LDADD): Include $(oa_c_libs).
        (spadclient_LDADD): Likewise.
        (sman_LDADD): Likewise.


*** config/var-def.mk   (revision 14069)
--- config/var-def.mk   (local)
*************** c...@ccf@
*** 201,206 ****
--- 201,207 ----
  l...@ldf@ -lm
  li...@lisp@
  oa_c_runtime_extra = @LIBS@ @axiom_c_runtime_extra@ -lm
+ oa_c_libs = -lopen-axiom-core $(oa_c_runtime_extra) -lm

  axiom_use_x = @axiom_use_x@
  AXIOM_X11_CFLAGS = @X_CFLAGS@
*** configure.ac.pamphlet       (revision 14069)
--- configure.ac.pamphlet       (local)
*************** case $host in
*** 279,284 ****
--- 279,285 ----
         AC_SEARCH_LIBS([accept], [socket],
           [axiom_c_runtime_extra="-lsocket"],
           [AC_MSG_ERROR([socket library not found])])
+        AC_SEARCH_LIBS([gethostbyname], [nls])
         ;;
      *) ;;
  esac
*************** esac
*** 667,683 ****
  First of all, check for a C compiler.  As written, this test is OK
  because currently we support only native builds.  However,
   it needs to be more carefully written when we move to cross-compilation.
- OpenAxiom, in its current form, cannot be compiled with a C compiler
- other than from GNU.  We take that as a requirement.
  <<find C compiler>>=
- ## Make sure the C compiler is from GCC
- AC_PROG_CC
- if test x$GCC != xyes; then
-     AC_MSG_ERROR([We need a C compiler from GCC])
- fi
- axiom_cflags="-O2 -Wall -D_GNU_SOURCE"
- AC_SUBST(axiom_cflags)
-
  ## What is the extension of object files on this platform?
  AC_OBJEXT

--- 668,674 ----
*************** case $axiom_lisp_flavor,$target in
*** 948,953 ****
--- 939,959 ----
        ;;
  esac
  AC_SUBST(axiom_gcl_rsym_hack)
+
+
+ ## If we are using GCL as the base runtime system, then we do really need
+ # a C compiler from GNU.  Well, at least for the moment.
+ case $axiom_lisp_flavor,$GCC in
+    gcl,yes)
+        axiom_cflags="-O2 -Wall -D_GNU_SOURCE"
+        ;;
+
+    gcl,*)
+        AC_MSG_ERROR([We need a GNU C compiler])
+        ;;
+ esac
+ AC_SUBST(axiom_cflags)
+
  @

  \paragraph{Lisp system options.}  Lisp implementations greatly vary in
*** src/graph/viewAlone/Makefile.in     (revision 14069)
--- src/graph/viewAlone/Makefile.in     (local)
*************** viewAlone_SOURCES = viewAlone.c spoonCom
*** 44,50 ****

  viewAlone_objects = $(viewAlone_SOURCES:.c=.lo)

! viewAlone_LDADD = -L$(build_libdir) -lspad -lopen-axiom-core
  viewAlone_DEPENDENCIES =

  subdir = src/graph/viewAlone/
--- 44,50 ----

  viewAlone_objects = $(viewAlone_SOURCES:.c=.lo)

! viewAlone_LDADD = -L$(build_libdir) -lspad $(AXIOM_X11_LDFLAGS) $(oa_c_libs)
  viewAlone_DEPENDENCIES =

  subdir = src/graph/viewAlone/
*************** stamp: $(axiom_target_bindir)/viewAlone$
*** 68,75 ****

  $(axiom_target_bindir)/viewAlone$(EXEEXT): $(viewAlone_objects) \
                 $(viewAlone_DEPENDENCIES)
!       $(LINK) -o $@ $(viewAlone_objects) $(viewAlone_LDADD) \
!               $(AXIOM_X11_LDFLAGS)

  .PRECIOUS: %.lo

--- 68,74 ----

  $(axiom_target_bindir)/viewAlone$(EXEEXT): $(viewAlone_objects) \
                 $(viewAlone_DEPENDENCIES)
!       $(LINK) -o $@ $(viewAlone_objects) $(viewAlone_LDADD)

  .PRECIOUS: %.lo

*** src/graph/viewman/Makefile.in       (revision 14069)
--- src/graph/viewman/Makefile.in       (local)
*************** viewman_headers = $(srcdir)/viewman.h \
*** 53,59 ****


  viewman_DEPENDENCIES =
! viewman_LDFLAGS = -L$(build_libdir) -lspad -lopen-axiom-core

  subdir = src/graph/viewman/

--- 53,59 ----


  viewman_DEPENDENCIES =
! viewman_LDADD = -L$(build_libdir) -lspad $(AXIOM_X11_LDFLAGS) $(oa_c_libs)

  subdir = src/graph/viewman/

*************** stamp: $(axiom_target_libdir)/viewman$(E
*** 79,86 ****
        $(COMPILE) -o $@ $(CFLAGS) $(AXIOM_CFLAGS) $<

  $(axiom_target_libdir)/viewman$(EXEEXT): $(viewman_objects)
$(viewman_DEPENDENCIES)
!       $(LINK) -o $@ $(viewman_objects) $(viewman_LDFLAGS) \
!               $(AXIOM_X11_LDFLAGS)

  mostlyclean-local:

--- 79,85 ----
        $(COMPILE) -o $@ $(CFLAGS) $(AXIOM_CFLAGS) $<

  $(axiom_target_libdir)/viewman$(EXEEXT): $(viewman_objects)
$(viewman_DEPENDENCIES)
!       $(LINK) -o $@ $(viewman_objects) $(viewman_LDADD)

  mostlyclean-local:

*** src/hyper/Makefile.in       (revision 14069)
--- src/hyper/Makefile.in       (local)
*************** hypertex_SOURCES = addfile.c cond.c dial
*** 75,104 ****

  libspad_la = -L$(build_libdir) -lspad

- openaxiom_c_libs = -lopen-axiom-core @axiom_c_runtime_extra@ -lm
-
  hypertex_objects = $(hypertex_SOURCES:.c=.$(OBJEXT))
! hypertex_LDADD = $(libspad_la) -L$(build_libdir) $(openaxiom_c_libs)
  hypertex_DEPENDENCIES =

  htadd_SOURCES = addfile.c htadd.c lex.c
  htadd_objects = $(htadd_SOURCES:.c=.$(OBJEXT))
! htadd_LDADD = $(libspad_la) -L$(build_libdir) $(openaxiom_c_libs)
  htadd_DEPENDENCIES =

  spadbuf_SOURCES = spadbuf.c
  spadbuf_objects = $(spadbuf_SOURCES:.c=.$(OBJEXT))
! spadbuf_LDADD = $(libspad_la) -L$(build_libdir) $(openaxiom_c_libs)
  spadbuf_DEPENDENCIES =

  hthits_SOURCES = hthits.c
  hthits_objects = $(hthits_SOURCES:.c=.$(OBJEXT))
! hthits_LDADD = $(libspad_la) -L$(build_libdir) $(openaxiom_c_libs)
  hthits_DEPENDENCIES =

  ex2ht_SOURCES = ex2ht.c
  ex2ht_objects = $(ex2ht_SOURCES:.c=.$(OBJEXT))
! ex2ht_LDADD = $(libspad_la) -L$(build_libdir) $(openaxiom_c_libs)
  ex2ht_DEPENDENCIES =

  subdir = src/hyper/
--- 75,105 ----

  libspad_la = -L$(build_libdir) -lspad

  hypertex_objects = $(hypertex_SOURCES:.c=.$(OBJEXT))
! hypertex_LDADD = $(libspad_la) -L$(build_libdir) $(oa_c_libs) \
!                       $(AXIOM_X11_LDFLAGS) -lm
  hypertex_DEPENDENCIES =

  htadd_SOURCES = addfile.c htadd.c lex.c
  htadd_objects = $(htadd_SOURCES:.c=.$(OBJEXT))
! htadd_LDADD = $(libspad_la) -L$(build_libdir) $(oa_c_libs) \
!               $(AXIOM_X11_LDFLAGS) -lm
  htadd_DEPENDENCIES =

  spadbuf_SOURCES = spadbuf.c
  spadbuf_objects = $(spadbuf_SOURCES:.c=.$(OBJEXT))
! spadbuf_LDADD = $(libspad_la) -L$(build_libdir) $(oa_c_libs) \
!                       $(AXIOM_X11_LDFLAGS) -lm
  spadbuf_DEPENDENCIES =

  hthits_SOURCES = hthits.c
  hthits_objects = $(hthits_SOURCES:.c=.$(OBJEXT))
! hthits_LDADD = $(libspad_la) -L$(build_libdir) $(oa_c_libs)
  hthits_DEPENDENCIES =

  ex2ht_SOURCES = ex2ht.c
  ex2ht_objects = $(ex2ht_SOURCES:.c=.$(OBJEXT))
! ex2ht_LDADD = $(libspad_la) -L$(build_libdir) $(oa_c_libs)
  ex2ht_DEPENDENCIES =

  subdir = src/hyper/
*************** ${OUTLIB}/hthits$(EXEEXT): $(hthits_obje
*** 178,186 ****


  $(OUTLIB)/hypertex$(EXEEXT): $(hypertex_objects) $(hypertex_DEPENDENCIES)
!        ${LINK} -o $@ $(hypertex_objects) $(hypertex_LDADD) \
!               $(AXIOM_X11_LDFLAGS) -lm

  ${OUTLIB}/spadbuf$(EXEEXT): $(spadbuf_objects) $(spadbuf_DEPENDENCIES)
!       ${LINK} -o $@ $(spadbuf_objects) $(spadbuf_LDADD) \
!               $(AXIOM_X11_LDFLAGS) -lm
--- 179,185 ----


  $(OUTLIB)/hypertex$(EXEEXT): $(hypertex_objects) $(hypertex_DEPENDENCIES)
!        ${LINK} -o $@ $(hypertex_objects) $(hypertex_LDADD)

  ${OUTLIB}/spadbuf$(EXEEXT): $(spadbuf_objects) $(spadbuf_DEPENDENCIES)
!       ${LINK} -o $@ $(spadbuf_objects) $(spadbuf_LDADD)
*** src/sman/Makefile.in        (revision 14069)
--- src/sman/Makefile.in        (local)
*************** libspad_la = $(build_libdir)/libspad.$(L
*** 49,68 ****

  session_SOURCES = session.c
  session_objects = $(session_SOURCES:.c=.lo)
! session_LDADD = $(libspad_la) $(oa_c_runtime_extra) \
!               -L$(build_libdir) -lopen-axiom-core
  session_DEPENDENCIES =

  spadclient_SOURCES = spadclient.c
  spadclient_objects = $(spadclient_SOURCES:.c=.lo)
! spadclient_LDADD = $(libspad_la) $(oa_c_runtime_extra) \
!                       -L$(build_libdir) -lopen-axiom-core
  spadclient_DEPENDENCIES =

  sman_SOURCES = sman.c
  sman_objects = $(sman_SOURCES:.c=.lo) $(top_builddir)/src/driver/utils.lo
! sman_LDADD = $(libspad_la) $(oa_c_runtime_extra) \
!               -L$(build_libdir) -lopen-axiom-core
  sman_DEPENDENCIES =


--- 49,65 ----

  session_SOURCES = session.c
  session_objects = $(session_SOURCES:.c=.lo)
! session_LDADD = -L$(build_libdir) $(libspad_la) $(oa_c_libs)
  session_DEPENDENCIES =

  spadclient_SOURCES = spadclient.c
  spadclient_objects = $(spadclient_SOURCES:.c=.lo)
! spadclient_LDADD =  -L$(build_libdir) $(libspad_la)  $(oa_c_libs)
  spadclient_DEPENDENCIES =

  sman_SOURCES = sman.c
  sman_objects = $(sman_SOURCES:.c=.lo) $(top_builddir)/src/driver/utils.lo
! sman_LDADD = -L$(build_libdir) $(libspad_la) $(oa_c_libs)
  sman_DEPENDENCIES =

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to