[Scons-users] CheckFunc doesn't give correct result due to "error: too few arguments to function"

Alex Fan alex.fan.q at gmail.com
Fri Jan 6 19:21:46 EST 2023


Hi, Happy New Year

Reproducer:

env = Environment()
conf = Configure(env)
conf.CheckFunc(
            'getxattr',
            header=
                '#include <sys/types.h>\n#include <sys/xattr.h>'
        )

It produces a config.log like:

...
gcc -o .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.o -c .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c
.sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c: In function 'main':
.sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c:15:3: error: too few arguments to function 'getxattr'
   15 |   getxattr();
      |   ^~~~~~~~
In file included from .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c:5:
/usr/include/sys/xattr.h:60:16: note: declared here
   60 | extern ssize_t getxattr (const char *__path, const char *__name,
      |                ^~~~~~~~
scons: Configure: no


My gcc version is gcc version 11.3.1 20221209 (Gentoo 11.3.1_p20221209 p3)

Any clue if this can be fixed?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230107/625c2995/attachment.htm>


More information about the Scons-users mailing list