all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@gnu.org>
To: 11781@debbugs.gnu.org
Subject: bug#11781: compilation failure:  `ULLONG_MAX' undeclared
Date: Tue, 26 Jun 2012 09:10:21 -0400	[thread overview]
Message-ID: <yxq4npyw75u.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <yxqy5nbz2ew.fsf@fencepost.gnu.org> (Dan Nicolaescu's message of "Mon, 25 Jun 2012 14:12:23 -0400")

Dan Nicolaescu <dann@gnu.org> writes:

> On an ancient machine (don't ask) building the trunk fails:
>
> gcc -c  -Demacs -DHAVE_CONFIG_H  -I. -I/tmp/emacs/src -I../lib -I/tmp/emacs/src/../lib   -I/usr/X11R6/include            -MMD -MF deps/sysdep.d -MP     -g -O2 /tmp/emacs/src/sysdep.c
> /tmp/emacs/src/sysdep.c: In function `time_from_jiffies':
> /tmp/emacs/src/sysdep.c:2587: `ULLONG_MAX' undeclared (first use in this function)
> /tmp/emacs/src/sysdep.c:2587: (Each undeclared identifier is reported only once
> /tmp/emacs/src/sysdep.c:2587: for each function it appears in.)
> make[1]: *** [sysdep.o] Error 1
>
>
> $ cat /etc/redhat-release 
> Red Hat Linux release 7.3 (Valhalla)
>
> $ rpm -q glibc-devel
> glibc-devel-2.2.5-44
>
> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

The compilation succeeds when using "gcc -std=c99" or "gcc -std=gnu99"

Looking at config.log, it tries to use -std=gnu99 but the test fails:

configure:6807: gcc -std=gnu99 -c -g -O2  conftest.c >&5
conftest.c:68: array size missing in `data'
conftest.c: In function `test_restrict':
conftest.c:85: parse error before `unsigned'
conftest.c:85: `i' undeclared (first use in this function)
conftest.c:85: (Each undeclared identifier is reported only once
conftest.c:85: for each function it appears in.)
conftest.c:85: parse error before `)'
conftest.c: In function `test_varargs':
conftest.c:96: parse error before `args_copy'
conftest.c:97: `args_copy' undeclared (first use in this function)
conftest.c:99: parse error before `const'
conftest.c:108: `str' undeclared (first use in this function)
conftest.c:111: `number' undeclared (first use in this function)
conftest.c:114: `fnumber' undeclared (first use in this function)
conftest.c: In function `main':
conftest.c:134: parse error before `char'
conftest.c:141: parse error before `struct'
conftest.c:143: `ia' undeclared (first use in this function)
conftest.c:144: parse error before `int'
conftest.c:144: `i' undeclared (first use in this function)
conftest.c:144: parse error before `)'
conftest.c:154: `ni' undeclared (first use in this function)
conftest.c:156: parse error before `int'
conftest.c:157: `dynamic_array' undeclared (first use in this function)
conftest.c:160: `newvar' undeclared (first use in this function)
configure:6807: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "emacs"
| #define PACKAGE_TARNAME "emacs"
| #define PACKAGE_VERSION "24.1.50"
| #define PACKAGE_STRING "emacs 24.1.50"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "emacs"
| #define VERSION "24.1.50"
| #define MAIL_USE_POP 1
| #define SYNC_INPUT 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _FILE_OFFSET_BITS 64
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
[snip]

Any idea what is going on here?






  reply	other threads:[~2012-06-26 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 18:12 bug#11781: compilation failure: `ULLONG_MAX' undeclared Dan Nicolaescu
2012-06-26 13:10 ` Dan Nicolaescu [this message]
2012-07-07  3:12 ` Paul Eggert

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

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

  git send-email \
    --in-reply-to=yxq4npyw75u.fsf@fencepost.gnu.org \
    --to=dann@gnu.org \
    --cc=11781@debbugs.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.