[Pkg-uml-pkgs] Bug#491921: user-mode-linux: FTBFS on amd64 -- no more __memcpy with gcc 4.3

Mattia Dongili malattia at linux.it
Tue Jul 22 22:38:15 UTC 2008


On Tue, Jul 22, 2008 at 03:20:41PM -0400, Aaron M. Ucko wrote:
> Package: user-mode-linux
> Version: 2.6.25-1um-1
> Severity: serious
> Tags: patch
> Justification: no longer builds from source
> 
> user-mode-linux fails to build on amd64 with the following error:
> 
> |   CC      arch/um/sys-x86_64/ksyms.o
> | arch/um/sys-x86_64/ksyms.c:16: error: '__memcpy' undeclared here (not in a function)
> | arch/um/sys-x86_64/ksyms.c:16: warning: type defaults to 'int' in declaration of '__memcpy'
> | make[2]: *** [arch/um/sys-x86_64/ksyms.o] Error 1
> | make[1]: *** [arch/um/sys-x86_64] Error 2
> 
> The problem is that arch/um/sys-x86_64/ksyms.c unconditionally tries
> to export __memcpy even though include/asm-x86/string_64.h declares it
> only for GCC 4.2 and older, newer versions presumably being smart
> enough not to need it.  I'm attaching a patch that conditionalizes the
> EXPORT_SYMBOL call accordingly, and have confirmed that it allows the
> build to complete without errors.  (FTR, arch/um/os-Linux/user_syms.c
> already exports memcpy itself, so ksyms.c need not do so in any case.)
> 
> FWIW, you can find a full log illustrating the error at
> http://buildd.debian.org/fetch.cgi?pkg=user-mode-linux;ver=2.6.25-1um-1;arch=amd64;stamp=1216481207
> 
> -- System Information:
> Debian Release: lenny/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.25.11 (SMP w/2 CPU cores)
> Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
> Shell: /bin/sh linked to /bin/dash

> Index: linux-source-2.6.25/arch/um/sys-x86_64/ksyms.c
> ===================================================================
> --- linux-source-2.6.25.orig/arch/um/sys-x86_64/ksyms.c	2008-04-16 22:49:44.000000000 -0400
> +++ linux-source-2.6.25/arch/um/sys-x86_64/ksyms.c	2008-07-22 14:10:47.000000000 -0400
> @@ -13,4 +13,6 @@
>  EXPORT_SYMBOL(__up_wakeup);
>  
>  /*XXX: we need them because they would be exported by x86_64 */
> +#if (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || __GNUC__ < 4
>  EXPORT_SYMBOL(__memcpy);
> +#endif

current linux git uses a slightly different solution
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8bfd04b974689f700bbd053ad6e66b0a95fb80c9
which is after all conditionally exports memcpy or __memcpy with the
same logic as their definition.

Will apply, and reupload later today. Thanks.
-- 
mattia
:wq!





More information about the Pkg-uml-pkgs mailing list