[16396] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

[krbdev.mit.edu #8854] mit-krb5 fails to build on X32 host.

daemon@ATHENA.MIT.EDU (Kai Osen via RT)
Fri Nov 29 18:41:23 2019

From: "Kai Osen via RT" <rt-comment@KRBDEV-PROD-APP-1.mit.edu>
In-Reply-To: <CACGa1A3kqgv6V2=XvqBsA86hy2xbLAOshDm2Vz-i=P_wENTJiA@mail.gmail.com>
Message-ID: <rt-4.4.4-61310-1575070875-1045.8854-4-0@mit.edu>
To: "AdminCc of krbdev.mit.edu Ticket #8854":;
Content-Type: multipart/mixed; boundary="----------=_1575070875-61310-0"
Date: Fri, 29 Nov 2019 18:41:15 -0500
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Reply-To: rt-comment@KRBDEV-PROD-APP-1.mit.edu
Errors-To: krb5-bugs-bounces@mit.edu

------------=_1575070875-61310-0
Content-Type: text/plain; charset="utf-8"


Fri Nov 29 18:41:14 2019: Request 8854 was acted upon.
 Transaction: Ticket created by kai.osen@gmail.com
       Queue: krb5
     Subject: mit-krb5 fails to build on X32 host.
       Owner: Nobody
  Requestors: kai.osen@gmail.com
      Status: new
 Ticket <URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=8854 >


Hi, I have an old Atom cpu based PC with 2GB of ram that I'm trying to
install Gentoo X32 variant on. It stopped on mit-krb5 library and I made
the attached patch to fix it (at least compile it).


*Some info from this PC:*
CFLAGS="-O2 -pipe -march=bonnell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16
-msahf -mmovbe -mfxsr --param l1-cache-size=24 --param
l1-cache-line-size=64 --param l2-cache-size=512 -mtune=bonnell
-fomit-frame-pointer -mfpmath=sse"
CHOST="x86_64-pc-linux-gnux32"

*Debug output from start of gentoo emerge that includes the configure
arguments:*

emerge -v mit-krb5

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-crypt/mit-krb5-1.17-r1::gentoo  USE="keyutils nls
pkinit threads -doc -libressl -lmdb -openldap (-selinux) -test* -xinetd"
ABI_X86="(x32) -32 -64" CPU_FLAGS_X86="-aes" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-crypt/mit-krb5-1.17-r1::gentoo
 * krb5-1.17.tar.gz BLAKE2B SHA512 size ;-) ...
     [ ok ]
>>> Unpacking source...
>>> Unpacking krb5-1.17.tar.gz to
/var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work
>>> Source unpacked in /var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work
>>> Preparing source in
/var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work/krb5-1.17/src ...
 * Applying mit-krb5-1.12_warn_cflags.patch ...
     [ ok ]
 * Applying mit-krb5-config_LDFLAGS-r1.patch ...
      [ ok ]
 * Applying mit-krb5-1.16.3-libressl-r1.patch ...
     [ ok ]
 * Applying mit-krb5-1.17-fix-x32.patch ...
     [ ok ]
 * User patches applied.
 * Running eautoreconf in
'/var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work/krb5-1.17/src' ...
 * This package has a configure.in file which has long been deprecated.
Please
 * update it to use configure.ac instead as newer versions of autotools
will die
 * when it finds this file.  See https://bugs.gentoo.org/426262 for details.
 * Running autoconf --force ...
     [ ok ]
 * Running autoheader ...
     [ ok ]
 * Running elibtoolize in: krb5-1.17/src/
>>> Source prepared.
>>> Configuring source in
/var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work/krb5-1.17/src ...
 * abi_x86_x32.x32: running multilib-minimal_abi_src_configure
 * econf: updating krb5-1.17/src/config/config.guess with
/usr/share/gnuconfig/config.guess
 * econf: updating krb5-1.17/src/config/config.sub with
/usr/share/gnuconfig/config.sub
/var/tmp/portage/app-crypt/mit-krb5-1.17-r1/work/krb5-1.17/src/configure
--prefix=/usr --build=x86_64-pc-linux-gnux32 --host=x86_64-pc-linux-gnux32
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib
--docdir=/usr/share/doc/mit-krb5-1.17-r1
--htmldir=/usr/share/doc/mit-krb5-1.17-r1/html --libdir=/usr/libx32
--without-ldap --without-tcl --enable-nls --enable-pkinit
--enable-thread-support --without-lmdb --without-hesiod --enable-shared
--with-system-et --with-system-ss --enable-dns-for-realm
--enable-kdc-lookaside-cache --with-system-verto --disable-rpath
configure: loading site script /usr/share/config.site

<. rest is cut for brevity .>

--- Kai William Osen


------------=_1575070875-61310-0
Content-Type: text/x-patch; charset="ascii"; name="mit-krb5-1.17-fix-x32.patch"
Content-Disposition: attachment; filename="mit-krb5-1.17-fix-x32.patch"
Content-Transfer-Encoding: 7bit
Content-ID: <f_k3knmpxp0>
RT-Attachment: 8854/94955/23102

diff -aur src/configure.in src.x32/configure.in
--- src/configure.in	2019-11-29 19:24:13.000000000 -0000
+++ src.x32/configure.in	2019-11-29 18:00:04.000000000 -0000
@@ -351,6 +351,10 @@
 	aesni_obj=iaesx86.o
 	aesni_machine=x86
 	;;
+    x86_64-*-gnux32)
+	aesni_obj=iaesx32.o
+	aesni_machine=x32
+	;;
     x86_64-*)
 	aesni_obj=iaesx64.o
 	aesni_machine=amd64
diff -aur src/lib/crypto/builtin/aes/Makefile.in src.x32/lib/crypto/builtin/aes/Makefile.in
--- src/lib/crypto/builtin/aes/Makefile.in	2019-01-08 16:02:37.000000000 -0000
+++ src.x32/lib/crypto/builtin/aes/Makefile.in	2019-11-29 19:16:49.000000000 -0000
@@ -37,6 +37,11 @@
 iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
 	$(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx64.s
 
+# x32 has the same instruction set as x64, but uses 32bit pointers.
+# So for now the iaesx32.o file is compiled from the same source code as x64.
+iaesx32@SHOBJEXT@: $(srcdir)/iaesx64.s
+	$(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx64.s
+
 iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
 	$(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx86.s
 

------------=_1575070875-61310-0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs

------------=_1575070875-61310-0--

home help back first fref pref prev next nref lref last post