Bug 97169 - Dummy 'chflags' function causes failures for autoconf scripts
Dummy 'chflags' function causes failures for autoconf scripts
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: glibc (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-11 00:28 EDT by Valdis Kletnieks
Modified: 2016-11-24 09:59 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.3.2-51
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-17 12:44:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Valdis Kletnieks 2003-06-11 00:28:20 EDT
Description of problem:
The dummy 'chflags' function in glibc causes issues for autoconf configure
scripts, which treat the fact that there is a chflags() function present as
meaning that there is a usable chflags() function present.  Searching the
glibc-hackers mailing list, this seems to be related to some check-abi work
done a while ago (see
http://sources.redhat.com/ml/libc-hacker/2003-03/msg00052.html  for an example)
A "consistent" ABI is all fine and good, but this doesn't seem to be the way to
get there.

Version-Release number of selected component (if applicable):
glibc-2.3.2-48

How reproducible:
Compile cample program, see that there is no error.

Steps to Reproduce:
1.
2.
3.
    
Actual results:
Program links, causing './configure' to assume there is a usable chflags,
causing later compile errors because there's no actual support for it.
In particular, there's no UF_IMMUTABLE to be found in /usr/include....

Expected results:
A link error, so configure doesn't assume software is present.

Additional info:
A stripped-down version of a standard autoconf-generated test:
AC_CHECK_FUNCS(chflags)

[~]2 cat test-chflag.c
char chflags(); /* actual proto doesn't matter */

char (*f) () = chflags;

int main() {

  return f != chflags;
;
 return 0;
}
[~]2 gcc -o test-chflag test-chflag.c
/tmp/cclUXrNr.o(.text+0x16): In function `main':
: warning: chflags is not implemented and will always fail
[~]2 echo $?
0

so configure then defines HAVE_CHFLAGS and all sorts of hilarity ensues
when code that's inside a #ifdef HAVE_CHFLAGS gets compiled.
Comment 1 Jakub Jelinek 2003-06-17 12:44:31 EDT
dummy chflags is in glibc for years. The problem is that <gnu/stubs.h> header
was empty because of Makefile dependency rewrite.

Note You need to log in before you can comment on or make changes to this bug.