unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Gordon Steemson <gsteemso@gmail.com>
To: guile-devel@gnu.org
Subject: minor syntax issues when building Guile on older setups
Date: Wed, 21 Aug 2024 21:10:40 -0700	[thread overview]
Message-ID: <440402F8-90A6-4A97-A489-A50207508AA4@gmail.com> (raw)

I'm trying to compile a more recent Guile than 2.0.11 (the version available through my package manager) on my old Power Mac G5, and have thus far encountered two minor issues when building 3.0.10:

Firstly:  In libguile/print.h and libguile/dynstack.h, the header libguile/scm.h is included right before a typedef that elaborates upon a typedef in scm.h.  Specifically, libguile/scm.h says

> typedef struct scm_print_state scm_print_state;
> typedef struct scm_dynstack scm_t_dynstack;

then libguile/print.h says

> typedef struct scm_print_state {
>   [ 14 lines of structure members & comments ]
> } scm_print_state;

and libguile/dynstack.h says

> typedef struct scm_dynstack {
>   [ 3 lines of structure members ]
> } scm_t_dynstack;

Older GCCs are confused by this framing and mistake it for a redefinition of the type alias, which is a fatal error.  The fix is to merely define the structures, rather than making a second typedef statement out of them -- you don't need to reiterate that they're typedefs, that each is a typedef is already stated in scm.h immediately prior.  Like this...

In libguile/print.h:

> struct scm_print_state {
>   [ 14 lines of structure members & comments ]
> };

and in libguile/dynstack.h:

> struct scm_dynstack {
>   [ 3 lines of structure members ]
> };

(I'll also add here that the literal form feeds embedded in these source files make it unnecessarily fiddly to construct patches for them.  Seriously, that stopped being an unambiguously good idea 40 years ago.)

Secondly:  In libguile/posix.c, there is exactly one use of “dprintf()”.  This function does not exist on my machine, which ceased to be supported by its manufacturer before dprintf() was standardized.  I request that either a more portable alternative, or the gnulib module which makes dprintf() reliably available, be used.  (Using “fprintf()” instead seems to work here, but this occurs in an error handler and for all I know there may have been a very good reason the existing code writes specifically to a file descriptor rather than to a stream, so I'm not about to declare it an obvious change to make.)

I do not have any other issues to report on a purely mechanical "proofreading" level, but I can't really comment on whether Guile actually operates as intended because it is still bootstrapping itself after 11 continuous hours.  (Based on the list of source files in stage0/Makefile.in, I am reasonably confident it will proceed to stage one from stage zero some time in the next two or three hours.)  Is it normal for it to take this long?  I know two cores at 2 GHz is a bit slow by today's standards, but even GCC 7 builds to completion on this thing in only about 18 hours.

Gordon S.


                 reply	other threads:[~2024-08-22  4:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=440402F8-90A6-4A97-A489-A50207508AA4@gmail.com \
    --to=gsteemso@gmail.com \
    --cc=guile-devel@gnu.org \
    /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).