MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 17 1999 11:48am
Subject:Re: glibc2 bug ???
View as plain text  
>>>>> "Michael" == Michael Hall <mhall@stripped> writes:

Michael> On Wed, Mar 17, 1999 at 04:10:06AM +0200, Michael Widenius wrote:
>> >>>>> "Phil" == Phil Wilshire <philwil@stripped>
> writes:
Phil> Hi,
Phil> I have tried to compile under a new RedHet release.
Phil> I have got a compile error and the following note from Redhat...
Phil> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Phil> Phil Wilshire wrote:
>> >> 
>> >> hi,
>> >> I get the following compile fail with Mysql on 5.8.6
>> >> 
>> >> (cd .libs && ln -s ../
>> >> c++ -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I..
>> >> -O   -fno-implicit-templates -DDBUG_OFF -D_FILE_OFFSET_BITS=64 -c
>> >>
>> >> In file included from /usr/include/termios.h:40,
>> >> from /usr/include/termcap.h:22,
>> >> from
>> >> /usr/include/bits/termios.h:28: warning: `NCCS' redefined
>> >> /usr/include/asm/termbits.h:10: warning: this is the location of the
>> >> previous definition

Michael> <snip>

>> The problem is that most Linux version needs the inclusion of
>> asm/termbits.h to work.  It seams that glibc 2.1 doesn't allow this
>> anymore (which is probably correct).  To fix this, one has to add a
>> new test to configure to check if one has to include asm/termbits.h
>> anymore.
>> I don't have access to a glibc 2.1 system to check this, so I am
>> greatfull if anyone can fix configure to not define HAVE_ASM_TERMBITS
>> when used with glibc 2.1.

Michael>   Hmm, I don't know how much help I can be but as of a few days ago I
Michael> compiled 3.22.19b and I just finished compiling 3.22.20a after I saw
Michael> this message. Both compiled without a problem, using linux 2.2.3,
Michael> glibc-2.1 (the public release version that was pulled) and egcs (1.1.1
Michael> for 3.22-19b and the new 1.1.2 for 3.22-20a).
Michael>   I noticed one thing is that my '/usr/include/termcap.h' doesn't
Michael> include 'termios.h', the only header it includes is <sys/types.h>, I'm
Michael> using ncurses-4.2. Maybe its a curses problem or where ever the
Michael> 'termcap.h' file came from or a bad glibc-2.1 compile/install or maybe
Michael> a mixture of old and new libc headers from the previous lib ? I know
Michael> in the docs they recommended recompiling any libraries that did 'io'
Michael> such as curses, slang, redline, etc. and also the start out with a fresh
Michael> /usr/include.
Michael>   Not a programmer by any manner of means but if there is any other info,
Michael> details, etc. I can provide let me know and I'll do what I can.


(/tmp) rpm -q -f /usr/include/termcap.h

The above version of libtermcap uses the following header files:

#include <features.h>
#include <termios.h>
#include <sys/types.h>

To fix the above error, one have to modify and test configure on a
machine that shows the above error.

Note that the code in MySQL looks as follows:

#if defined(HAVE_TERMIOS)
#include <termios.h>
#include <unistd.h>
#elif defined(HAVE_TERMBITS_H)
#include <termbits.h>
#elif defined(HAVE_ASM_TERMBITS_H)
#include <asm/termbits.h>			// Standard linux

In other words, if one has termbits.h installed:

(/tmp) rpm -q -f /usr/include/termbits.h

Then one shouldn't get the problem that happened to Phil.

The many different Linux/libc versions/combinations are sometimes a
real pain...

glibc2 bug ???Phil Wilshire17 Mar
  • glibc2 bug ???Michael Widenius17 Mar
    • Re: glibc2 bug ???Michael Hall17 Mar
      • Re: glibc2 bug ???Michael Widenius17 Mar
        • Re: glibc2 bug ???Michael Hall17 Mar
  • Performance And, What am I MissingVan17 Mar
    • Performance And, What am I MissingMichael Widenius17 Mar
RE: glibc2 bug ???Robin Bowes17 Mar