From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Tue 14 Dec 2004 - 18:30:40 GMT
On Tue, Dec 14, 2004 at 04:20:23PM +0000, Andrew Glen-Young wrote:
> Hello.
>
> My build of the util-vserver-0.30.196 fails (see below) on an AMD64.
> The util-vserver-0.30 builds correctly.
>
> I have noticed someone asking about this when I searched for this error
> and it was mentioned that this was fixed in util-vserver-0.30.193
> (architecture is never mentioned).
>
> Features:
> CC: gcc, gcc (GCC) 3.3.4 20040623 (Gentoo Linux
> 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
> CXX: g++, g++ (GCC) 3.3.4 20040623 (Gentoo Linux
> 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
> CPPFLAGS: ''
> CFLAGS: '-O2 -std=c99 -Wall -pedantic -W'
> CXXFLAGS: '-O2 -ansi -Wall -pedantic -W
> -fmessage-length=0'
> build/host: x86_64-unknown-linux-gnu/x86_64-pc-linux-gnu
> Use dietlibc: yes (0.25)
> Build C++ programs: yes
> Build C99 programs: yes
> Available APIs: compat,v11,v13,fscompat,net,oldproc,olduts
> ext2fs Source: e2fsprogs
> syscall(2) invocation: fast
> vserver(2) syscall#: 236/glibc
>
> Paths:
> prefix: /usr
> sysconf-Directory: /etc
> cfg-Directory: /etc/vservers
> initrd-Directory: /etc/init.d
> pkgstate-Directory: /var/run/vservers
> Kernelheaders: /usr/src/linux/include
> vserver-Rootdir: /vservers
>
> Error:
>
> diet gcc -O2 -std=c99 -Wall -pedantic -W -o src/save_ctxinfo
> src/save_ctxinfo.o lib/.libs/libvserver.a
> depbase=`echo src/secure-mount.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
> if diet gcc -DHAVE_CONFIG_H -I. -I. -I. -I ./lib -I ./ensc_wrappers
> -D_GNU_SOURCE -D_REENTRANT -O2 -std=c99 -Wall -pedantic -W -MT
> src/secure-mount.o -MD -MP -MF "$depbase.Tpo" -c -o src/secure-mount.o
> src/secure-mount.c; \
> then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit
> 1; fi
> In file included from /usr/include/asm/current.h:7,
> from /usr/include/asm/processor.h:18,
> from /usr/include/linux/prefetch.h:15,
> from /usr/include/linux/list.h:5,
> from /usr/include/linux/wait.h:12,
> from /usr/include/linux/fs.h:12,
> from src/secure-mount.c:48:
> /usr/include/asm/pda.h:26: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared
> here (not in a function)
> /usr/include/asm/pda.h:26: error: requested alignment is not a constant
> In file included from /usr/include/linux/prefetch.h:15,
> from /usr/include/linux/list.h:5,
> from /usr/include/linux/wait.h:12,
> from /usr/include/linux/fs.h:12,
> from src/secure-mount.c:48:
> /usr/include/asm/processor.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT'
> undeclared here (not in a function)
> /usr/include/asm/processor.h:65: error: requested alignment is not a
> constant
> /usr/include/asm/processor.h:228: error: `CONFIG_X86_L1_CACHE_SHIFT'
> undeclared here (not in a function)
> /usr/include/asm/processor.h:228: error: requested alignment is not a
> constant
> In file included from /usr/include/linux/list.h:5,
> from /usr/include/linux/wait.h:12,
> from /usr/include/linux/fs.h:12,
> from src/secure-mount.c:48:
> /usr/include/linux/prefetch.h: In function `prefetch_range':
> /usr/include/linux/prefetch.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT'
> undeclared (first use in this function)
> /usr/include/linux/prefetch.h:65: error: (Each undeclared identifier is
> reported only once
> /usr/include/linux/prefetch.h:65: error: for each function it appears
> in.)
> make[2]: *** [src/secure-mount.o] Error 1
looks like you are using 'raw' kernel headers here
(which unfortunately will not work, not just for util-vserver
but also for all other software including linux/* stuff)
the glibc 'usually' provides heavily cleaned up kernel headers
which do work outside the kernel (for userspace apps)
so, doing ln -s /usr/src/linux/include/linux /usr/include/linux
is a very bad idea unless you know what you are doing ...
HTH,
Herbert
> Thanks for your help.
> - Andrew
>
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver