bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* commit eb32c992 causes trouble on older Debian
@ 2021-04-27 11:01 Benno Schulenberg
  2021-04-27 18:28 ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Benno Schulenberg @ 2021-04-27 11:01 UTC (permalink / raw)
  To: bug-gnulib


[-- Attachment #1.1: Type: text/plain, Size: 939 bytes --]


Hi,

Commit eb32c992 from five days ago causes trouble when trying to compile
GNU nano from git on an older Debian box:

make[4]: Entering directory `/home/bens/NANO/lib'
depbase=`echo malloc/dynarray_at_failure.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I..   -I/usr/include/ncursesw     -O1 -Wall
-MT malloc/dynarray_at_failure.o -MD -MP -MF $depbase.Tpo -c -o
malloc/dynarray_at_failure.o malloc/dynarray_at_failure.c &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from ./libc-config.h:162:0,
                 from malloc/dynarray_at_failure.c:20:
./cdefs.h:496:31: fatal error: bits/long-double.h: No such file or directory
compilation terminated.

When stepping back to the preceding commit (882243dc), things compile fine.

The most recent commit (4b071c11 at the moment) still shows the problem.

$lsb_release -d
Description:	Debian GNU/Linux 7.10 (wheezy)

Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: commit eb32c992 causes trouble on older Debian
  2021-04-27 11:01 commit eb32c992 causes trouble on older Debian Benno Schulenberg
@ 2021-04-27 18:28 ` Paul Eggert
  2021-04-28  8:04   ` Benno Schulenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2021-04-27 18:28 UTC (permalink / raw)
  To: Benno Schulenberg, bug-gnulib

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

Thanks for reporting that. I installed the attached into Gnulib to try 
to work around the problem. Please give it a try (I haven't tested it on 
older Debian).

[-- Attachment #2: 0001-libc-config-fix-include-problem-on-older-Debian.patch --]
[-- Type: text/x-patch, Size: 2523 bytes --]

From 7b152eb2c2fbabce7eb7b1f789ad6feb0966bbd9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 27 Apr 2021 11:23:28 -0700
Subject: [PATCH] libc-config: fix include problem on older Debian

https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
* lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
to determine whether to include the bits/* files.
* lib/libc-config.h (__WORDSIZE): Remove.
(__GNULIB_CDEFS): New macro.
---
 ChangeLog         |  9 +++++++++
 lib/cdefs.h       |  6 +++---
 lib/libc-config.h | 10 +++-------
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bc7427cb0..a110509f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-04-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+	libc-config: fix include problem on older Debian
+	https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
+	* lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
+	to determine whether to include the bits/* files.
+	* lib/libc-config.h (__WORDSIZE): Remove.
+	(__GNULIB_CDEFS): New macro.
+
 2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
 
 	gnulib-tool: port better to current Autoconf
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 9618152ab..b883b2566 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -489,9 +489,9 @@
       [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
 #endif
 
-/* The #ifndef lets Gnulib avoid including these on non-glibc
-   platforms, where the includes typically do not exist.  */
-#ifdef __GLIBC__
+/* Gnulib avoids including these, as they don't work on non-glibc or
+   older glibc platforms.  */
+#ifndef __GNULIB_CDEFS
 # include <bits/wordsize.h>
 # include <bits/long-double.h>
 #endif
diff --git a/lib/libc-config.h b/lib/libc-config.h
index f2c86144b..fabca2fa3 100644
--- a/lib/libc-config.h
+++ b/lib/libc-config.h
@@ -80,13 +80,9 @@
 # ifndef _FEATURES_H
 #  define _FEATURES_H 1
 # endif
-/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
-   nonexistent files.  Make it a syntax error, since Gnulib does not
-   use __WORDSIZE now, and if Gnulib uses it later the syntax error
-   will let us know that __WORDSIZE needs configuring.  */
-# ifndef __WORDSIZE
-#  define __WORDSIZE %%%
-# endif
+/* Define __GNULIB_CDEFS so that <cdefs.h> does not attempt to include
+   nonexistent files.  */
+# define __GNULIB_CDEFS
 /* Undef the macros unconditionally defined by our copy of glibc
    <sys/cdefs.h>, so that they do not clash with any system-defined
    versions.  */
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: commit eb32c992 causes trouble on older Debian
  2021-04-27 18:28 ` Paul Eggert
@ 2021-04-28  8:04   ` Benno Schulenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Benno Schulenberg @ 2021-04-28  8:04 UTC (permalink / raw)
  To: Paul Eggert, bug-gnulib


[-- Attachment #1.1: Type: text/plain, Size: 282 bytes --]


Op 27-04-2021 om 20:28 schreef Paul Eggert:
> Thanks for reporting that. I installed the attached into Gnulib to try to work
> around the problem. Please give it a try (I haven't tested it on older Debian).

Confirmed.  Commit afeeb210 fixes the problem.  Thanks.

Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-28  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 11:01 commit eb32c992 causes trouble on older Debian Benno Schulenberg
2021-04-27 18:28 ` Paul Eggert
2021-04-28  8:04   ` Benno Schulenberg

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).