From: Neil Jerram <neil@ossau.uklinux.net>
To: Didier Godefroy <ldg@ulysium.net>
Cc: guile-user@gnu.org
Subject: Re: Compiling v1.8.5 on tru64 5.1b
Date: Mon, 12 May 2008 21:20:24 +0100 [thread overview]
Message-ID: <87y76fuvef.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <C44E4CD5.8E06%ldg@ulysium.net> (Didier Godefroy's message of "Mon, 12 May 2008 19:36:53 +0200")
Didier Godefroy <ldg@ulysium.net> writes:
> Hi all,
>
> Having trouble compiling guile 1.8.5 on tru64 unix v5.1b:
> cc: Error: eval.c, line 2363: In this statement, "*(SCM
> ...)0=(((SCM)((((0))<<8)+scm_tc8_isym)))" is not constant, but occurs in a
> context that requires a constant expression. (needconstexpr)
> case (ISYMNUM (SCM_IM_AND)):
Are you using a somewhat dated compiler? scm_tc8_isym is defined
like this:
enum scm_tc8_tags
{
scm_tc8_flag = scm_tc3_imm24 + 0x00, /* special objects ('flags') */
scm_tc8_char = scm_tc3_imm24 + 0x08, /* characters */
scm_tc8_isym = scm_tc3_imm24 + 0x10, /* evaluator byte codes ('isyms') */
scm_tc8_iloc = scm_tc3_imm24 + 0x18 /* evaluator byte codes ('ilocs') */
};
and scm_tc3_imm24 is:
#define scm_tc3_imm24 4
So a clever enough compiler could deduce that scm_tc8_isym actually is
a constant, and hence the whole of the expression reported above is a
constant.
A fix should be to replace the enum above (in tags.h) by:
#define scm_tc8_flag (scm_tc3_imm24 + 0x00)
#define scm_tc8_char (scm_tc3_imm24 + 0x08)
#define scm_tc8_isym (scm_tc3_imm24 + 0x10)
#define scm_tc8_iloc (scm_tc3_imm24 + 0x18)
Can you try that out and report if it works, or if you then hit other
problems? Can you also tell us about your compiler, and if there is a
C preprocessor macro that can be used to detect it dynamically?
>
> So I'm wondering, was my copying of the ltdl.h file in the root of the build
> tree an ok thing to do?
I don't think the above has anything to do with ltdl.h.
Regards,
Neil
prev parent reply other threads:[~2008-05-12 20:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-12 17:36 Compiling v1.8.5 on tru64 5.1b Didier Godefroy
2008-05-12 20:20 ` Neil Jerram [this message]
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=87y76fuvef.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=guile-user@gnu.org \
--cc=ldg@ulysium.net \
/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).