While installing 11gR2 on Oracle Enterprize Linux 5 update 3, I faced below error during relink process
/lib/libgcc_s.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4′
collect2: ld returned 1 exit status
make: *** [ctxhx] Error 1
and
Exception String: Error in invoking target ‘install’ of makefile ‘/u10/app/SBLOSL/orsblosl/oracle/product/11.2.0/ctx/lib/ins_ctx.mk’
Upon investigating, I observed gcc version is 3.4.6, Where as oracle 11gR2 installer requires gcc version 4.1.x.
[orsblosl@rstnxovm9019 bin]$ ls -lart *gcc* *g++*
-rwxr-xr-x 2 root root 89760 Jun 5 2007 i386-redhat-linux-gcc34
-rwxr-xr-x 3 root root 93120 Jun 5 2007 i386-redhat-linux-g++34
-rwxr-xr-x 2 root root 89760 Jun 5 2007 gcc34
-rwxr-xr-x 3 root root 93120 Jun 5 2007 g++34
-rwxr-xr-x 1 root root 914 May 22 2008 gcc
-rwxr-xr-x 1 root root 914 May 22 2008 g++
-rwxr-xr-x 4 root root 198868 Nov 5 2008 i386-redhat-linux-g++
-rwxr-xr-x 4 root root 198868 Nov 5 2008 g++.orig
-rwxr-xr-x 2 root root 196692 Nov 5 2008 i386-redhat-linux-gcc
-rwxr-xr-x 2 root root 196692 Nov 5 2008 gcc.orig
[orsblosl@rstnxovm9019 bin]$ /usr/bin/gcc.orig –version
gcc.orig (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[orsblosl@rstnxovm9019 bin]$ /usr/bin/gcc –version
gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-4)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Hence I moved gcc and g++ in /usr/bin to backup directory and restored gcc.orig and g++.orig to gcc & g++ respectively.
Retry the relink lead to successful completion of the 11gR2 install.
Refrence docs:
Requirements for Installing Oracle 11gR2 RDBMS on RHEL (and OEL) 5 on 32-bit x86 (Doc ID 880936.1)
GCC/G++ version incompatiblity with compat-oracle-rhel4-1.0-5 rpm package installed [ID 389811.1]
Multiple gcc / g++ Versions in Linux [ID 444084.1]