Hello,
I cloned and compiled ponyc on the current raspbian:
`
sudo apt-get install make gcc g++ git zlib1g-dev libncurses5-dev libssl-dev llvm-3.9 llvm-3.9-dev libpcre2-dev
export LLVM_CONFIG=/usr/lib/llvm-3.9/bin/llvm-config
make default_pic=true
`
The make stopped with an error. I had to change in the makefile line 48 to:
arch ?= native
tune ?= native
Then the ponyc was built and works fine here.
Good catch, I had a similar problem, but didnt follow it through tbh.
I think we should detect a raspian build and change the tune flag to native accordingly. Could you have a look on your raspian system how this could be reliably detected?
Maybe there is something we could use similarly to how we do it for other systems: https://github.com/ponylang/ponyc/blob/master/Makefile-ponyc#L1:L39
Maybe this helps:
pi@homeserver:~ $ lsb_release -i
Distributor ID: Raspbian
pi@homeserver:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.8 (stretch)
Release: 9.8
Codename: stretch
pi@homeserver:~ $
@WoodyAtHome what is your output when running uname -s?
pi@homeserver:~ $ uname -s
Linux
I got it working on my pi and will create a PR to update the makefile soonish.
Is there a full blogpost or tutorial somewhere with instructions to compille pony on an raspberry pi for beginners?
@nfuhs not at this time. what do you imagine would be a blog post beyond the sort of directions that are the repo README where the installation instructions are?
The installation instructions at https://github.com/ponylang/ponyc/blob/master/README.md#building-pony-on-non-x86-platforms are just a stub in my opinio.
I tried to run make on my raspi but only got an error message, I bet its my fault not setting up llvm to the right version
pi@raspberrypi:~/ponyc $ make default_pic=true
Building into build/release
messageq.c
cc: error: unrecognized argument in option '-mtune=generic'
cc: note: valid arguments to '-mtune=' are: arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a17 cortex-a17.cortex-a7 cortex-a32 cortex-a35 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a72 cortex-a72.cortex-a53 cortex-a8 cortex-a9 cortex-m0 cortex-m0.small-multiply cortex-m0plus cortex-m0plus.small-multiply cortex-m1 cortex-m1.small-multiply cortex-m3 cortex-m4 cortex-m7 cortex-r4 cortex-r4f cortex-r5 cortex-r7 cortex-r8 ep9312 exynos-m1 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native qdf24xx strongarm strongarm110 strongarm1100 strongarm1110 xgene1 xscale
Makefile:886: recipe for target 'build/release/obj-native/libponyrt/actor/messageq.o' failed
make: *** [build/release/obj-native/libponyrt/actor/messageq.o] Error 1
It would be nice if there are more details in the README howto setup llvm on Raspbian with the right version followed by the right make command.
Any update on this?
I can successfully build on raspbian stretch on a raspberry pi zero w, but any program I compile just says: Illegal instruction
@patches11 No one that I am aware of has access to the necessary hardware. A fix would need to come from someone with the environment who can debug it. Sounds like you are having a different issue however as you can build.
@patches11 can you verify that this is an ARM6? ARM6 is currently broken.
@aturley yes it was a Raspberry Pi Zero which uses the same SoC as the original Raspberry Pi the ARM1176JZF-S
I actually have a working ARMv6 branch just disabling the ASM, and I tried the update the ASM for ARMv6 based on some feedback, but didn't get it working, probably due to me not knowing ASM.
I will try to get my attempt together and comment on the new ARMv6 support issue when I get a chance