Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sigwaitinfo is detected where it doesn't work #666

Open
nirgal opened this issue Aug 26, 2015 · 1 comment
Open

sigwaitinfo is detected where it doesn't work #666

nirgal opened this issue Aug 26, 2015 · 1 comment

Comments

@nirgal
Copy link
Contributor

nirgal commented Aug 26, 2015

Hi

The patch a #665 is ok. Its usage should be triggered on hurd, but it's not.
sigwaitinfo is detected there, while it should not.
This is because of an issue in configure.ac:

AC_CHECK_FUNCS(sigwaitinfo, [],  AC_CHECK_LIB(rt, sigwaitinfo, [LIBS="${LIBS} -lrt"; AC_DEFINE(HAVE_SIGWAITINFO)],[]))

The problem is that hurd is defining a stub, and that sigwaitinfo is defined in librt. But it only returns "Not implemented".

I talked to a hurd specialist and here is his answer:

Hello,

As I expected, sigwaitinfo is not implemented, and the symbol you get is
the glibc stub.  This is howver announced in
/usr/include/i386-gnu/gnu/stubs.h:

#define __stub_sigwaitinfo

and detected by autoconf, see config.log:

| #if defined __stub_sigwaitinfo || defined __stub___sigwaitinfo
| choke me
| #endif

but that's only when using AC_CHECK_FUNCS.  When using AC_CHECK_LIB, it
doesn't do this kind of check.  In a way, that's normal: AC_CHECK_LIB
is made to check for the presence of a lib, not for the presence of a
symbol (and actually sigwaitinfo is not even in librt...).  Ideally
the AC_CHECK_FUNCS macro should still be used, with a modified LIBS.

I'm quite bad at all this configure stuff. Does any one has a suggestion about how to fix that?
It seems the inner AC_CHECK_LIB should be replaced by a second call to AC_CHECK_FUNC ?

For now, I disabled rrdcached on hurd for Debian & derivatives, because the make check TESTS_STYLE="rrdcached" is launching the daemon that creates the socket and then dies. After that, the client connects and wait for an answer... that never comes. This results in the build hanging for ever on build daemons, which is Bad.

@oetiker
Copy link
Owner

oetiker commented Aug 26, 2015

so you have to compile and run a little test program to figure out if it is a fake or a real sigwaitinfo ... look at how I am testing isnan and friends ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants