I'm trying to compile the current glibc (2.17) from the official ftp on my machine (kernel 3.7.3). No patches or extras are applied.
For x86_64 everything works fine, but I need the 32-Bit libs as well.
According to the manual, I run this to configure (64-bit already installed):
../../src/glibc-2.17/configure --prefix=/home/user/glibc32 --enable-kernel=3.7.3 BUILD_CC='gcc' CC='gcc -mx32' CXX='g++ -mx32'
At first, I got the error specified in the following line from pread.c and pwrite.c
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
# error "__NR_pread and __NR_pread64 both defined???"
# endif
# define __NR_pread __NR_pread64
//Match __NR_pwrite* for pwrite.c accordingly
#endif
That didn't make any sense to me, so i changed those to:
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifndef __NR_pread
# define __NR_pread __NR_pread64
# endif
#endif
Now my error is swapon (misc/swapon.c) not matching the prototype (sys/swap.h):
int
swapon (path)
const char *path;
{
__set_errno (ENOSYS);
return -1;
}
stub_warning (swapon)
The prototype is:
/* Make the block special device PATH available to the system for swapping.
This call is restricted to the super-user. */
extern int swapon (const char *__path, int __flags) __THROW;
This is clearly no match, but I have no idea, how to bypass this...
There must have been people before me who have tried this and I cant imagine there being this kind of errors in a glibc release.
What am i doing wrong?
Should i continue these kind of "fixes"? I cant really just pass 0 as the second parameter, or can I?