Bug 89286 - Binary compatibility broken: Incorrectly built binary which accesses errno, h_errno or _res directly.
Summary: Binary compatibility broken: Incorrectly built binary which accesses errno, h...
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-22 07:54 UTC by Peter Funk
Modified: 2016-11-24 14:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-22 08:05:45 UTC

Attachments (Terms of Use)

Description Peter Funk 2003-04-22 07:54:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
When trying to run binaries compiled on a rather old Linux system, 
these binaries output the following message on file descriptor
"Incorrectly built binary which accesses errno, h_errno or _res directly." 
Since some of these binaries are used as filters, this message 
obviously destroys the standard output stream. 

The vendor refuses to recompile his software, since he wants to
keep binary compatibility with older systems, since some of the
customers are refusing to upgrade their operating systems.

Is there a way to turn off this message or to redirect it to
'stderr' instead?  Setting the environment
variable "LD_ASSUME_KERNEL" to value "2.2.5" didn't help.

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

How reproducible:

Steps to Reproduce:
Obviously you need this binary product. :-(
If you have one, reproducing is simple  Even running any binary
with --help shows the messages.

Actual Results:  The string "Incorrectly built binary which accesses errno,
h_errno or _res directly." appaears on stdout before any of the programs in
question starts up.

Expected Results:  The message should not appear or at least should appear on

Additional info:

The same applications are used to run fine on Red Hat 5.2 up to and
including Red Hat 8.0, SuSE Linux 6.2 up to and including the
recently released SuSE Linux 8.2 and on Mandrake 8.2, 9.0 and 9.1.

Comment 1 Jakub Jelinek 2003-04-22 08:05:45 UTC
I mean, fixing this bug doesn't mean he suddenly looses binary compatibility.
He just needs to #include <errno.h> (for errno, or <netdb.h> for h_errno or
<resolv.h> for _res) in all source files before first use of errno (resp. h_errno
resp. _res). The standard clearly says errno can be a macro and since at least 1996
this is the case in glibc.
When the vendor fixes its software this way and recompiles against whatever glibc
he used for his current binaries, it should work just fine on RHL9 and any future
systems with --with-tls --with-__thread glibc (e.g. all systems with NPTL).

Comment 2 Patrick Melo 2003-05-15 23:55:19 UTC
I think Peter's point is still a valid description of an erroneous warning.  

1. "The standard clearly says that errno can be a macro and since at least 
1996 this is the case in glibc."  The 1995 POSIX std and the C language std do 
NOT say errno MUST be a macro.  

2. While it seems to make sense to report this error in conjunction with 
threading, is there a reason to NOT support errno as an int on an older (non 
threaded) application.  What is the reason for losing compatibility with older 
non threaded code?  Why did this become such a critical change that it 
requires a warning message.  It causes large sections of code that once ran to 
become unusable.  The 1990 spec was loosened, not discarded.  

Comment 3 Gurusamy Sarathy 2003-06-10 02:22:36 UTC
You mean want to see bug#90002 which demonstrates that there
is a binary compatibility issue with '_res'.

Comment 4 Mario Lorenz 2003-08-06 19:31:16 UTC
I regard this change to be a significant API change (yes, its now closer to the
spec, but its still an API change) which should not have happened without major
versioning updates and supplying compat-libraries.

I propose that instead of emmitting that warning, the program REFUSE TO RUN
unless some special environment variable is set.


I have just spammed our local LUG list with some 100 copies of a message because
QMail/serialmail MALFUNCTIONED by not removing already delivered email.
Recompiling the affected programs after fixing the include errno.h fixed
that problem.

Again: this API Change obviously CAN BE HARMFUL, so just letting the program run
is not that good an idea. 

Comment 5 Carlos Solis 2005-06-16 17:42:46 UTC
Try using diferent values for LD_ASSUME_KERNEL, see this


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