From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Mon, 30 Nov 2009 20:05:28 +0100 From: Michael Schutte To: kbd@lists.altlinux.org Message-ID: <20091130190528.GA5624@graeme> Mail-Followup-To: kbd@lists.altlinux.org, 558492@bugs.debian.org References: <20091129115349.GA31174@mix.mmjgroup.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <20091129115349.GA31174@mix.mmjgroup.com> Jabber-ID: michi@uiae.at User-Agent: Mutt/1.5.17 (2007-11-01) Cc: 558492@bugs.debian.org Subject: Re: [kbd] Bug#558492: kbd_1.15.1-1(ia64/unstable): FTBFS: compile errors X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 19:05:47 -0000 Archived-At: List-Archive: --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alexey! kbd fails to build on several architectures supported by Debian GNU/Linux, namely Alpha, ARM, PA-RISC, IA-64, MIPS and SPARC. This is the relevant part from the original bug report: On Sun, Nov 29, 2009 at 04:53:49AM -0700, lamont@debian.org wrote: > There was an error while trying to autobuild your package: >=20 > > [=E2=80=A6] > > gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=3D\"/usr/share\" -DLOCALEDIR=3D= \"/usr/share/locale\" -Wall -Wextra -Wmissing-noreturn -Wdisabled-optimizat= ion -Wcast-align -Wshadow -Wmissing-format-attribute -Wmissing-prototypes -= Wstrict-prototypes -Wmissing-declarations -Werror -funit-at-a-time -Os -g= -MT psffontop.o -MD -MP -MF .deps/psffontop.Tpo -c -o psffontop.o psffonto= p.c > > cc1: warnings being treated as errors > > psffontop.c: In function 'readpsffont': > > psffontop.c:253: error: cast increases required alignment of target type > > make[1]: *** [psffontop.o] Error 1 > > make[1]: Leaving directory `/build/buildd/kbd-1.15.1/src' > > make: *** [build-stamp] Error 2 > > dpkg-buildpackage: error: debian/rules build gave error exit status 2 (If you wish, you can find the full build logs for all architectures at .) As far as I can tell, the affected archs align data structures just like the member with the highest alignment. The cast from (char *) to (struct psf2_header *) fails as inputbuf is byte-aligned while the struct=E2=80=99s alignment matches that of int (likely word-aligned). I guess the most =E2=80=9Ccorrect=E2=80=9D fix is a memcpy() of the input b= uffer to the correctly aligned address of psfhdr. Simply allowing unaligned access, as forced by =E2=80=9C(struct psf_header2 *) (void *) &inputbuf[0]=E2=80=9D= , might also work, but I don=E2=80=99t know enough about the situation to say this with certainty. I=E2=80=99d be glad about suggestions from your part :-) Cheers, --=20 Michael Schutte --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBCAAGBQJLFBdzAAoJEPPkEi8djCYa5YoH/2lHKmZFV3v8DHRCjvhhGOYz 8Agyp7yYKpT48DfLeLxksLZHy/BmTjhJgcaQNELhHvl81MmIKU9BedxdUvTrcdfV /VzK64XjKs8cCQcQt68SVD8EeOrsYK7zpHA9P3iK9F1HxMFqn10b0QGN1xBnfmIv ow6kkofulbirrmkEDyLvk4G7FX4o4KJuHWVqelVo7/qwXE9vUsu/cXIVJHwqTC0M 7hsbEnPRV43PI3Tojalsb3u5xzDWHt5uulAYCfNt+FhNlOBA987sZg1paU3mhefE 2XMRu20usXlAPYTO5Uy5cSIMtC6zvq10VKEPp7jgoNLCQtm92wzNuZ0KclgVDm4= =keMj -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--