Open LinqLover opened 3 years ago
I would not expect an x64 binary to run on arm
Can you elaborate on that, please? I thought aarch64 would be a 64-bit system. Getting the same error with linux32x86
...
The Pi is an ARM system, not an Intel system. It runs with the ARM 64-bit instruction set, called aarch64
.
The VM you have is for "intel" 64-bit, aka x64
, or x86_64
or amd64
and so on.
The VN is not for your processor. you need to download the ARM variant ( “Linux (ARM)” in the Screenshot )
Note that you probably need some libraries, too, because the VM is for the Raspberry-Pi 2 and 3 compatible ARMv6 instruction set (which is a 32-bit one) so you might need some multi-arch support in ubuntu.
The respective names in the repo are linux64ARMv8
, linux32ARMv7
, and build.linux32ARMv6
.
(we do not have auto-built VMs for the 64ARMv8 yet, so you might need to compile it yourself if you want to use that)
I have tried my luck now with squeak.cog.spur_linux32ARMv6_202003021730
, but I keep getting the same error message. A docker container will always use the same architecture/bitness as the host system, won't it?
I am a bit confused: From my Windows Subsystem for Linux (x64), I am used to seeing some kind of "cannot execute binary file: Exec format error" messages if I run a 32-bit application so the bitness does not match. Why don't I see errors like this in my docker container? It looks as if the VM executable itself can be run.
Note that you probably need some libraries, too, because the VM is for the Raspberry-Pi 2 and 3 compatible ARMv6 instruction set (which is a 32-bit one) so you might need some multi-arch support in ubuntu.
Can you give me a pointer on how to find these libraries?
I also tried to compile linux64ARMv8
manually, but how can I cross-compile this from my Intel x64 Ubuntu system? The mvm script terminates with: "configure: error: C compiler cannot create executables" and config.log
contains "cc1: error: bad value ('armv8-a') for '-march=' switch". The internet says I should use aarch64-linux-gnu-gcc
or arm-linux-gnueabi-gcc
(not sure which) instead of gcc
, but how can I tell mvm to use this? 🤯
ARM64 VM works just fine on suitable Raspberry Pi's. And indeed on a suitable phone.
Outside of simply connecting to a few docker-like containers I have no knowledge that would help with docker details, but...
On 2020-12-30, at 9:44 AM, Christoph Thiede notifications@github.com wrote:
I also tried to compile linux64ARMv8 manually, but how can I cross-compile this from my Intel x64 Ubuntu system?
Why on earth would you do that? why go to all the trouble of messing with cross-compiler setups (which will certainly involve you getting cross) when you can just do it on the actual machine? It takes a whole couple of minutes to compile on a Pi 4 for example.
Do the stuff to mount your git related directory tree to the Pi, run a terminal on the Pi, cd to the right build directory and go.
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bo***x" said Pooh when Piglet kneed him in the groin.
Thanks for the help, Tim!
Why on earth would you do that?
I didn't want to pollute my raspi with that compilation stuff ... However, now I did it (also thanks to the help by Bruce) and succeeded to compile!
Next problem:
root@96fa02af4449:/# /bin/squeak/squeak /image/Squeak6.0alpha-20135-64bit.image -headless
mprotect(x,y,PROT_READ | PROT_EXEC): Permission denied
Segmentation fault (core dumped)
You mentioned the same problem here, but above you write that "ARM64 VM works just fine on suitable Raspberry Pi's". Could you resolve the problem in the mean time, or did you find another workaround? :-)
On 2020-12-30, at 4:45 PM, Christoph Thiede notifications@github.com wrote:
Thanks for the help, Tim!
Why on earth would you do that?
I didn't want to pollute my raspi with that compilation stuff ... However, now I did it (also thanks to the help by Bruce) and succeeded to compile!
But all the compiler/tools stuff is already there. Remember, this is a full development workstation with more power than we fantasised about not so long ago.
Next problem:
root@96fa02af4449:/# /bin/squeak/squeak /image/Squeak6.0alpha-20135-64bit.image -headless mprotect(x,y,PROT_READ | PROT_EXEC): Permission denied Segmentation fault (core dumped)
install libevdev seems to fix it.
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Teflon brain -- nothing sticks.
But all the compiler/tools stuff is already there. Remember, this is a full development workstation with more power than we fantasised about not so long ago.
True :D
install libevdev seems to fix it.
Which one are you referring to?
root@96fa02af4449:/# apt search libevdev
Sorting... Done
Full Text Search... Done
libevdev-dev/focal-updates 1.9.0+dfsg-1ubuntu0.1 arm64
wrapper library for evdev devices - development files
libevdev-doc/focal-updates 1.9.0+dfsg-1ubuntu0.1 all
wrapper library for evdev devices - development docs
libevdev-tools/focal-updates 1.9.0+dfsg-1ubuntu0.1 arm64
wrapper library for evdev devices - tools
libevdev2/focal-updates 1.9.0+dfsg-1ubuntu0.1 arm64
wrapper library for evdev devices
On 2020-12-30, at 5:00 PM, Christoph Thiede notifications@github.com wrote:
But all the compiler/tools stuff is already there. Remember, this is a full development workstation with more power than we fantasised about not so long ago.
True :D
install libevdev seems to fix it.
Which one are you referring to?
Sorry - libevdev-dev - which may be the most redundantly redundant library name I've redundantly seen repeated.
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- MERCI RIEN - Thanks for nothin'.
I have tried that and built the VM again, but I keep getting the same mprotect error message :( Any other ideas?
Hi all,
thanks a lot for your help. In the meantime, I have finally been able to succeed in the entire build process. Because it was a quite costly setup, I have summarized all relevant docker files and build scripts in this repository:
https://github.com/LinqLover/squeak-raspi-docker
Please feel free to add your suggestions for improvements or to share this link! :-)
Happy Squeaking, Christoph
Sorry for the complex title. I'm not yet sure what is the error in my particular configuration.
I'm trying to write a Dockerfile to run Squeak on my raspberry pi (4b+, set up with 64 bit). I downloaded this release:
squeak.cog.spur_linux64x64_202003021730
and tried to execute it without any arguments for the beginning:What does this error message want to tell me? Which libraries should I install? I already gave this [https://github.com/pharo-project/pharo-launcher/issues/112] a try, but I only get 404 errors for i386 repository - it looks as if it is not available for Ubuntu 20.
Can you help me? What libraries and packages do I need to install to get a (headful, planning to use
ssh -X
) running in my container?(PS: Probably a Squeak alternative for http://get.pharo.org/ could be helpful, too. :-))