* Compile problem on Linux
@ 2000-03-10 10:27 Oliver Kiddle
2000-03-10 12:25 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2000-03-10 10:27 UTC (permalink / raw)
To: Zsh workers
When compiling zsh on my PC (which runs SuSE Linux 6.1). I got errors
relating to RLIM_NLIMITS being undefined. I traced the cause of this
down to autoconf erroneously reporting sys/resource.h to not exist
(while correctly finding getrlimit).
Checking config.log, I found:
configure:2496: gcc -E conftest.c >/dev/null 2>conftest.out
In file included from /usr/include/sys/resource.h:27,
from configure:2492:
/usr/include/resourcebits.h:103: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:25: warning: this is the location of the previous definition
configure: failed program was:
#line 2491 "configure"
#include "confdefs.h"
#include <sys/resource.h>
confdefs.h was apparently empty and indeed the following gave the same
warnings:
echo "#include <sys/resource.h>" > t.c
gcc -E t.c >/dev/null
Is this a problem with autoconf not effectively determining if
conftest.out indicates an error, are the include files on my system
broken or should zsh's configure.in be putting some sort of work-around
in confdefs.h?
Looking at the include files, resourcebits.h has the definition:
/* Kinds of resource limit. */
enum __rlimit_resource
{
.
.
.
/* Value to indicate that there is no limit. */
RLIM_INFINITY = (long int)(~0UL >> 1)
#define RLIM_INFINITY RLIM_INFINITY
};
And in asm/resource.h:
/*
* SuS says limits have to be unsigned.
* Which makes a ton more sense anyway.
*/
#define RLIM_INFINITY (~0UL)
Any ideas? Should I be sending this to the autoconf maintainers? The
problem could have been around a while - I recently cleared out my
autoconf cache to solve another problem (see msg 9602 (thanks Sven
that was the problem)). My old configure cache reported
sys/resource.h's presence but I may have manually edited it -
regenerating the configure script with an old autoconf was no help.
Oliver Kiddle
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Compile problem on Linux
2000-03-10 10:27 Compile problem on Linux Oliver Kiddle
@ 2000-03-10 12:25 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-03-10 12:25 UTC (permalink / raw)
To: Oliver Kiddle, Zsh workers
On Mar 10, 10:27am, Oliver Kiddle wrote:
} Subject: Compile problem on Linux
}
} When compiling zsh on my PC (which runs SuSE Linux 6.1). I got errors
} relating to RLIM_NLIMITS being undefined.
This is a known incompatibility of newer Linux kernel headers with older
glibc headers. It's fixed by a newer version of glibc; I think the
autoconf people are aware of it.
I've already got mention of it in the Etc/MACHINES file for 3.0.8. Here's
the snippet:
+ Some versions of glibc2 have a conflict with <asm/resource.h>
+ which causes a redefinition warning on RLIM_INFINITY. This
+ causes configure to decide that <sys/resource.h> is not present,
+ which can cause compilation errors in zsh's rlimit code. The
+ best solution is to edit config.h after running configure and
+ #define HAS_SYS_RESOURCE_H.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-10 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-10 10:27 Compile problem on Linux Oliver Kiddle
2000-03-10 12:25 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).