Alan,

The code for the 32-bit runtime on 64-bit kernel originated on a PPC64, and may never nave been tested on x86-64. The patch makes sense, due to the i386-vs-i686 naming mess. However, the patch is currently incomplete since PPC64 and SPARC64 don't have any value for CR_LIBARCH32. I think you want to change one line in your patch from
      CR_LIBARCH=$CR_LIBARCH32
to
      CR_LIBARCH=${CR_LIBARCH32:-$CR_ARCH32}
Which should be correct on all architectures but still require changing the same 2 lines as your original patch.

-Paul

On 9/28/2010 7:26 AM, Alan Woodland wrote:
tags 597601 +patch
tags 597601 +pending
thanks

Hi,

I'm having some trouble getting x86 builds to work in an x86 chroot
hosted on a x86_64 machine. The fault seems to stem from the fact that
CR_LIBARCH is set to i686, not i386, which causes the building of the
library later on to search in libcr/arch/i686 for cr_atomic.h, which
doesn't exist.

The trivial fix of changing CR_ARCH32 = i686 to i386 in configure.ac
fixes the problem for x86 builds in the chroot, but breaks multiarch
support because when configure is called as sub-configure for the
32bit library it ends up with i386 as CR_ARCH, which causes the
"unsupported architecture" message to get displayed.

The minimally intrusive fix I've come up with is:

Index: blcr-0.8.2/configure.ac
===================================================================
--- blcr-0.8.2.orig/configure.ac        2010-09-28 14:58:10.000000000 +0100
+++ blcr-0.8.2/configure.ac     2010-09-28 15:13:29.000000000 +0100
@@ -215,6 +215,7 @@
      ;;
    x86_64)
      CR_ARCH32=i686
+    CR_LIBARCH32=i386
      cr_wordsize=8
      ;;
    ppc64|powerpc64)
@@ -683,7 +684,7 @@
  CR_LIBARCH=$CR_ARCH
  if test $ac_cv_sizeof_void_p != $cr_wordsize; then
    if test $cr_wordsize = 8; then
-    CR_LIBARCH=$CR_ARCH32
+    CR_LIBARCH=$CR_LIBARCH32
    else
      AC_MSG_ERROR([CC='$CC' yields sizeof(void *) =
$ac_cv_sizeof_void_p when expecting $cr_wordsize.$clue])
    fi


Is this sane? It seems to work on my test systems, but that doesn't
prove anything.

Thanks,
Alan

--
Paul H. Hargrove                          [email protected]
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to