Bug 43760

Summary: item_func.h:490: Internal error: Segmentation fault. in compiling mysql
Product: [Retired] Red Hat Linux Reporter: Joe Kaiping <joe.kaiping>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-07 16:13:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
List of RPMs installed for gcc, etc. (only RPMs where used for installs)
none
MySQL Configure log
none
MySQL compile log
none
item_func.ii file created via command line none

Description Joe Kaiping 2001-06-07 02:21:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)

Description of problem:
I have RedHat 7.0 installed with the glibc that comes with it and then 
installed newer gcc and RPMs from later releases.  (Will attempt to list 
all RPMs installed in an attachment to this bug.) 

In attempting to compile MySQL via 
Apachetoolbox-1.5.28/src/mysql-3.23.38
I got segmentation fault and error concerning item_func.h


How reproducible:
Always

Steps to Reproduce:
1. Install RedHat 7.0 on Pentium 166 mhz processor with 32 meg RAM
2. install attached RPM list
3. install and run Apachetoolbox-1.5.28
	

Actual Results:  make[3]: Entering directory `/opt/Apachetoolbox-
1.5.28/src/mysql-3.23.38/sql'
c++ -DMYSQL_SERVER                      -
DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-3.23.38\""  -
DDATADIR="\"/var/lib/mysql\""                   -
DSHAREDIR="\"/var/lib/mysql/mysql\""        -
DHAVE_CONFIG_H -I./../include                   -
I./../regex                    -I. -I../inclu
de -I.. -I.    -O3 -DDBUG_OFF   -fno-implicit-templates -c item_func.cc
item_func.h: In method `Item_func_char_length::Item_func_char_length
(Item *)':
item_func.h:490: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[3]: *** [item_func.o] Error 1



Expected Results:  should be no error and should compile OK

Additional info:

Comment 1 Joe Kaiping 2001-06-07 02:26:46 UTC
Created attachment 20532 [details]
List of RPMs installed for gcc, etc.  (only RPMs where used for installs)

Comment 2 Joe Kaiping 2001-06-07 02:27:42 UTC
Created attachment 20533 [details]
MySQL Configure log

Comment 3 Joe Kaiping 2001-06-07 02:28:28 UTC
Created attachment 20534 [details]
MySQL compile log

Comment 4 Jakub Jelinek 2001-06-07 11:32:42 UTC
Is it reproduceable (and always on the same file)?
If not, search for better hardware, if yes, please rerun
c++ -DMYSQL_SERVER                      -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-3.23.38\""                     -DDATADIR="\"/v
ar/lib/mysql\""                         -DSHAREDIR="\"/var/lib/mysql/mysql\""                   -DHAVE_CONFIG_H -I./../include
                -I./../regex                    -I. -I../include -I.. -I.    -O3 -DDBUG_OFF   -fno-implicit-templates -c item_f
unc.cc -save-temps -v
or what is the command line which triggers the bug (note -save-temps -v options)
and attach here the .ii file it creates.

Comment 5 Joe Kaiping 2001-06-07 16:10:13 UTC
Thanks for the quick reply.  Here is the info that you requested:

I tried to recompile MySQL via the main Makefile and it died at the same 
location.  I then ran the offending line via the command line with the extra 
options you suggested and got:

c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-3.23.38\"" -
DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/var/lib/mysql/mysql\"" -
DHAVE_CONFIG_H -I./../include -I./../regex  -I. -I../include -I.. -I. -O3 -
DDBUG_OFF -fno-implicit-templates -c item_func.cc -save-temps -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -v -
I./../include -I./../regex -I. -I../include -I.. -I. -D__GNUC__=2 -
D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__E
LF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem
(posix) -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -
D__tune_i386__ -DMYSQL_SERVER
 -DDEFAULT_MYSQL_HOME="/usr/local/mysql-3.23.38" -DDATADIR="/var/lib/mysql" -
DSHAREDIR="/var/lib/mysql/mysql" -DHAVE_CONFIG_H -DDBUG_OFF item_func.cc 
item_func.ii
GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib)
 (i386 Linux/ELF)
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
ignoring duplicate directory "../include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
 ../include
 ../regex
 .
 ..
 /usr/include/g++-3
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus item_func.ii -quiet -dumpbase 
item_func.cc -O3 -version -fno-implicit-templates -o item_func.s
GNU C++ version 2.96 20000731 (Red Hat Linux 7.0) (i386-redhat-linux) compiled 
by GNU C version 2.96 20000731 (Red Hat Linux 7.0).
item_func.cc: In method `void Item_num_func::fix_length_and_dec ()':
item_func.cc:888: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

I'm attaching the item_func.ii file to this bug after this post...


Comment 6 Joe Kaiping 2001-06-07 16:13:38 UTC
Created attachment 20552 [details]
item_func.ii file created via command line

Comment 7 Jakub Jelinek 2001-06-13 12:47:02 UTC
Sorry, cannot reproduce this.
It compiles just find with -O3 -fno-implicit-templates on e.g. 2.96-54, 2.96-69,
2.96-86 and other releases I've tried.