microsoft / jericho

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

Compilation errors on MacOS Catalina #37

Closed aleSuglia closed 3 years ago

aleSuglia commented 3 years ago

Issue

I am having issues installing Jericho using pip (that is issued when trying to install TextWorld). The compilation error I get is:

src/ztools/infodump.c:479:5: error: implicit declaration of function 'configure_inform_tables' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        configure_inform_tables(obj_data_end, &inform_version, &class_numbers_base, &class_numbers_end,
        ^
    1 warning and 1 error generated.
    make: *** [src/ztools/infodump.o] Error 1
    make: *** Waiting for unfinished jobs....

You can see the full stacktrace here.

Setup

Question

Is there any plan to support MacOS as well or this package is meant to be installed on Linux only?

MarcCote commented 3 years ago

@aleSuglia we do support MacOS. We are testing using this build system MacOS 10.15. According to the list of available software, we are not using Apple clang 12, which seems to be the one causing a problem (see similar issue: https://github.com/kaldi-asr/kaldi/issues/4155).

Maybe there's a way to tell the compiler to keep it as a warning instead of an error (i.e., -Wimplicit-function-declaration). I'll try to patch it today.

MarcCote commented 3 years ago

@aleSuglia I made a fix (see PR #38). Can you try to see if that works for you?

pip install https://github.com/MarcCote/jericho/archive/fix_37.zip

Thanks.

aleSuglia commented 3 years ago

Mmm looks like that it didn't fix all the errors: https://bpa.st/WRQQ

Seems there are other functions that might benefit from the same fix?

MarcCote commented 3 years ago

You are right. It seems the compiler flag wasn't used when compiling the main interface :-o. You can try again.

pip install https://github.com/MarcCote/jericho/archive/fix_37.zip
aleSuglia commented 3 years ago

All good it works 👍

MarcCote commented 3 years ago

Thanks for confirming. @mhauskn ^

mhauskn commented 3 years ago

Merged #38 into master. Thanks @MarcCote for the fixes!

aleSuglia commented 3 years ago

Closing this one. Thanks @MarcCote for the prompt fix!