oc2 icon indicating copy to clipboard operation
oc2 copied to clipboard

Run c/c++ compiled files and package manager

Open Stargate256 opened this issue 2 years ago • 12 comments

Hi, i think it'd be cool if oc2 computers could run c++ aplications and havning a package manager to install things like gcc.

Stargate256 avatar Dec 10 '22 21:12 Stargate256

There are no plan for PM AFAIK but you can cross compile programs for RISC-V and transfer them in

atirut-w avatar Dec 11 '22 03:12 atirut-w

OC2 computers already can run any binaries that were compiled for RISC-V architecture (You can check this website for musl toolchain, if you want to build programs on C/C++).

radyshenkya avatar Jan 03 '23 09:01 radyshenkya

a package manager would require real internet, which isnt implemented yet.

also gcc wouldn't fit into 8 MB

Un1q32 avatar Feb 26 '23 23:02 Un1q32

gcc wouldn't fit into 8 MB

how big is gcc again?

atirut-w avatar Feb 27 '23 01:02 atirut-w

https://pkgs.alpinelinux.org/package/edge/main/riscv64/gcc

the alpine linux riscv64 gcc package (does not include g++ or support for any other languages besides C) is 70.89 MB

Un1q32 avatar Feb 27 '23 02:02 Un1q32

https://pkgs.alpinelinux.org/package/edge/main/riscv64/g++

adding g++ for C++ support would add an extra 20.55 MB

Un1q32 avatar Feb 27 '23 02:02 Un1q32

compiling will be very slow. if you really want to run c/c++ it will be best to just cross compile and transfer the files using the export/import card

spike11302000 avatar Feb 27 '23 04:02 spike11302000

it should be noted that the file import/export card corrupts data

Un1q32 avatar Feb 27 '23 05:02 Un1q32

its a bug, not intentional, someone made a python implementation that doesn't corrupt data but i dont think they released it, just mentioned that they did so its not the api, its the lua program

Un1q32 avatar Feb 27 '23 06:02 Un1q32

nevermind they did release it https://gist.githubusercontent.com/ToMe25/87926996d7775cf273b6346ea19ac529/raw/182fdaed90b47783c87fbdd0e18b9b8108526b19/import.py

Un1q32 avatar Feb 27 '23 06:02 Un1q32

there is also the Coverett library which adds a program thats meant to replace the stock import/export lua program. the library also has binding for the hlapi for you can make c/c++ programs that can interact with peripherals

spike11302000 avatar Feb 27 '23 11:02 spike11302000

there is also the Coverett library which adds a program thats meant to replace the stock import/export lua program. the library also has binding for the hlapi for you can make c/c++ programs that can interact with peripherals

i heard that also corrupts data sometimes

Un1q32 avatar Feb 27 '23 18:02 Un1q32