unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Steve Ellcey <sje@cup.hp.com>
Subject: Building guile on IA64 HP-UX
Date: Mon, 8 Jan 2007 16:12:23 -0800 (PST)	[thread overview]
Message-ID: <200701090012.QAA04119@hpsje.cup.hp.com> (raw)


I have been trying to build guile on IA64 HP-UX off and on and wanted to
report my latest results.  This latest attempt was done using the
snapshot at

http://www.ossau.uklinux.net/guile/guile-cvs.20061113.tar.gz

created for me by Neil Jerram.  The snapshots at

ftp://ftp.dt.e-technik.uni-dortmund.de/pub/guile/snapshots

which is where the guile home page points to are all out-of-date.  The
ToT one is dated Nov 19 and the 1.6 and 1.8 ones are from early
December.  It would be very helpful if these "nightly" snapshots could
be updated.

==============

Compiling with GCC:

As for my results, using GCC as a compiler, I had to modify
libguile/gc.c to add an include of <sys/uc_access.h> after the includes
of <sys/param.h> and <sys/pstat.h> (in the existing __hpux ifdef) in
order to get a definition of __uc_get_ar_bsp and I also changed:

	return (void *) bsp;

at the end of scm_ia64_ar_bsp to be:

	return (void *) (long) bsp;

These changes made some warnings go away and the warnings were stopping
the build because of the -Werror flag used with GCC.  With this change I
can compile libguile/gc.c but I get stopped in libguile/numbers.c due to
issues with the complex data type.

[evrst7] $ diff guile-1.9.0.old/libguile/gc.c guile-1.9.0/libguile/gc.c
1074a1075
> #  include <sys/uc_access.h>
1090c1091
<   return (void *) bsp;
---
>   return (void *) (long) bsp;


====================

Compiling with the HP C compiler 

With the HP C compiler I fail when compiling libguile/eval.c with the
error:

"/tmp/guile/guile-1.9.0/libguile/eval.c", line 3327: error #2057: this operator
is not allowed in a constant expression
          case (ISYMNUM (SCM_IM_AND)):

It looks like this is due to the SCM_UNPACK macro.  From tags.h we have:

  /*
    The 0?: constructions makes sure that the code is never executed,
    and that there is no performance hit.  However, the alternative is
    compiled, and does generate a warning when used with the wrong
    pointer type.
   */
  #define SCM_UNPACK(x) ((scm_t_bits) (0? (*(SCM*)0=(x)): x))

and the HP compiler doesn't seem to like the assignment operator in
the case statement.  The following simpler example will not compile
with the HP compiler (but will compile with GCC):

  unsigned long x;
  int foo(int i) {
        switch (i) {
                case ((unsigned long) (0 ? (x = 4) : 4)):
                default: return 0;
        }
  }

I am not sure if this is legal C or not but it does seem 'yucky' (if I
may use that technical term).  Anyway, I hope someone can fix up gc.c, I
will work on the complex datatype issues when I have a chance, I don't
know what, if anything, should be done with the SCM_UNPACK macro.

Steve Ellcey
sje@cup.hp.com


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


             reply	other threads:[~2007-01-09  0:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09  0:12 Steve Ellcey [this message]
2007-01-09 21:59 ` Building guile on IA64 HP-UX Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701090012.QAA04119@hpsje.cup.hp.com \
    --to=sje@cup.hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).