Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
205 stars 49 forks source link

Compiler error: conflicting types for ‘reserved_word’ #698

Open ffaf1 opened 3 years ago

ffaf1 commented 3 years ago

When building TSC-2.1.0 on Debian stable (bullseye), I get this error:

f@extensa:~/download/TSC-2.1.0/tsc/build$ make
[  1%] Built target podparser
[  2%] Performing build step for 'mruby'
(in /home/f/download/TSC-2.1.0/tsc/build/mruby)
CC    build/host/mrbgems/mruby-compiler/core/y.tab.c -> build/host/mrbgems/mruby-compiler/core/y.tab.o
In file included from /home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/parse.y:4446:
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:5:37: error: conflicting types for ‘reserved_word’
    5 | #define mrb_reserved_word(str, len) reserved_word(str, len)
      |                                     ^~~~~~~~~~~~~
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:72:1: note: in expansion of macro ‘mrb_reserved_word’
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:4:30: note: previous declaration of ‘reserved_word’ was here
    4 | static const struct kwtable *reserved_word(const char *, unsigned int);
      |                              ^~~~~~~~~~~~~
In file included from /home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/parse.y:4446:
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:5:37: error: conflicting types for ‘reserved_word’
    5 | #define mrb_reserved_word(str, len) reserved_word(str, len)
      |                                     ^~~~~~~~~~~~~
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:72:1: note: in expansion of macro ‘mrb_reserved_word’
/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core/keywords:4:30: note: previous declaration of ‘reserved_word’ was here
    4 | static const struct kwtable *reserved_word(const char *, unsigned int);
      |                              ^~~~~~~~~~~~~
rake aborted!
Command Failed: [gcc -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings -DMRB_UTF8_STRING -DMRBGEM_MRUBY_COMPILER_VERSION=0.0.0 -I"/home/f/download/TSC-2.1.0/tsc/build/mruby/include" -I"/home/f/download/TSC-2.1.0/tsc/build/mruby/mrbgems/mruby-compiler/core" -MMD -o "/home/f/download/TSC-2.1.0/tsc/build/mruby/build/host/mrbgems/mruby-compiler/core/y.tab.o" -c "/home/f/download/TSC-2.1.0/tsc/build/mruby/build/host/mrbgems/mruby-compiler/core/y.tab.c"]

make[2]: *** [CMakeFiles/mruby.dir/build.make:130: mruby-prefix/src/mruby-stamp/mruby-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:135: CMakeFiles/mruby.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
xet7 commented 3 years ago

@ffaf1

I don't get any errors on Debian stable (bullseye).

git clone https://github.com/Secretchronicles/TSC

cd TSC

./install-build-dependencies.sh

./build-tsc.sh

./run-tsc.sh
ffaf1 commented 3 years ago

I am following «Installing from a released tarball» instruction, because I downloaded TSC from a tarball.

In that section there is no mentio of running gem, just cmake and make.

Is there a way to install gems not as sudo? That would be appreciated for people who do not have root access (of if they do, they prefer not to mess with it).

Il 19 agosto 2021 alle 14:19 Lauri Ojansivu ha scritto:

@ffaf1

I don't get any errors on Debian stable (bullseye).

git clone https://github.com/Secretchronicles/TSC

cd TSC

./install-build-dependencies.sh

./build-tsc.sh

./run-tsc.sh

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Secretchronicles/TSC/issues/698#issuecomment-902255400

xet7 commented 3 years ago

@ffaf1

Maybe this way?

gem install packagename --user-install

Anyway, installing dependencies with apt requires sudo, so I don't know how useful this would be. There are various .deb/.exe etc packages here https://secretchronicles.org/en/download/ , if that debian package does not work, I could create newer package for Debian bullseye stable.

While there is also some code in repo for building flatpak version, I think it's not published anywhere yet.

Does this help in any way?

xet7 commented 3 years ago

I think those deb packages should install TSC menu options for all users on that computer.

ffaf1 commented 3 years ago

With your instructions I managed to build it, thanks.

If your instructions could be incorporated in the INSTALL.md, I am sure many other users will benefit from them.

Il 19 agosto 2021 alle 15:08 Lauri Ojansivu ha scritto:

@ffaf1

Maybe this way?

gem install packagename --user-install

Anyway, installing dependencies with apt requires sudo, so I don't know how useful this would be. There are various .deb/.exe etc packages here https://secretchronicles.org/en/download/ , if that debian package does not work, I could create newer package for Debian bullseye stable.

While there is also some code in repo for building flatpak version, I think it's not published anywhere yet.

Does this help in any way?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Secretchronicles/TSC/issues/698#issuecomment-902282774

Quintus commented 3 years ago

There are no RubyGems (gem command) required for building TSC itself. Gems are only necessary if you want to build the documentation, which is not built by default.

The problem originally reported looks to me as if we need to (once again) update our included mruby package. I will later look into reproducing the problem, but not in the next few days.

-quintus

Am 19. August 2021 um 15:00 Uhr -0700 schrieb ffaf1:

I am following «Installing from a released tarball» instruction, because I downloaded TSC from a tarball.

In that section there is no mentio of running gem, just cmake and make.

Is there a way to install gems not as sudo? That would be appreciated for people who do not have root access (of if they do, they prefer not to mess with it).

Il 19 agosto 2021 alle 14:19 Lauri Ojansivu ha scritto:

@ffaf1

I don't get any errors on Debian stable (bullseye).

git clone https://github.com/Secretchronicles/TSC

cd TSC

./install-build-dependencies.sh

./build-tsc.sh

./run-tsc.sh

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Secretchronicles/TSC/issues/698#issuecomment-902255400

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/Secretchronicles/TSC/issues/698#issuecomment-902278077

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | @.*** | O<