Gcc-3.2 make error : sys/ucontext.h: No such file or directory

indu indu.narayanan@wipro.com
Wed Oct 18 06:53:00 GMT 2006


Hi,

I tried to compile gcc-3.2 on my linux 2.6 box . I use a 
crosstool(gcc-3.4.3-glibc-2.3.4). Got the following errors :
In file included from tconfig.h:21,
                 from ../../gcc-3.2/gcc/libgcc2.c:36:
../../gcc-3.2/gcc/config/i386/linux.h:226:26: sys/ucontext.h: No such 
file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/usr/src/i386_jsp_source/gcc-obj/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/usr/src/i386_jsp_source/gcc-obj/gcc'
make: *** [all-gcc] Error 2


I tried to fix it using the patch : ( from gcc-help )

Suggested patch:

gcc/ChangeLog:
2002-11-21  Craig Groeschel  <ladder91@yahoo.com>
config/i386/linux.h [USE_GNULIBC_1]: Do not try to include <sys/ucontext.h>
and do not define MD_FALLBACK_FRAME_STATE_FOR.

--- gcc/config/i386/linux.h.orig	Thu Nov 21 13:40:39 2002
+++ gcc/config/i386/linux.h	Thu Nov 21 12:24:00 2002
@@ -222,9 +222,12 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef IN_LIBGCC2
 #include <signal.h>
+#ifndef USE_GNULIBC_1
 #include <sys/ucontext.h>
 #endif
+#endif
 
+#ifndef USE_GNULIBC_1
 #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)		\
   do {									\
     unsigned char *pc_ = (CONTEXT)->ra;					\
@@ -278,3 +281,4 @@ Boston, MA 02111-1307, USA.  */
     (FS)->retaddr_column = 8;						\
     goto SUCCESS;							\
   } while (0)
+#endif


And tried to build.But it showed the same errors. Please help.

Thanks in advance,
Indu



More information about the Gcc-help mailing list