tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] #include_next troubles


From: Assaf Gordon
Subject: [Tinycc-devel] #include_next troubles
Date: Sat, 12 Sep 2015 00:47:53 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

I've encountered a compilation issue related to '#include_next' when compiling GNU coreutils, when using the latest tcc from git.

Coreutils (gnulib, technically) creates a local ./lib/sys/types.h file,
which calls '#include_next <sys/types.h>', then through several other includes, the compliation fails (while it succeeds with gcc and clang).

To reproduce:

     wget http://ftpmirror.gnu.org/coreutils/coreutils-8.24.tar.xz
     tar -xf coreutils-8.24.tar.xz
     cd coreutils-8.24/
     ./configure CC=tcc
     make
     [...]
     make[2]: Entering directory '/home/miles/coreutils-8.24'
       CC       lib/copy-acl.o
     In file included from lib/copy-acl.c:22:
     In file included from lib/acl.h:24:
     In file included from ./lib/sys/types.h:28:
     In file included from lib/sys/types.h:28:
     In file included from /usr/include/x86_64-linux-gnu/sys/types.h:219:
     In file included from ./lib/sys/select.h:77:
     ./lib/sys/types.h:28: error: include file 'sys/types.h' not found
     Makefile:8830: recipe for target 'lib/copy-acl.o' failed
     make[2]: *** [lib/copy-acl.o] Error 1

To reproduce with a smaller test program (after running 'make' which generates 'lib/sys/types.h'), do:

     $ pwd
     /home/user/coreutils-8.24

     $ echo "#include <sys/param.h>"   > 1.c
     $ echo "int main() { return 0; }" >> 1.c

     $ gcc -I./lib -c -o /dev/null 1.c && echo ok
     ok
     $ clang -I./lib -c -o /dev/null 1.c && echo ok
     ok
     $ tcc -I./lib -c -o /dev/null 1.c && echo ok
     In file included from 1.c:1:
     In file included from /usr/include/x86_64-linux-gnu/sys/param.h:25:
     In file included from ./lib/sys/types.h:28:
     In file included from /usr/include/x86_64-linux-gnu/sys/types.h:219:
     In file included from ./lib/sys/select.h:77:
     ./lib/sys/types.h:28: error: include file 'sys/types.h' not found

Regards,
  - assaf



reply via email to

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