Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running through Docker #134

Closed
virgildotcodes opened this issue Oct 6, 2022 · 11 comments
Closed

Error when running through Docker #134

virgildotcodes opened this issue Oct 6, 2022 · 11 comments

Comments

@virgildotcodes
Copy link

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
Copy link
Owner

mame commented Oct 6, 2022

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
Copy link
Author

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
Copy link
Owner

mame commented Oct 6, 2022

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 😢 Are you using Rosetta2?

@virgildotcodes
Copy link
Author

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
Copy link
Owner

mame commented Oct 7, 2022

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
Copy link
Author

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
Copy link

janfilips commented Oct 7, 2022 via email

@janfilips
Copy link

janfilips commented Oct 7, 2022 via email

@mame
Copy link
Owner

mame commented Nov 1, 2023

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.

@mame mame closed this as completed Nov 1, 2023
@janfilips
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants