Anyone have experience with cosmonim?
I follow the hello world tutorial in their README.md and get this result.
bash: ./hello.com: No such file or directory
I've even tried bash -c "./hello.com" Initially I was having a problem where wine was being implicitly invoked and the executable would run, so I uninstalled wine to prevent sly invocation.
Yes, and thanks for cosmonim! Cool idea.
$ git clone https://github.com/Yardanico/cosmonim
$ cd cosmonim
$ curl -o cosmo.zip https://justine.lol/cosmopolitan/cosmopolitan.zip
$ unzip -d cosmopolitan cosmo.zip
$ nim c -d:danger --opt:size -o:hello.elf hello.nim
$ objcopy -SO binary hello.elf hello.com
$ ./hello.com
bash: ./hello.com: No such file or directory
$ ls -la hello.com
-rwxrwxr-x 1 84K hello.com
$ mv nim.cfg old.nim.cfg
$ nim r hello.nim
Hello, world!
hellohere
nim | 1.5.1 |
gcc | 10.2.0 |
glibc | 2.31 |
bash | 5.1.4(1) |
Progress! Thanks - that helped me excise Wine. Now when running hello.com I get the standard linux error. The elf predictably runs fine.
bash: ./hello.com: cannot execute binary file: Exec format error
And now I'm actually stumped.@Yardanico I'm still poking at this - do you have any compiler insights as to how I could introspect why this isn't working on a particular linux distribution?
https://stackoverflow.com/questions/67665566/how-to-cosmonim-gcc-on-solus-linux-segfault