[OpenAFS-devel] Re: 1.6. pre debian arm.

omalleys@msu.edu omalleys@msu.edu
Tue, 11 Jan 2011 09:11:59 -0500


Quoting Andrew Deason <adeason@sinenomine.net>:

> On Mon, 10 Jan 2011 21:29:57 -0500
> omalleys@msu.edu wrote:
>
>> root@sheevaplug-debian:~# echo '' | flex --version
>> flex 2.5.35
>> bash: echo: write error: Broken pipe
>> root@sheevaplug-debian:~#
>>
>> It looks like a bug in bash on arm. It worked with zsh and it worked
>> with bash an i586. :P It doesnt appear to be an alignment error!
>
> bash version? And does that actually affect the value of "$?" ?

I think i recall seeing this before possibly with the Fedora 12 arm  
vm. I ran update but it wasn't fixed. So it might be need to be  
updated in the debian-arm specific stuff.

It is bash GNU bash, version 3.2.39(1)

root@sheevaplug-debian:~# cat test.sh
#!/bin/bash
echo '' | /usr/bin/flex --version
echo $?

root@sheevaplug-debian:~# ./test.sh
flex 2.5.35


root@sheevaplug-debian:~# echo '' | /usr/bin/flex --version
flex 2.5.35
bash: echo: write error: Broken pipe


>> Unlike:
>>
>> gcc -fPIC -g -O -I/mnta/openafs-pre1.6.0/openafs-1.6.0pre1/src/config
>> -I/mnta/openafs-pre1.6.0/openafs-1.6.0pre1/include -I. -I.
>> -D_LARGEFILE64_SOURCE -Wall -Wcast-align -Wstrict-prototypes
>> -Wold-style-definition -Wpointer-arith -Wall -Wstrict-prototypes
>> -Wold-style-definition -Werror -fdiagnostics-show-option
>> -Wpointer-arith   -c cbc_encrypt.c
>> cc1: warnings being treated as errors
>> cbc_encrypt.c: In function ?des_cbc_encrypt?:
>> cbc_encrypt.c:67: error: cast increases required alignment of target
>> type [-Wcast-align]
>> make[3]: *** [cbc_encrypt.o] Error 1
>> make[3]: Leaving directory  
>> `/mnta/openafs-pre1.6.0/openafs-1.6.0pre1/src/des'
>> make[2]: *** [des] Error 2
>
> The lack of a '#define MUSTALIGN' in conf-arm-linux.h suggests this is
> not indicative of an actual problem, but I wouldn't know.

I added the -Wcast-align flag that might be broken.  I also added the  
#define MUSTALIGN' in conf-arm-linux.h but I don't think it is getting  
that far yet. Im still looking at it.

Some ARM processors don't have hardware alignment.  It is choking on  
the gcc's cast-align flag.

The alignment issues don't show up in the virtual machines because the  
Intel hardware underneath "takes care of" the issue.

Im just not sure the easiest way to catch these or if they have all  
been caught as this isn't the only platform that can have alignment  
issues.


>> >> > And im not sure why im checking pentium:
>> >>
>> >> > checking your AFS sysname... arm_linux26
>> >> > checking if gcc accepts -march=pentium... yes
>> [..]
>> > It should for the kernel module configure (isn't that a separate build
>> > for Debian packages?). This is OPENAFS_GCC_SUPPORTS_MARCH.
>>
>> It looks like OPENAFS_GCC_SUPPORTS_MARCH is for i386/pentium only.
>>
>> I don't see any ppc, alpha, mips, sparc or anything else along those
>> lines in the ac files.
>
> The results of it only impact that, yes, but currently it is run for
> everything linux.

Right.