Open johndzxu opened 2 years ago
Hi, this might depend on the version of ubuntu but you should be able to get the curses.h include by installing libncurses5-dev
sudo apt install libncurses5-dev
After that you should be able to cd to the skill folder and run ./requirements.sh
and it should build the zork interpreter.
I get this error running ./requirements.sh
Can you please tell me which version of Ubuntu you're running? I might need to test this with your version to see what is going on (since it works on my Ubuntu 20.04 without issue).
One thing you can try is to cd to the frotz folder in the skill and run
make clean
make dumb
To make sure that an earlier failed build isn't causing issues.
I'm running Ubuntu 21.10.
And unfortunately the same error happened after make clean
.
I'll try to install it in a virtual box and see if I can replicate.
If you'd like to try something You can try cloning https://gitlab.com/DavidGriffith/frotz and doing a make dumb
install of that to see if the latest version of it works. Alternatively remove the skill and try to reinstall it from scratch in case some weird state has been stored.
I've managed to install ubuntu in a virtual machine and there is a bug in the frotz code causing an issue on newer gcc-versions. I'll see if I can fix it tonight after work.
Edit: seems to be fixed in the new frotz gitlab-repo so should be quick
I've pushed the update. try doing git pull
in the skill folder followed by running ./requirements.sh
and let me know if that works for you.
Hi forslund!
First of all thank you for making this game available on Mycroft!
I was trying to play and got the same problem on Ubuntu 22.04. I tried git pull on the folder, make clean, make dumb, but when I run .requirements.sh I still get an error:
./requirements.sh
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
Linking dfrotz...
gcc -o dfrotz src/frotz_common.a src/frotz_dumb.a src/blorblib.a -L/opt/local/lib
/usr/bin/ld: src/frotz_dumb.a(dumb_input.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_input.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_input.c:24: multiple definition of `f_setup'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_init.c:26: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_output.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_output.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_output.c:24: multiple definition of `f_setup'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_init.c:26: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_pic.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_pic.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_pic.c:24: multiple definition of `f_setup'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_init.c:26: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_blorb.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/frotz_dumb.a(dumb_blorb.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_blorb.c:33: multiple definition of `f_setup'; src/frotz_dumb.a(dumb_init.o):/home/chibiai/mycroft-core/skills/game-zork.forslund/frotz/src/dumb/dumb_init.c:26: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:185: dfrotz] Error 1
Please let me know if I can help you debug it.
Best,
Thanks for the detailed bug-report @judicandus , it looks like the requirements.sh fails to update to the new repository. I might need to add a check in requirements.sh to handle the switchover. (or handle it in a different manner)
Can you try to remove the frotz-subfolder? and re-run the requirements.sh script and see if the install works from a blank slate?
Hi Forslund!
Thank you for getting back to me. It still didn't work. I ran as you requested but got the below error:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills$ cd game-zork.forslund/
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ls
dialog __init__.py __pycache__ requirements.sh vocab
frotz LICENSE README.md test zork.py
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ rm -rf frotz/
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ./requirements.sh
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
make: *** No rule to make target 'dfrotz'. Stop.
I took the liberty to try with sudo as well in case it was a permissions problem and got the same error:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ sudo ./requirements.sh
./requirements.sh: 1: Bad substitution
fatal: unsafe repository ('/opt/mycroft/skills/game-zork.forslund' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /opt/mycroft/skills/game-zork.forslund
./requirements.sh: 6: cd: can't cd to frotz
make: *** No rule to make target 'dfrotz'. Stop.
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ sudo git config --global --add safe.directory /opt/mycroft/skills/game-zork.forslund
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ sudo ./requirements.sh
./requirements.sh: 1: Bad substitution
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
make: *** No rule to make target 'dfrotz'. Stop.
Hmm, looks like there are two problems there. The bad substitution may be one issue and the other may be a trust issue. https://github.blog/2022-04-12-git-security-vulnerability-announced/
Is chibiai the user that owns the game-zork.forslund folder?
I'll upgrade my test setup so it include git >= 2.32.2 to see if I can replicate the issue
I have only one user on this machine (chibiai). I did ownership check just in case but it is the owner of the folder:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills$ ls -l
total 124
drwxrwxr-x 6 chibiai chibiai 4096 6月 30 11:36 fallback-query.mycroftai
drwxrwxr-x 5 chibiai chibiai 4096 7月 1 19:47 fallback-recommendations-skill.linuss1
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 fallback-unknown.mycroftai
drwxrwxr-x 9 chibiai chibiai 4096 6月 30 11:36 fallback-wolfram-alpha.mycroftai
drwxrwxr-x 8 chibiai chibiai 4096 7月 5 10:18 game-zork.forslund
drwxrwxr-x 7 chibiai chibiai 4096 7月 1 19:48 iss-tracker.andlo
drwxrwxr-x 12 chibiai chibiai 4096 6月 30 11:36 mycroft-alarm.mycroftai
drwxrwxr-x 6 chibiai chibiai 4096 6月 30 11:36 mycroft-audio-record.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-configuration.mycroftai
drwxrwxr-x 9 chibiai chibiai 4096 6月 30 11:36 mycroft-date-time.mycroftai
drwxrwxr-x 8 chibiai chibiai 4096 6月 30 11:36 mycroft-fallback-duck-duck-go.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-hello-world.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-installer.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-ip.mycroftai
drwxrwxr-x 6 chibiai chibiai 4096 6月 30 11:36 mycroft-joke.mycroftai
drwxrwxr-x 8 chibiai chibiai 4096 6月 30 11:36 mycroft-naptime.mycroftai
drwxrwxr-x 9 chibiai chibiai 4096 6月 30 11:36 mycroft-npr-news.mycroftai
drwxrwxr-x 8 chibiai chibiai 4096 6月 30 11:34 mycroft-pairing.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-personal.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-playback-control.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-reminder.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-singing.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-speak.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-spelling.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-stop.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-support-helper.mycroftai
drwxrwxr-x 9 chibiai chibiai 4096 6月 30 11:36 mycroft-timer.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:36 mycroft-version-checker.mycroftai
drwxrwxr-x 7 chibiai chibiai 4096 6月 30 11:34 mycroft-volume.mycroftai
drwxrwxr-x 8 chibiai chibiai 4096 6月 30 11:36 mycroft-weather.mycroftai
drwxrwxr-x 9 chibiai chibiai 4096 6月 30 11:36 mycroft-wiki.mycroftai
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills$
I saw in that the new frotz folder is pointed to https://github.com/DavidGriffith/frotz . So I tried download the files and extracted to the skill's frotz folder (which for some reason was owner by root so I changed ownership) and ran requirements again. Still an error is coming up. See history below:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ls -l
total 72
drwxrwxr-x 19 chibiai chibiai 4096 7月 1 19:49 dialog
drwxr-xr-x 2 root root 4096 7月 5 10:18 frotz
-rw-rw-r-- 1 chibiai chibiai 2857 7月 1 19:49 __init__.py
-rw-rw-r-- 1 chibiai chibiai 35149 7月 1 19:49 LICENSE
drwxrwxr-x 2 chibiai chibiai 4096 7月 1 19:49 __pycache__
-rw-rw-r-- 1 chibiai chibiai 967 7月 1 19:49 README.md
-rwxrwxr-x 1 chibiai chibiai 141 7月 2 09:12 requirements.sh
drwxrwxr-x 4 chibiai chibiai 4096 7月 1 19:49 test
drwxrwxr-x 19 chibiai chibiai 4096 7月 1 19:49 vocab
-rw-rw-r-- 1 chibiai chibiai 3702 7月 1 19:49 zork.py
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ chown chibiai frotz/
chown: changing ownership of 'frotz/': Operation not permitted
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ sudo chown chibiai frotz/
[sudo] password for chibiai:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ls -l
total 72
drwxrwxr-x 19 chibiai chibiai 4096 7月 1 19:49 dialog
drwxr-xr-x 2 chibiai root 4096 7月 5 10:18 frotz
-rw-rw-r-- 1 chibiai chibiai 2857 7月 1 19:49 __init__.py
-rw-rw-r-- 1 chibiai chibiai 35149 7月 1 19:49 LICENSE
drwxrwxr-x 2 chibiai chibiai 4096 7月 1 19:49 __pycache__
-rw-rw-r-- 1 chibiai chibiai 967 7月 1 19:49 README.md
-rwxrwxr-x 1 chibiai chibiai 141 7月 2 09:12 requirements.sh
drwxrwxr-x 4 chibiai chibiai 4096 7月 1 19:49 test
drwxrwxr-x 19 chibiai chibiai 4096 7月 1 19:49 vocab
-rw-rw-r-- 1 chibiai chibiai 3702 7月 1 19:49 zork.py
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ls
dialog __init__.py __pycache__ requirements.sh vocab
frotz LICENSE README.md test zork.py
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ./requirements.sh
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
make: *** No rule to make target 'dfrotz'. Stop.
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$ ./requirements.sh
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
Generating src/common/version.c
Creating src/common/git_hash.h
make -C src/common
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/common'
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o buffer.o -c buffer.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o err.o -c err.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o fastmem.o -c fastmem.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o files.o -c files.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o getopt.o -c getopt.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o hotkey.o -c hotkey.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o input.o -c input.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o main.o -c main.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o math.o -c math.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o object.o -c object.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o process.o -c process.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o quetzal.o -c quetzal.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o random.o -c random.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o redirect.o -c redirect.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o screen.o -c screen.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o sound.o -c sound.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o stream.o -c stream.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o table.o -c table.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o text.o -c text.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o variable.o -c variable.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o version.o -c version.c
ar rc frotz_common.a buffer.o err.o fastmem.o files.o getopt.o hotkey.o input.o main.o math.o object.o process.o quetzal.o random.o redirect.o screen.o sound.o stream.o table.o text.o variable.o version.o
ranlib frotz_common.a
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/common'
make -C src/dumb
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb'
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o dumb_blorb.o -c dumb_blorb.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o dumb_init.o -c dumb_init.c
dumb_init.c: In function ‘os_process_arguments’:
dumb_init.c:158:7: warning: ‘strncat’ specified bound 4 equals source length [-Wstringop-overflow=]
158 | strncat(f_setup.save_name, EXT_SAVE, strlen(EXT_SAVE));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dumb_init.c:167:5: warning: ‘strncat’ specified bound 4 equals source length [-Wstringop-overflow=]
167 | strncat(f_setup.script_name, EXT_SCRIPT, strlen(EXT_SCRIPT));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dumb_init.c:171:5: warning: ‘strncat’ specified bound 4 equals source length [-Wstringop-overflow=]
171 | strncat(f_setup.command_name, EXT_COMMAND, strlen(EXT_COMMAND));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o dumb_input.o -c dumb_input.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o dumb_output.o -c dumb_output.c
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o dumb_pic.o -c dumb_pic.c
ar rc frotz_dumb.a dumb_blorb.o dumb_init.o dumb_input.o dumb_output.o dumb_pic.o
ranlib frotz_dumb.a
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb'
make -C src/blorb
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/blorb'
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include -fPIC -fpic -o blorblib.o -c blorblib.c
ar rc blorblib.a blorblib.o
ranlib blorblib.a
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/blorb'
cc -Wall -std=c99 -D_POSIX_C_SOURCE=200809L -g -I/usr/local/include src/common/frotz_common.a src/dumb/frotz_dumb.a src/blorb/blorblib.a src/common/frotz_common.a -o dfrotz
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_init.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_init.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_init.c:26: multiple definition of `f_setup'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_blorb.c:33: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_input.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_input.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_input.c:26: multiple definition of `f_setup'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_blorb.c:33: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_output.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_output.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_output.c:24: multiple definition of `f_setup'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_blorb.c:33: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_pic.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: multiple definition of `do_more_prompts'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_frotz.h:20: first defined here
/usr/bin/ld: src/dumb/frotz_dumb.a(dumb_pic.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_pic.c:24: multiple definition of `f_setup'; src/dumb/frotz_dumb.a(dumb_blorb.o):/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb/dumb_blorb.c:33: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:159: dfrotz] Error 1
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills/game-zork.forslund$
Trying to run Zork with Mycroft still gives same error:
~~~~:on_error:923 | An error occurred while processing a request in Zork Skill
Traceback (most recent call last):
~~~~core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
handler(message)
~~~~/opt/mycroft/skills/game-zork.forslund/__init__.py", line 30, in play_zork
self.zork = ZorkInterpreter(self.interpreter,
File "/opt/mycroft/skills/game-zork.forslund/zork.py", line 19, in __init__
self.zork = subprocess.Popen([self.interpreter, self.data],
File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
~~~~h file or directory: '/opt/mycroft/skills/game-zork.forslund/frotz/dfrotz'
~~~~INFO | 2972 | __main__:handle_utterance:76 | Utterance: ['play zork']
Regarding the error:
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
I found a similar problem: https://stackoverflow.com/questions/71369472/error-fatal-fetched-in-submodule-path-repository-name-but-it-did-not-contai
I also tried configuring git: git config fetch.recurseSubmodules false , according to website below, but problem persists equally: https://stackoverflow.com/questions/71330668/fatal-remote-error-upload-pack-not-our-ref
Looking at the permissions it looks a bit like you've run some parts as root (requirements.sh)? which may account for the original issue.
fatal: remote error: upload-pack: not our ref 93fce70dc22fa73750b539c2b9cc1e95014ffaf2
fatal: Fetched in submodule path 'frotz', but it did not contain 93fce70dc22fa73750b539c2b9cc1e95014ffaf2. Direct fetching of that commit failed.
fatal:
Is likely due to the manual install of frotz from a download.
And since the frotz install failed it won't work. which frotz master did you use? It looks like it's the one on github which is outdated and won't work. This link should(TM) work: https://gitlab.com/DavidGriffith/frotz/-/archive/93fce70dc22fa73750b539c2b9cc1e95014ffaf2/frotz-93fce70dc22fa73750b539c2b9cc1e95014ffaf2.tar.gz
I think I'll try switching to doing the download instead of using a git submodule.
Another option for you to try is to
Remove the skill folder completely:
rm -rf /opt/mycroft/skills/game-zork.forslund
Then in the mycroft-core folder run
./bin/mycroft-msm -l game-zork
This should install the latest version including the latest submodule path in one go. This should be the cleanest way to install and would only use the current user with no risk of running as root.
It worked! I just tried and the game is working!
For reference, I stopped mycroft and ran:
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills$ rm -rf /opt/mycroft/skills/game-zork.forslund/
chibiai@chibiai-23-k000ibr:~/mycroft-core/skills$ cd ..
chibiai@chibiai-23-k000ibr:~/mycroft-core$ ./bin/mycroft-msm -l game-zork
usage: msm [-h]
[-p {mycroft_mark_2,mycroft_mark_1,kde,mycroft_mark_2pi,default,picroft,respeaker}]
[-u REPO_URL] [-b REPO_BRANCH] [-d SKILLS_DIR] [-c REPO_CACHE] [-l]
[-r]
{install,remove,search,info,list,update,default} ...
msm: error: argument action: invalid choice: 'game-zork' (choose from 'install', 'remove', 'search', 'info', 'list', 'update', 'default')
chibiai@chibiai-23-k000ibr:~/mycroft-core$ ./bin/mycroft-msm -l install game-zork
INFO - building SkillEntry objects for all skills
INFO - Best match (1.0): game-zork by forslund
INFO - Downloading skill: https://github.com/forslund/white-house-adventure
Submodule 'frotz' (https://gitlab.com/DavidGriffith/frotz.git) registered for path 'frotz'
Cloning into '/opt/mycroft/skills/game-zork.forslund/frotz'...
Submodule path 'frotz': checked out '93fce70dc22fa73750b539c2b9cc1e95014ffaf2'
** Generating src/common/defs.h
** Generating src/common/hash.h
make -C src/common
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/common'
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o buffer.o -c buffer.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o err.o -c err.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o fastmem.o -c fastmem.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o files.o -c files.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o getopt.o -c getopt.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o hotkey.o -c hotkey.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o input.o -c input.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o main.o -c main.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o math.o -c math.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o missing.o -c missing.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o object.o -c object.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o process.o -c process.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o quetzal.o -c quetzal.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o random.o -c random.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o redirect.o -c redirect.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o screen.o -c screen.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o sound.o -c sound.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o stream.o -c stream.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o table.o -c table.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o text.o -c text.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o variable.o -c variable.c
ar rc frotz_common.a buffer.o err.o fastmem.o files.o getopt.o hotkey.o input.o main.o math.o missing.o object.o process.o quetzal.o random.o redirect.o screen.o sound.o stream.o table.o text.o variable.o
/usr/bin/ranlib frotz_common.a
** Done with Frotz core.
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/common'
make -C src/dumb
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb'
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o dblorb.o -c dblorb.c
dblorb.c: In function ‘isblorb’:
dblorb.c:149:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
149 | fread(mybuf, 1, 4, fp);
| ^~~~~~~~~~~~~~~~~~~~~~
dblorb.c:154:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
154 | fread(mybuf, 1, 4, fp);
| ^~~~~~~~~~~~~~~~~~~~~~
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o dinit.o -c dinit.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o dinput.o -c dinput.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o doutput.o -c doutput.c
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -fPIC -fpic -o dpic.o -c dpic.c
ar rc frotz_dumb.a dblorb.o dinit.o dinput.o doutput.o dpic.o
/usr/bin/ranlib frotz_dumb.a
** Done with dumb interface.
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/dumb'
make -C src/blorb
make[1]: Entering directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/blorb'
cc -Wall -std=c99 -O3 -g -D_POSIX_C_SOURCE=200809L -I../common -fPIC -fpic -o blorblib.o -c blorblib.c
ar rc blorblib.a blorblib.o
/usr/bin/ranlib blorblib.a
** Done with Blorb library.
make[1]: Leaving directory '/opt/mycroft/skills/game-zork.forslund/frotz/src/blorb'
cc src/common/frotz_common.a src/dumb/frotz_dumb.a src/blorb/blorblib.a src/common/frotz_common.a -o dfrotz
** Done building Frotz with dumb interface.
** Blorb support enabled
INFO - Successfully ran requirements.sh for game-zork
INFO - Installing system requirements...
INFO - Successfully installed game-zork
INFO - invalidating skills cache
Thank you for your time!
Whoops, left the install
part. Sorry. Glad the fresh install worked as expected! Thanks for the feedback, and have fun with the skill :)
I was having similar problems, and I tried removing the frotz folder and clone from gitlab, then run manually the make dumb and compiled well.. Now I can play zork with mycroft!
I can't get Zork to work for my Mycroft on my Ubuntu. Using the mycroft cli I can see that the error message is
No such file or directory: 'opt/mycroft/skills/game-zork.forslund/frotz/dfrotz'
. What should I do? I've tried to compile frotz withmake
but that results in the errorcurses.h: No such file or directory
.