Discussion:
stdint.h: #if with no expression
Tim Rühsen
2017-09-26 13:59:23 UTC
Permalink
With the latest gnulib I experience the mentioned error.

Command sequence (configure.ac, Makefile.am, ... exists):

../gnulib/gnulib-tool --import --local-dir=gl/override --lib=libgnu
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests
--avoid=wchar-tests --no-conditional-dependencies --libtool
--macro-prefix=gl --no-vc-files autobuild csharpcomp-script
csharpexec-script error fdl-1.3 gendocs getline getopt-gnu gnupload
maintainer-makefile manywarnings pmccabe2html progname update-copyright
useless-if-before-free valgrind-tests vc-list-files version-etc warnings

autoreconf -fi

./configure

make -C gl

make -C gltests

make -C gltests check

Output:

/usr/bin/make libtests.a test-alloca-opt test-binary-io test-cloexec
test-close test-dup2 test-environ test-errno test-fcntl test-fdopen
test-fgetc test-fputc test-fread test-fstat test-fwrite test-getcwd-lgpl
test-getdelim test-getdtablesize test-getline test-getopt-gnu
test-getopt-posix test-getprogname test-ignore-value test-intprops
test-inttypes test-limits-h test-lstat test-malloca test-open
test-pathmax test-setenv test-stat test-stdalign test-stdbool
test-stddef test-stdint test-stdio test-strerror test-symlink
test-sys_types test-unsetenv test-verify test-version-etc
make[3]: Entering directory '/usr/oms/src/x/gltests'
CC binary-io.o
CC fd-hook.o
CC malloca.o
CC cloexec.o
CC version-etc-fsf.o
CC fcntl.o
CC test-alloca-opt.o
CC test-binary-io.o
CC test-cloexec.o
CC test-close.o
CC test-dup2.o
CC test-environ.o
In file included from malloca.h:24:0,
from malloca.c:22:
../gl/stdint.h:89:5: error: #if with no expression
#if
^
Makefile:2021: recipe for target 'malloca.o' failed
make[3]: *** [malloca.o] Error 1

This output is unexpected.
It seems that GNULIB_OVERRIDES_WINT_T is empty, but why ?

$ grep GNULIB_OVERRIDES_WINT_T *
configure: if test $GNULIB_OVERRIDES_WINT_T = 1; then


System: Latest Debian unstable (gcc (Debian 7.2.0-7) 7.2.0)


With Best Regards, Tim

PS: the configure.ac:
AC_PREREQ(2.61)
AC_INIT([GNU Libidn], [1.34], [bug-***@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
AM_SILENT_RULES([yes])

# Library code modified: REVISION++
# Interfaces changed/added/removed: CURRENT++ REVISION=0
# Interfaces added: AGE++
# Interfaces removed: AGE=0
AC_SUBST(LT_CURRENT, 17)
AC_SUBST(LT_REVISION, 17)
AC_SUBST(LT_AGE, 6)

AC_PROG_CC
gl_EARLY
lgl_EARLY

m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([win32-dll])

# Checks for programs.
AM_MISSING_PROG(PERL, perl, $missing_dir)
AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
AM_GNU_GETTEXT(external)
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_ICONV
AM_PATH_LISPDIR

# Checks for header files.
AC_HEADER_STDC

# For gnulib stuff in gl/.
gl_INIT
lgl_INIT

# Check if locale stuff works
AM_LANGINFO_CODESET

AC_CONFIG_FILES([
Makefile
gl/Makefile
gltests/Makefile
])
AC_OUTPUT
Bruno Haible
2017-09-26 14:49:39 UTC
Permalink
Hi,
Post by Tim Rühsen
With the latest gnulib I experience the mentioned error.
../gnulib/gnulib-tool --import --local-dir=gl/override --lib=libgnu
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests
--avoid=wchar-tests --no-conditional-dependencies --libtool
--macro-prefix=gl --no-vc-files autobuild csharpcomp-script
csharpexec-script error fdl-1.3 gendocs getline getopt-gnu gnupload
maintainer-makefile manywarnings pmccabe2html progname update-copyright
useless-if-before-free valgrind-tests vc-list-files version-etc warnings
autoreconf -fi
./configure
One possible cause of the problem: You did not do "make distclean" before
"./configure".

The other possible cause: You have an old wint_t.m4 hanging around somewhere,
like the reporter in [1].

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00140.html
Tim Rühsen
2017-09-26 15:01:44 UTC
Permalink
Post by Bruno Haible
Hi,
Post by Tim Rühsen
With the latest gnulib I experience the mentioned error.
../gnulib/gnulib-tool --import --local-dir=gl/override --lib=libgnu
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests
--avoid=wchar-tests --no-conditional-dependencies --libtool
--macro-prefix=gl --no-vc-files autobuild csharpcomp-script
csharpexec-script error fdl-1.3 gendocs getline getopt-gnu gnupload
maintainer-makefile manywarnings pmccabe2html progname update-copyright
useless-if-before-free valgrind-tests vc-list-files version-etc warnings
autoreconf -fi
./configure
One possible cause of the problem: You did not do "make distclean" before
"./configure".
The directory was fresh and clean. Just Makefile.am, configure.ac and
zero-byte files for NEWS, AUTHORS, ...
Post by Bruno Haible
The other possible cause: You have an old wint_t.m4 hanging around somewhere,
like the reporter in [1].
After gnulib-tool / autoreconf -fi:
$ ls -la `find . -name wint_t.m4`

-rw-r--r-- 1 oms users 2339 Sep 26 15:36 ./gl/m4/wint_t.m4


-rw-r--r-- 1 oms users 1053 Sep 26 15:13 ./m4/wint_t.m4


So these should be the same, I guess:
$ head -2 `find . -name wint_t.m4`
==> ./m4/wint_t.m4 <==
# wint_t.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.

==> ./gl/m4/wint_t.m4 <==
# wint_t.m4 serial 7
dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.

$ ls -la /usr/share/aclocal/wint_t.m4 /usr/share/gnulib/m4/wint_t.m4
-rw-r--r-- 1 root root 1053 22-08-17 03:20:24 /usr/share/aclocal/wint_t.m4
-rw-r--r-- 1 root root 1053 03-02-14 01:48:46 /usr/share/gnulib/m4/wint_t.m4

The first is from Debian package 'gettext', the second from 'gnulib':
ii gettext 0.19.8.1-4 amd64
GNU Internationalization utilities
ii gnulib 20140202+stable-2 all
GNU Portability Library

OK, wow... quite old stuff here :-(
I'll remove that and try again tomorrow (no time today) and report back.

Thanks for your help !

With Best Regards, Tim
Tim Rühsen
2017-09-28 13:15:56 UTC
Permalink
The gettext (0.19.8.1-4) package contains pretty old m4 files.

With 'autoreconf -fi' all that old stuff is copied into m4/ though there
are newer versions from gnulib in gl/m4 and lib/gl/m4/.

Removing m4/ and later on using autoreconf without -fi does the job
(resp. doesn't copy unwanted stuff into m4/).


With Best Regards, Tim
Post by Tim Rühsen
Post by Bruno Haible
Hi,
Post by Tim Rühsen
With the latest gnulib I experience the mentioned error.
../gnulib/gnulib-tool --import --local-dir=gl/override --lib=libgnu
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests
--avoid=wchar-tests --no-conditional-dependencies --libtool
--macro-prefix=gl --no-vc-files autobuild csharpcomp-script
csharpexec-script error fdl-1.3 gendocs getline getopt-gnu gnupload
maintainer-makefile manywarnings pmccabe2html progname update-copyright
useless-if-before-free valgrind-tests vc-list-files version-etc warnings
autoreconf -fi
./configure
One possible cause of the problem: You did not do "make distclean" before
"./configure".
The directory was fresh and clean. Just Makefile.am, configure.ac and
zero-byte files for NEWS, AUTHORS, ...
Post by Bruno Haible
The other possible cause: You have an old wint_t.m4 hanging around somewhere,
like the reporter in [1].
$ ls -la `find . -name wint_t.m4`
-rw-r--r-- 1 oms users 2339 Sep 26 15:36 ./gl/m4/wint_t.m4
-rw-r--r-- 1 oms users 1053 Sep 26 15:13 ./m4/wint_t.m4
$ head -2 `find . -name wint_t.m4`
==> ./m4/wint_t.m4 <==
# wint_t.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
==> ./gl/m4/wint_t.m4 <==
# wint_t.m4 serial 7
dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
$ ls -la /usr/share/aclocal/wint_t.m4 /usr/share/gnulib/m4/wint_t.m4
-rw-r--r-- 1 root root 1053 22-08-17 03:20:24 /usr/share/aclocal/wint_t.m4
-rw-r--r-- 1 root root 1053 03-02-14 01:48:46 /usr/share/gnulib/m4/wint_t.m4
ii gettext 0.19.8.1-4 amd64
GNU Internationalization utilities
ii gnulib 20140202+stable-2 all
GNU Portability Library
OK, wow... quite old stuff here :-(
I'll remove that and try again tomorrow (no time today) and report back.
Thanks for your help !
With Best Regards, Tim
Bruno Haible
2017-09-28 14:47:28 UTC
Permalink
Post by Tim Rühsen
The gettext (0.19.8.1-4) package contains pretty old m4 files.
With 'autoreconf -fi' all that old stuff is copied into m4/ though there
are newer versions from gnulib in gl/m4 and lib/gl/m4/.
Removing m4/ and later on using autoreconf without -fi does the job
(resp. doesn't copy unwanted stuff into m4/).
And what if you keep using autoreconf, but set the environment variable
AUTOPOINT to ':', to prevent autoreconf from invoking autopoint? (And
rely on the gnulib module 'gettext-h' instead.)

Or if you stop using autoreconf entirely, and instead set up your
invocations of 'aclocal', 'autoconf', 'autoheader', 'automake' (with
appropriate options) by yourself?

Bruno

Continue reading on narkive:
Search results for 'stdint.h: #if with no expression' (Questions and Answers)
10
replies
Un C programming, what exactly is a char?
started 2016-08-02 06:51:41 UTC
programming & design
Loading...