GNU logs - #71752, boring messages


Message sent to bug-guile@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#71752: commit 57a889b72 breaks cross compilation of 32bit target on 64bit host
Resent-From: balducci@HIDDEN
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guile@HIDDEN
Resent-Date: Mon, 24 Jun 2024 17:25:01 +0000
Resent-Message-ID: <handler.71752.B.171924989522103 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 71752
X-GNU-PR-Package: guile
X-GNU-PR-Keywords: 
To: 71752 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guile@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.171924989522103
          (code B ref -1); Mon, 24 Jun 2024 17:25:01 +0000
Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 17:24:55 +0000
Received: from localhost ([127.0.0.1]:35197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sLnR0-0005kR-V4
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 13:24:55 -0400
Received: from lists.gnu.org ([209.51.188.17]:47382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <balducci@HIDDEN>) id 1sLnQy-0005kD-4H
 for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 13:24:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <balducci@HIDDEN>) id 1sLnQv-0002WM-AL
 for bug-guile@HIDDEN; Mon, 24 Jun 2024 13:24:49 -0400
Received: from dschgrazlin2.univ.trieste.it ([140.105.55.81]
 helo=dschgrazlin2.units.it) by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <balducci@HIDDEN>) id 1sLnQs-0006Dw-Pq
 for bug-guile@HIDDEN; Mon, 24 Jun 2024 13:24:49 -0400
Received: from dschgrazlin2.units.it (loopback [127.0.0.1])
 by dschgrazlin2.units.it (8.18.1/8.18.1) with ESMTP id 45OHOKPE031251
 for <bug-guile@HIDDEN>; Mon, 24 Jun 2024 19:24:20 +0200
From: balducci@HIDDEN
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <31249.1719249884.1@HIDDEN>
Content-Transfer-Encoding: quoted-printable
Date: Mon, 24 Jun 2024 19:24:20 +0200
Message-ID: <31250.1719249884@HIDDEN>
X-Greylist: inspected by milter-greylist-4.6.4 (dschgrazlin2.units.it
 [0.0.0.0]);
 Mon, 24 Jun 2024 19:24:20 +0200 (CEST) for IP:'127.0.0.1' DOMAIN:'loopback'
 HELO:'dschgrazlin2.units.it' FROM:'balducci@HIDDEN' RCPT:''
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4
 (dschgrazlin2.units.it [0.0.0.0]); Mon, 24 Jun 2024 19:24:20 +0200 (CEST)
Received-SPF: pass client-ip=140.105.55.81; envelope-from=balducci@HIDDEN;
 helo=dschgrazlin2.units.it
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello
commit 57a889b7282dab303c4cdc49cccbbe22f961bd1c:

    commit 57a889b7282dab303c4cdc49cccbbe22f961bd1c
    Author: Jonas Hahnfeld <hahnjo@HIDDEN>
    Date:   Thu Feb 22 22:09:42 2024 +0100

        build: Fix cross-compilation in out-of-tree-builds

        gen-scmconfig.h is generated in libguile, not $(top_builddir).

        * libguile/Makefile.am: Add '-I.' when compiling gen-scmconfig.o.

        Signed-off-by: Ludovic Court<C3><A8>s <ludo@HIDDEN>

was in response to the report quoted here:

https://lists.gnu.org/archive/html/bug-guile/2024-05/msg00006.html

(apologies for not replying inside the original mail thread: I was not
subscribed at the time)

But, paradoxically, for me it breaks cross compilation of 32 bit
target on a 64 bit native host.

After successful build/install of guile-3.0.10 for the native host
(64 bit), I run the cross build with:

  --build=3Dx86_64-unknown-linux-gnu
  --host=3Di686-unknown-linux-gnu

and get:

    ----8<----
    make[2]: Entering directory '/home/balducci/tmp/install-us-d/guile-3.0=
.10.d/guile-3.0.10/libguile'
    \
    if [ "yes" =3D "yes" ]; then \
            gcc -m32 -DHAVE_CONFIG_H  -I.. \
               -I. -c -o gen-scmconfig.o gen-scmconfig.c; \
    else \
            gcc -m32 -DHAVE_CONFIG_H   -DBUILDING_LIBGUILE=3D1 -I.. -I.. -=
I../lib -I../lib -iquote.  -I../libguile/lightening -I/home/balducci/tmp/i=
nstall-us-d/guile-3.0.10.d/guile-3.0.10  -Wall -Wmissing-prototypes -Wpoin=
ter-arith -fno-strict-aliasing -fwrapv -fvisibility=3Dhidden -I/opt/stow.d=
/versions/gc-5458/usr/include -Wno-incompatible-pointer-types  -flto -c -o=
 gen-scmconfig.o gen-scmconfig.c; \
    fi
    In file included from ../libguile/inline.h:28,
                     from ../libguile/gc.h:25,
                     from ./strings.h:25,
                     from /usr/include/string.h:462,
                     from gen-scmconfig.c:142:
    ../libguile/scm.h:30:10: fatal error: libguile/scmconfig.h: No such fi=
le or directory
       30 | #include "libguile/scmconfig.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [Makefile:4478: gen-scmconfig.o] Error 1
    make[2]: Leaving directory '/home/balducci/tmp/install-us-d/guile-3.0.=
10.d/guile-3.0.10/libguile'
    ---->8----

The reason seems to be precisely the "-I." added by the above mentioned
commit.

If I delete the "-I." directive the cross build completes successfully.

Actually, in my case, the reason why the "-I." causes the failure is the
following.

libguile/gen-scmconfig.c includes the string.h system header:
   #include <string.h>

On my system (GNU/linux) the /usr/include/string.h system header (from
glibc) includes a strings.h system header (note the s in strings.h):
   #include <strings.h>

It happens that in libguile, where gen-scmconfig.c is compiled, there
is also a strings.h header of the guile distribution (so totally
different from the system's /usr/include/strings.h): thus, the added
"-I." directive makes my /usr/include/string.h system header include
*guile's strings.h*, instead of my system's /usr/include/strings.h and
this causes the compile failure, due to the (wrong) chain of included
headers downstream, which ends up trying to include
libguile/scmconfig.h, which, obviously, isn't there yet, since it is
supposed to be created precisely by the gen-scmconfig executable. As I
could clarify, the wrong inclusion chain caused by the "-I." directive
is:

 gen-scmconfig.c
 `-- /usr/include/string.h # THIS WANTS /usr/include/strings.h
     `-- ./strings.h       # BUT GETS THIS ONE, INSTEAD
         `-- ../libguile/gc.h
             `-- ../libguile/inline.h
                 `-- ../libguile/scm.h
                     `-- ../libguile/scmconfig.h # ISN'T THERE, YET =3D> E=
RROR

According to the original post (which then triggered the above
mentioned commit) the "-I." directive was supposed to fix the
inclusion of gen-scmconfig.h, which is created in the same directory
(libguile) where gen-scmconfig.c is compiled.

BUT: gen-scmconfig.c includes gen-scmconfig.h as a *quoted*
header:
  #include "gen-scmconfig.h"
and, at least with gcc, which I use for building, quoted headers are
looked for in the same directory of the file being compiled without
the need for a "-I." directive (OTOH, the "-I." directive makes the curren=
t
directory searched for headers BEFORE the system directories, and this
causes the build failure in my case, as detailed above).

Turning the "-I." into "-iquote." or "-idirafter." (instead of
deleting it) works for me and maybe might work also for the original
poster, but I don't think is portable outside gcc...

Apologies for the long mail: I hope to have clarified the problem

thanks a lot for your valuable work

ciao
-gabriele




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: balducci@HIDDEN
Subject: bug#71752: Acknowledgement (commit 57a889b72 breaks cross
 compilation of 32bit target on 64bit host)
Message-ID: <handler.71752.B.171924989522103.ack <at> debbugs.gnu.org>
References: <31250.1719249884@HIDDEN>
X-Gnu-PR-Message: ack 71752
X-Gnu-PR-Package: guile
Reply-To: 71752 <at> debbugs.gnu.org
Date: Mon, 24 Jun 2024 17:25:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guile@HIDDEN

If you wish to submit further information on this problem, please
send it to 71752 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
71752: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71752
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Mon, 24 Jun 2024 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.