Re: Unable to build bash

From: Robert Schiele (rschiele@uni-mannheim.de)
Date: Thu Jan 06 2000 - 16:20:18 EST


> I am using kernel 2.3.36, and I am no longer able to build bash. I get
> the following error when trying to build bash 2.03. I previously built
> this sucessfully (though I cannot remember which kernel I was then
> using) last October. I have not updated either the compiler (gcc
> 2.95.2) nor glibc (2.1.2) since last trying to build bash. I am using
> a Pentium.
>
> rm -f shell.o
> gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i586"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"i586-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I. -I. -I./lib -I/usr/local/include -g -O2 -c shell.c
> In file included from shell.h:26,
> from shell.c:53:
> general.h:189: parse error before `string_to_rlimtype'
> general.h:189: warning: data definition has no type or storage class
> general.h:190: parse error before `int'
> make: *** [shell.o] Error 1
>
>
> I had the same problem (on a new system) running 2.3.35, so I suspect
> that maybe a kernel change has caused the problem.

Yes, it is the line
#define RLIM_INFINITY (~0UL)
in /usr/src/linux/include/asm/resource.h

Because of that line, the comiler complains about redefinition in
/usr/include/bits/resource.h:
/usr/include/bits/resource.h:111: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:25: warning: this is the location of the previous definition

This confuses the configure script for bash.

I would recommend the following patch:
--- /usr/include/bits/resource.h.orig Sat Nov 6 17:23:45 1999
+++ /usr/include/bits/resource.h Thu Jan 6 22:26:32 2000
@@ -105,10 +105,12 @@
 };
 
 /* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((long int)(~0UL >> 1))
-#else
-# define RLIM_INFINITY 0x7fffffffffffffffLL
+#ifndef RLIM_INFINITY
+# ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+# else
+# define RLIM_INFINITY 0x7fffffffffffffffLL
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64

Then reconfigure and make.

Robert

-- 
"The system required Windows 95 or better, so I installed Linux"

Robert Schiele mailto:rschiele@uni-mannheim.de Tel./Fax: +49-621-10059 http://webrum.uni-mannheim.de/math/rschiele/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:07 EST