mame / quine-relay

An uroboros program with 100+ programming languages
13.94k stars 554 forks source link

Error when running through Docker #134

Closed virgildotcodes closed 11 months ago

virgildotcodes commented 1 year ago

Hello, I followed the instructions on building and running through Docker and encountered the following error:

################################
##  7: Shakespeare -> S-Lang  ##
################################

./vendor/local/bin/spl2c < QR.spl > QR.spl.c
gcc -z muldefs -o QR -I ./vendor/local/include -L ./vendor/local/lib QR.spl.c -lspl -lm
./QR > QR.sl

Runtime error at line 8: Ambiguous use of second person pronoun. There are more than two characters on stage!
make: *** [Makefile:97: QR.sl] Error 1
make: *** Deleting file 'QR.sl'

Just in case it's relevant, I'm running Docker Desktop 4.12.0 on MacOS 12.6.

mame commented 1 year ago

It works for me with Docker Desktop 4.12.0 on MacOS 12.6 (Intel CPU). Could you please upload your QR.spl, QR.sed and QR.sci to gist or somewhere? (FYI you can see the expected files here: https://github.com/mame/quine-relay/tree/spoiler)

virgildotcodes commented 1 year ago

I've gone ahead and uploaded those files to the following gist - https://gist.github.com/virgildotcodes/92ea1b1fca0d001e8dd094125b15d9ba

I did forget to mention that I'm on Apple Silicon.

mame commented 1 year ago

Thanks. QR.spl seems to be generated correctly. So spl2c is not working well. Because I don't have an M1 Mac, I have no way to debug it :cry: Are you using Rosetta2?

virgildotcodes commented 1 year ago

No problem! I do have Rosetta 2 installed, but as far as I can tell, all the Docker processes are running natively, so I don't believe it's running through Rosetta (I could be wrong on this).

Screen Shot 2022-10-06 at 12 08 22 PM
mame commented 1 year ago

Right now quine-relay only works on x86_64. I am not sure if this very problem is caused by arm, but there are other languages that don't work with arm. I wonder if it would work with Rosetta2 using the x86_64 docker image.

virgildotcodes commented 1 year ago

Hmm, after some googling, I just tried running it with the added parameter --platform linux/amd64 but I got the same error.

If you know of another way to run it through Rosetta I'd happily report back the results.

The full command I'm using for reference:

docker run --privileged --platform linux/amd64 --rm -e CI=true -v $(pwd):/usr/local/share/quine-relay -v /usr/local/share/quine-relay/vendor qr

janfilips commented 1 year ago

This thing is .. I am lost for words.

It's a work of art!

On Fri, Oct 7, 2022 at 10:22 PM Virgil Nilson @.***> wrote:

Hmm, after some googling, I just tried running it with the added parameter --platform linux/amd64 but I got the same error.

If you know of another way to run it through Rosetta I'd happily report back the results.

The full command I'm using for reference:

docker run --privileged --platform linux/amd64 --rm -e CI=true -v $(pwd):/usr/local/share/quine-relay -v /usr/local/share/quine-relay/vendor qr

— Reply to this email directly, view it on GitHub https://github.com/mame/quine-relay/issues/134#issuecomment-1271735897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUSK3S5SXO7GMX6OX4DWDWCA523ANCNFSM6AAAAAAQ6QJTKY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

janfilips commented 1 year ago

And a crazy one at that! Impossible. Wow!

On Sat, Oct 8, 2022 at 1:12 AM Jan Filips @.***> wrote:

This thing is .. I am lost for words.

It's a work of art!

On Fri, Oct 7, 2022 at 10:22 PM Virgil Nilson @.***> wrote:

Hmm, after some googling, I just tried running it with the added parameter --platform linux/amd64 but I got the same error.

If you know of another way to run it through Rosetta I'd happily report back the results.

The full command I'm using for reference:

docker run --privileged --platform linux/amd64 --rm -e CI=true -v $(pwd):/usr/local/share/quine-relay -v /usr/local/share/quine-relay/vendor qr

— Reply to this email directly, view it on GitHub https://github.com/mame/quine-relay/issues/134#issuecomment-1271735897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUSK3S5SXO7GMX6OX4DWDWCA523ANCNFSM6AAAAAAQ6QJTKY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mame commented 11 months ago

I don't plan on getting Arm's macOS, so it is difficult for me to debug this issue. Please let me close this issue for now. If someone has a reproduction environment, investigate and fix the issue, and send a PR, I will consider it.

janfilips commented 11 months ago

The solution is super simple actually. In your Docker (on MacOS) go to settings and enable the "Use Rosseta for x86/amd64 emulation" .. job done.

janfilips commented 11 months ago

This project is completely mind-bending, I give you that.