cartesi / machine-emulator

The off-chain implementation of the Cartesi Machine
GNU Lesser General Public License v3.0
58 stars 32 forks source link

Getting the thing to run from source, following instructions #238

Open zdanl opened 2 months ago

zdanl commented 2 months ago

Simply trying to follow the build instructions here.

Getting this weirdness.

Step 1/9 : FROM --platform=$TARGETPLATFORM cartesi/toolchain:0.17.0-rv64ima-lp64 as linux-env
failed to parse platform : "" is an invalid component of "": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
make[4]: *** [Makefile:262: build-linux-env] Error 1
make[4]: Leaving directory '/root/machine-emulator'
make[3]: *** [Makefile:295: check-linux-env] Error 2
make[3]: Leaving directory '/root/machine-emulator'
make[2]: *** [Makefile:323: uarch-with-linux-env] Error 2

Someone help me out? Tried export TARGETPLATFORM=x86_64 but ignored

zdanl commented 2 months ago

well. i did ARG TARGETPLATFORM=x86_64 in Dockerfile and it seems to eat it

zdanl commented 2 months ago

We also seem to be missing apt install apparmor apparmor-utils in instructions

zdanl commented 2 months ago

Running make build-tests-all gives me another weird error.

build/images/rootfs-tools-v0.15.0.ext2: OK
/usr/local/bin/lua5.4 ./lua/create-machines.lua
/usr/local/bin/lua5.4: ./lua/create-machines.lua:142: unexpected symbol near '<'
make[1]: *** [Makefile:176: /root/machine-emulator/tests/build/cmio] Error 1
make[1]: Leaving directory '/root/machine-emulator/tests'
make: *** [Makefile:239: build-tests-all] Error 2
zdanl commented 2 months ago

I don't want to be an annoyance, but this is beyond me. Build complete, Lua instructions followed.

root@isrupin32:~/machine-emulator# cartesi-machine
lua5.4: /usr/local/share/lua/5.4/cartesi-machine.lua:572: unexpected symbol near '<'
root@isrupin32:~/machine-emulator#

This is the line in question

local ram_length = 128 << 20 -- 128MB
zdanl commented 2 months ago
Screenshot 2024-05-06 at 00 03 10
zdanl commented 2 months ago

FYI sudo update-alternatives --install /usr/bin/lua lua-interpreter /usr/bin/lua5.4 130 \ is required to fix it

zdanl commented 2 months ago

There seems to be a problem with

install: cannot stat '/root/machine-emulator/uarch/uarch-ram.bin': No such file or directory
make: *** [Makefile:365: install-uarch] Error 1

Despite all efforts, the file exists, but can not be found.