bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minor portability compilation error: '#include_next' problem with TCC (T


From: Assaf Gordon
Subject: Minor portability compilation error: '#include_next' problem with TCC (Tiny C Compiler)
Date: Mon, 15 Sep 2014 13:31:30 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Hello,

I've encountered a compilation error when compiling gnulib with TCC ( Tiny C 
Compiler, http://bellard.org/tcc/ ):
it seems the "#include_next" is not working properly, but "m4/include_next.m4" 
does not detect it.

Tested with TCC version 0.9.26 from the standard debian/stable package.

To reproduce:

    $ ./gnulib-tool --create-testdir --dir=test-base64 --with-tests base64
    $ cd test-base64/
    $ CC=tcc ./configure
    <...>

    $ grep include_next config.log
    configure:5447: checking whether the preprocessor supports include_next
    gl_cv_have_include_next=yes
    INCLUDE_NEXT='include_next'
    INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'

    $ make
    <...>
    make[4]: Entering directory `/tmp/gnulib/test-base64/gltests'
    source='test-base64.c' object='test-base64.o' libtool=no \
        DEPDIR=.deps depmode=icc /bin/bash ./../build-aux/depcomp \
        tcc -DHAVE_CONFIG_H -I.  -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. 
-I../gllib -I./../gllib   -g -c test-base64.c
    In file included from test-base64.c:24:
    In file included from /usr/include/stdlib.h:320:
    In file included from ../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    In file included from ./../gllib/sys/types.h:28:
    ./../gllib/sys/types.h:28: error: #include recursion too deep
    make[4]: *** [test-base64.o] Error 1
When explicitly disabling 'include_next', compilation works fine:

    $ make distclean
    $ gl_cv_have_include_next=no CC=tcc ./configure
    <...>
    $ make
    <...>

(compilation succeeds)

However, the test fails with a compiler-related error:

    $ make check
    <...>
    PASS: test-base64
    PASS: test-memchr
    PASS: test-stdbool
    PASS: test-stddef
    PASS: test-string
    PASS: test-sys_types
    PASS: test-init.sh
    PASS: test-unistd
    PASS: test-verify
    compiler didn't detect verification failure 3
    FAIL: test-verify.sh
    ====================
    1 of 10 tests failed
    ====================
    make[4]: *** [check-TESTS] Error 1
    make[4]: Leaving directory `/tmp/gnulib/test-base64/gltests'
    make[3]: *** [check-am] Error 2
    make[3]: Leaving directory `/tmp/gnulib/test-base64/gltests'
    make[2]: *** [check-recursive] Error 1
    make[2]: Leaving directory `/tmp/gnulib/test-base64/gltests'
    make[1]: *** [check] Error 2
    make[1]: Leaving directory `/tmp/gnulib/test-base64/gltests'
    make: *** [check-recursive] Error 1

Regards,
 - Assaf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]