[swift-users] Pointer not sufficiently aligned for Swift-2.2/ARM

Jason Pepas jasonpepas at gmail.com
Sun Apr 17 11:52:29 CDT 2016


Just noticed Joe Groff's previous reply to a similar issue:

https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160321/001547.html

"You might be able to work around this by annotating ProtocolDecl and
ProtocolConformance as explicitly having `alignof(8)`."

I'll look into giving that a shot.

Thanks, Jason Pepas


On Sun, Apr 17, 2016 at 11:34 AM, Jason Pepas <jasonpepas at gmail.com> wrote:

> note: I've updated the README.md of the scripts repo with explicit
> instructions on how to reproduce exactly what I've done:
>
>
> https://github.com/cellularmitosis/swift-build-scripts/blob/master/README.md
>
> this was built on a raspbian/jessie install on a Raspberry Pi 3 with the
> clang-3.7 package installed.
>
>
> On Sun, Apr 17, 2016 at 11:22 AM, Jason Pepas <jasonpepas at gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm trying to create a swift 2.2 build for armhf (raspberry pi), and I've
>> run into the following error:
>>
>> https://gist.github.com/cellularmitosis/5493f105fba36a70bdb8cadbcc9b17df
>>
>> swift:
>> /home/cell/sda1/3/swift_src/llvm/include/llvm/ADT/PointerIntPair.h:114:
>> void llvm::PointerIntPair<swift::ProtocolConformance *, 2,
>> swift::ConformanceKind,
>> llvm::PointerLikeTypeTraits<swift::ProtocolConformance *>
>> >::setPointerAndInt(PointerTy, IntType) [PointerTy =
>> swift::ProtocolConformance *, IntBits = 2, IntType =
>> swift::ConformanceKind, PtrTraits =
>> llvm::PointerLikeTypeTraits<swift::ProtocolConformance *>]: Assertion
>> `(PtrWord & ~PointerBitMask) == 0 && "Pointer is not sufficiently aligned"'
>> failed.
>>
>>
>> I'm guessing that this is generally a problem for any 32-bit architecture
>> for swift.
>>
>>
>> Here's a reference to a similar error from a FreeBSD clang bug report
>> from 2013 (also built on raspberry pi):
>>
>> https://llvm.org/bugs/show_bug.cgi?id=15696
>>
>> However, it looks like the bug became unreproducible, so they didn't
>> pursue it.
>>
>>
>> This build was created using the following scripts:
>>
>>
>> https://github.com/cellularmitosis/swift-build-scripts/blob/master/arm/build.sh
>>
>> sources were fetched via:
>>
>>
>> https://github.com/cellularmitosis/swift-build-scripts/blob/master/arm/fetch.sh
>>
>> according to this list of SHA's:
>>
>>
>> https://github.com/cellularmitosis/swift-build-scripts/blob/master/arm/shas.bash
>>
>>
>> Thanks,
>> Jason Pepas
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160417/49b62371/attachment.html>


More information about the swift-users mailing list