Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building Stack on ARM #2604

Closed
borsboom opened this issue Sep 16, 2016 · 10 comments
Closed

Fix building Stack on ARM #2604

borsboom opened this issue Sep 16, 2016 · 10 comments

Comments

@borsboom
Copy link
Contributor

borsboom commented Sep 16, 2016

Stack now uses store, which does not currently build ARM and some other processors (see mgsloan/store#37). First store will need to be fixed, and then Stack will have to use the new store version.

ping @mgsloan

@mgsloan
Copy link
Contributor

mgsloan commented Oct 6, 2016

I have a patch for review on store: mgsloan/store#78

Pending someone actually testing it on ARM, and perhaps more code review.

@mgsloan
Copy link
Contributor

mgsloan commented Oct 27, 2016

I've updated stack to use store-0.3 In theory this is now resolved. Pending test by someone who has an ARM machine - pinging @dysinger

@mitchty
Copy link
Contributor

mitchty commented Nov 5, 2016

If you like I can give it a test on my arm port. Is the master branch the thing to test?

@mgsloan
Copy link
Contributor

mgsloan commented Nov 8, 2016

Yep it'd be the master branch. Crossing my fingers that it works!

@borsboom
Copy link
Contributor Author

borsboom commented Nov 16, 2016

@mgsloan: I've tested the master branch of store on armv7 (only took 20 hours to build using qemu) and get the following test failures:

      test/Data/Store/StreamingSpec.hs:52:
      1) Data.Store.Streaming.decodeMessage.ByteString Throws an Exception on messages that are shorter than indicated.
           uncaught exception: PokeException (PokeException {pokeExByteIndex = 4, pokeExMessage = "encode undershot end of 8 byte long buffer"})

      test/Data/Store/StreamingSpec.hs:53:
      2) Data.Store.Streaming.decodeMessage.ByteString Throws an Exception on messages that are longer than indicated.
           uncaught exception: PokeException (PokeException {pokeExByteIndex = 16, pokeExMessage = "encode undershot end of 20 byte long buffer"})

Full log is at https://gist.github.com/borsboom/7bd922f62e62c42f4aaa3c5f4e24cad6.

@mgsloan
Copy link
Contributor

mgsloan commented Nov 16, 2016

I believe those failures are due to the tests assuming that the size of Int is 64 bits. So happily, I think unaligned access is working fine. If you still have that emulator handy, I've pushed a commit disabling those tests.

@borsboom
Copy link
Contributor Author

The tests now pass, and stack passes its tests when built against this version of store.

@mgsloan mgsloan removed the blocked label Nov 20, 2016
@mgsloan
Copy link
Contributor

mgsloan commented Nov 20, 2016

Woohoo! I think we can consider this resolved.

@mgsloan mgsloan closed this as completed Nov 20, 2016
@mitchty
Copy link
Contributor

mitchty commented Nov 21, 2016

Yep, I managed to get it to build, forgot to post that bit (had some build issues that were just no swap space due to a reboot):

# file ./.stack-work/install/arm-linux/lts-7.0/8.0.1/bin/stack
./.stack-work/install/arm-linux/lts-7.0/8.0.1/bin/stack: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped
# ./.stack-work/install/arm-linux/lts-7.0/8.0.1/bin/stack --version | head -n 3
Version 1.2.1, Git revision 89c699b4083953406336647c52b42acbf48beac2 (dirty) (4308 commits) arm
Compiled with:

@borsboom
Copy link
Contributor Author

stack-1.3.0 ARM binary is now uploaded to the release: https://github.com/commercialhaskell/stack/releases/download/v1.3.0/stack-1.3.0-linux-arm.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants