[Vm-dev] Small problem compiling stackspur vm on phone

Eliot Miranda eliot.miranda at gmail.com
Sun Jan 3 06:21:17 UTC 2021


Thanks Tim.  Fixing this now...

On Thu, Dec 31, 2020 at 3:52 PM tim Rowledge <tim at rowledge.org> wrote:

>
> For reasons I've been trying to compile a vm to run on an ubuntu container
> running on a samsung galaxy 7phone. I know, right? Who'd want an Android
> phone? Nasty tacky OS.
>
> Anyway, the cog vm compiles and happily starts with '-h' ... but any
> attempt to open on an image crashes with a very unhelpful
> Illegal Instruction
> and no crash file or any other help. I'll get around to trying a debug
> version some day.
>
> In the meantime the stack VM was a bit interesting to compile. It hits a
> fatal link error because sqUnixMain wants to refer to sendTrace from the
> interp.c file. It lists a very strange error
>
> opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:1561:(.text+0x2744):
> relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
> `sendTrace' defined in COMMON section in vm/vm.a(gcc3x-interp.o)
> /root/opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:1561: warning: One
> possible cause of this error is that the symbol is being referenced in the
> indicated code as if it had a larger alignment than was declared where it
> was defined.
> collect2: error: ld returned 1 exit status
>
> The google results for 'relocation truncated to fit' are ... interesting.
> If, that is, you want to know inner arcane details of C compilation. Which
> I don't, anymore.
>
> A successful work-around is to comment out the lines
> #if (STACKVM || NewspeakVM) && !COGVM
>   else if (!strcmp(argv[0], VMOPTION("sendtrace"))) { extern sqInt
> sendTrace; sendTrace = 1; return 1; }
> #endif
> in sqUnix.c
>
> Oh - the phone runs that VM and manages about  85 MBC/s & 5MSend/s which
> suggest roughly Pi 3 performance, so it should be ok once Cog runs.
>
> Happy new year all - let's hope 20/20 vision is an improvement.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> The gains I make don't make me a hero; all the work I do is just to get
> back to Zero
>
>

-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210102/968cee05/attachment.html>


More information about the Vm-dev mailing list