microsoft / jericho

A learning environment for man-made Interactive Fiction games.
GNU General Public License v2.0
253 stars 42 forks source link

installation fails on Macos 14.4 #70

Closed lhk closed 2 months ago

lhk commented 2 months ago

I've cloned the repository, set up a fresh conda environment with python 3.12.3 and pip, then tried to install with pip install . This leads to the following error message:

pip install .
Processing /Users/lklein/Documents/programming/jericho
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [174 lines of output]
      rm -f src/*.h src/*.a
      rm -f src/libfrotz.so
      rm -f src/curses/defines.h
      rm -f frotz_python_interface/libfrotz.so
      find . -name *.o -exec rm -f {} \;
      find . -name *.O -exec rm -f {} \;
      #gcc -O3 -fPIC -o src/common/buffer.o -c src/common/buffer.c
      #gcc -O3 -fPIC -o src/common/err.o -c src/common/err.c
      #gcc -O3 -fPIC -o src/common/fastmem.o -c src/common/fastmem.c
      #gcc -O3 -fPIC -o src/common/files.o -c src/common/files.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/buffer.o -c src/common/buffer.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/files.o -c src/common/files.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/fastmem.o -c src/common/fastmem.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/err.o -c src/common/err.c
      #gcc -O3 -fPIC -o src/common/hotkey.o -c src/common/hotkey.c
      #gcc -O3 -fPIC -o src/common/input.o -c src/common/input.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/hotkey.o -c src/common/hotkey.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/input.o -c src/common/input.c
      #gcc -O3 -fPIC -o src/common/main.o -c src/common/main.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/main.o -c src/common/main.c
      #gcc -O3 -fPIC -o src/common/math.o -c src/common/math.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/math.o -c src/common/math.c
      #gcc -O3 -fPIC -o src/common/object.o -c src/common/object.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/object.o -c src/common/object.c
      #gcc -O3 -fPIC -o src/common/process.o -c src/common/process.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/process.o -c src/common/process.c
      #gcc -O3 -fPIC -o src/common/quetzal.o -c src/common/quetzal.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/quetzal.o -c src/common/quetzal.c
      #gcc -O3 -fPIC -o src/common/squetzal.o -c src/common/squetzal.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/squetzal.o -c src/common/squetzal.c
      #gcc -O3 -fPIC -o src/common/random.o -c src/common/random.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/random.o -c src/common/random.c
      #gcc -O3 -fPIC -o src/common/redirect.o -c src/common/redirect.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/redirect.o -c src/common/redirect.c
      #gcc -O3 -fPIC -o src/common/screen.o -c src/common/screen.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/screen.o -c src/common/screen.c
      #gcc -O3 -fPIC -o src/common/sound.o -c src/common/sound.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/sound.o -c src/common/sound.c
      #gcc -O3 -fPIC -o src/common/stream.o -c src/common/stream.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/stream.o -c src/common/stream.c
      #gcc -O3 -fPIC -o src/common/table.o -c src/common/table.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/table.o -c src/common/table.c
      src/common/sound.c:191:21: warning: passing arguments to 'os_stop_sample' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                  os_stop_sample (number);
                                 ^
      src/common/sound.c:194:28: warning: passing arguments to 'os_finish_with_sample' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                  os_finish_with_sample (number);
                                        ^
      2 warnings generated.
      #gcc -O3 -fPIC -o src/common/text.o -c src/common/text.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/text.o -c src/common/text.c
      #gcc -O3 -fPIC -o src/common/variable.o -c src/common/variable.c
      gcc -O3 -fPIC -I/opt/local/include -o src/common/variable.o -c src/common/variable.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/dumb/dumb_init.o -c src/dumb/dumb_init.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/dumb/dumb_input.o -c src/dumb/dumb_input.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/dumb/dumb_output.o -c src/dumb/dumb_output.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/dumb/dumb_pic.o -c src/dumb/dumb_pic.c
      src/dumb/dumb_input.c:152:39: warning: implicit conversion from 'int' to 'char' changes value from 142 to -114 [-Wconstant-conversion]
            case '0': *dest++ = ZC_FKEY_MIN + 9; break;
                              ~ ~~~~~~~~~~~~^~~
      src/dumb/dumb_input.c:207:43: warning: unused parameter 'prompt' [-Wunused-parameter]
      static bool dumb_read_line(char *s, char *prompt, bool show_cursor,
                                                ^
      src/dumb/dumb_output.c:156:36: warning: unused parameter 's' [-Wunused-parameter]
      void dumb_display_user_input(char *s)
                                         ^
      src/dumb/dumb_output.c:223:26: warning: unused parameter 'top' [-Wunused-parameter]
      void os_scroll_area (int top, int left, int bottom, int right, int units)
                               ^
      src/dumb/dumb_output.c:223:35: warning: unused parameter 'left' [-Wunused-parameter]
      void os_scroll_area (int top, int left, int bottom, int right, int units)
                                        ^
      src/dumb/dumb_output.c:223:45: warning: unused parameter 'bottom' [-Wunused-parameter]
      void os_scroll_area (int top, int left, int bottom, int right, int units)
                                                  ^
      src/dumb/dumb_output.c:223:57: warning: unused parameter 'right' [-Wunused-parameter]
      void os_scroll_area (int top, int left, int bottom, int right, int units)
                                                              ^
      src/dumb/dumb_output.c:223:68: warning: unused parameter 'units' [-Wunused-parameter]
      void os_scroll_area (int top, int left, int bottom, int right, int units)
                                                                         ^
      In file included from src/dumb/dumb_output.c:22:
      In file included from src/dumb/dumb_frotz.h:12:
      src/dumb/../common/frotz.h:792:7: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
      void    os_finish_with_sample ();
              ^
      src/dumb/dumb_output.c:438:6: note: conflicting prototype is here
      void os_finish_with_sample (int UNUSED (a)) {}
           ^
      In file included from src/dumb/dumb_output.c:22:
      In file included from src/dumb/dumb_frotz.h:12:
      src/dumb/../common/frotz.h:813:7: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
      void    os_stop_sample ();
              ^
      src/dumb/dumb_output.c:440:6: note: conflicting prototype is here
      void os_stop_sample (int UNUSED (a)) {}
           ^
      2 warnings generated.
      src/dumb/dumb_output.c:136:13: warning: unused function 'dumb_copy_cell' [-Wunused-function]
      static void dumb_copy_cell(int dest_row, int dest_col,
                  ^
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/dumb/dumb_blorb.o -c src/dumb/dumb_blorb.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/blorb/blorblib.o -c src/blorb/blorblib.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/ztools/infodump.o -c src/ztools/infodump.c
      gcc -Wall -Wextra -std=gnu99 -fPIC -Werror=implicit-function-declaration -O3 -fPIC -o src/ztools/showhead.o -c src/ztools/showhead.c
      In file included from src/ztools/infodump.c:54:
      src/ztools/tx.h:383:8: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
      extern option_inform;
      ~~~~~~ ^
      int
      src/ztools/infodump.c:487:43: error: incompatible pointer to integer conversion passing 'unsigned short *' to parameter of type 'unsigned short'; remove & [-Wint-conversion]
          configure_inform_tables(obj_data_end, &inform_version, &class_numbers_base, &class_numbers_end,
                                                ^~~~~~~~~~~~~~~
      src/ztools/infodump.c:210:35: note: passing argument to parameter here
          (unsigned long, unsigned short, unsigned long, unsigned long, unsigned long,
                                        ^
      src/ztools/infodump.c:487:60: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
          configure_inform_tables(obj_data_end, &inform_version, &class_numbers_base, &class_numbers_end,
                                                                 ^~~~~~~~~~~~~~~~~~~
      src/ztools/infodump.c:210:50: note: passing argument to parameter here
          (unsigned long, unsigned short, unsigned long, unsigned long, unsigned long,
                                                       ^
      src/ztools/infodump.c:487:81: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
          configure_inform_tables(obj_data_end, &inform_version, &class_numbers_base, &class_numbers_end,
                                                                                      ^~~~~~~~~~~~~~~~~~
      src/ztools/infodump.c:210:65: note: passing argument to parameter here
          (unsigned long, unsigned short, unsigned long, unsigned long, unsigned long,
                                                                      ^
      src/ztools/infodump.c:488:21: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
                          &property_names_base, &property_names_end, &attr_names_base, &attr_names_end);
                          ^~~~~~~~~~~~~~~~~~~~
      src/ztools/infodump.c:210:80: note: passing argument to parameter here
          (unsigned long, unsigned short, unsigned long, unsigned long, unsigned long,
                                                                                     ^
      src/ztools/infodump.c:488:43: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
                          &property_names_base, &property_names_end, &attr_names_base, &attr_names_end);
                                                ^~~~~~~~~~~~~~~~~~~
      src/ztools/infodump.c:211:19: note: passing argument to parameter here
           unsigned long, unsigned long, unsigned long);
                        ^
      src/ztools/infodump.c:488:64: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
                          &property_names_base, &property_names_end, &attr_names_base, &attr_names_end);
                                                                     ^~~~~~~~~~~~~~~~
      src/ztools/infodump.c:211:34: note: passing argument to parameter here
           unsigned long, unsigned long, unsigned long);
                                       ^
      src/ztools/infodump.c:488:82: error: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
                          &property_names_base, &property_names_end, &attr_names_base, &attr_names_end);
                                                                                       ^~~~~~~~~~~~~~~
      src/ztools/infodump.c:211:49: note: passing argument to parameter here
           unsigned long, unsigned long, unsigned long);
                                                      ^
      8 errors generated.
      make: *** [src/ztools/infodump.o] Error 1
      make: *** Waiting for unfinished jobs....
      9 warnings generated.
      In file included from src/ztools/showhead.c:7:
      src/ztools/tx.h:383:8: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
      extern option_inform;
      ~~~~~~ ^
      int
      src/ztools/showhead.c:350:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
              for (i = 4; i < sizeof (header.name); i++)
                          ~ ^ ~~~~~~~~~~~~~~~~~~~~
      1 warning and 1 error generated.
      make: *** [src/ztools/showhead.o] Error 1
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/lklein/Documents/programming/jericho/setup.py", line 25, in <module>
          subprocess.check_call(['make', 'library', '-j', '4'], cwd=FROTZPATH)
        File "/Users/lklein/anaconda3/envs/foatextenv/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['make', 'library', '-j', '4']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
MarcCote commented 2 months ago

Hi @lhk , can you try this PR to see if that works for you? https://github.com/microsoft/jericho/pull/69

wookayin commented 2 months ago

@lhk You can also do pip install "jericho @ git+https://github.com/microsoft/jericho@refs/pull/69/head" to install the snapshot version in the PR #69.

lhk commented 2 months ago

@MarcCote @wookayin I've tested this and it works. Thank you so much for the quick replies :)

MarcCote commented 2 months ago

Great. Thank you for the confirmation.