All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schutte <michi@uiae.at>
To: kbd@lists.altlinux.org
Cc: 558492@bugs.debian.org
Subject: Re: [kbd] Bug#558492: kbd_1.15.1-1(ia64/unstable): FTBFS: compile errors
Date: Mon, 30 Nov 2009 20:05:28 +0100	[thread overview]
Message-ID: <20091130190528.GA5624@graeme> (raw)
In-Reply-To: <20091129115349.GA31174@mix.mmjgroup.com>

[-- Attachment #1: Type: text/plain, Size: 1918 bytes --]

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:
> 
> > […]
> > gcc -DHAVE_CONFIG_H -I. -I..  -DDATADIR=\"/usr/share\" -DLOCALEDIR=\"/usr/share/locale\" -Wall -Wextra -Wmissing-noreturn -Wdisabled-optimization -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 psffontop.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
<https://buildd.debian.org/build.cgi?pkg=kbd>.)

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’s alignment matches that of int (likely word-aligned).

I guess the most “correct” fix is a memcpy() of the input buffer to the
correctly aligned address of psfhdr.  Simply allowing unaligned access,
as forced by “(struct psf_header2 *) (void *) &inputbuf[0]”, might also
work, but I don’t know enough about the situation to say this with
certainty.

I’d be glad about suggestions from your part :-)

Cheers,
-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

       reply	other threads:[~2009-11-30 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091129115349.GA31174@mix.mmjgroup.com>
2009-11-30 19:05 ` Michael Schutte [this message]
2009-12-03  0:58   ` [kbd] Bug#558492: kbd_1.15.1-1(ia64/unstable): FTBFS: compile errors Alexey Gladkov
2009-12-03 18:26     ` Michael Schutte
2009-12-08 17:34       ` Michael Schutte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091130190528.GA5624@graeme \
    --to=michi@uiae.at \
    --cc=558492@bugs.debian.org \
    --cc=kbd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.