Fails to build with both Stable and Pre-release
temporarium opened this issue · 1 comments
temporarium commented
I'm on openSUSE Tumbleweed x64.
ruby version: 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-gnu]
rubyc version: 2.7.1.dev
Invoking...
>./rubyc --root=./utility/ --output=./utility.exe --debug ./utility/utility.rb
...leads to:
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: : ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:255: multiple definition of `./libgdbmapp.a(parseopt.o):parseopt_program_doc/tmp/rubyc/gdbm/src/parseopt.c:'255; : multiple definition of `parseopt_program_doc'; gdbm_dump.o:/tmp/rubyc/gdbm/src/gdbm_dump.c:22: first defined here
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:256: multiple definition of `parseopt_program_args'; gdbm_dump.o:/tmp/rubyc/gdbm/src/gdbm_dump.c:23: first defined here
gdbm_load.o:/tmp/rubyc/gdbm/src/gdbm_load.c:32: first defined here
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:256: multiple definition of `parseopt_program_args'; gdbm_load.o:/tmp/rubyc/gdbm/src/gdbm_load.c:33: first defined here
CCLD gdbmtool
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:633: gdbm_dump] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:637: gdbm_load] Error 1
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:255: multiple definition of `parseopt_program_doc'; gdbmtool.o:/tmp/rubyc/gdbm/src/gdbmtool.c:1492: first defined here
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:256: multiple definition of `parseopt_program_args'; gdbmtool.o:/tmp/rubyc/gdbm/src/gdbmtool.c:1493: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:641: gdbmtool] Error 1
make[3]: Leaving directory '/tmp/rubyc/gdbm/src'
make[2]: *** [Makefile:483: all] Error 2
make[2]: Leaving directory '/tmp/rubyc/gdbm/src'
make[1]: *** [Makefile:456: all-recursive] Error 1
make[1]: Leaving directory '/tmp/rubyc/gdbm'
make: *** [Makefile:387: all] Error 2
Failed running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"true", "CFLAGS"=>" -DRUBY_DEBUG -fPIC -g -O0 -pipe ", "LDFLAGS"=>""}, "make -j12"]
Invoking...
>rubyc-v0.4.0-linux-x64 --root=./utility/ --output=./utility.exe --debug ./utility/utility.rb
...leads to:
In file included from parse.y:28:
node.h:509:45: note: expected ‘struct parser_params *’ but argument is of type ‘FILE *’
509 | void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
parse.c: In function ‘ruby_yyparse’:
parse.c:5288:27: error: ‘parser’ redeclared as different kind of symbol
5288 | struct parser_params *parser;
| ^~~~~~
parse.c:5149:32: note: previous definition of ‘parser’ with type ‘struct parser_params *’
5149 | yyparse (struct parser_params *parser)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
parse.c:11006:47: error: macro "yydestruct" passed 4 arguments, but takes just 3
11006 | if (yychar == END_OF_INPUT)
| ^
parse.c:5290: note: macro "yydestruct" defined here
5290 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser)
|
parse.c:11005:11: error: ‘yydestruct’ undeclared (first use in this function)
11005 | /* Return failure if at end of input. */
| ^~~~~~~~~~
parse.c:11005:11: note: each undeclared identifier is reported only once for each function it appears in
parse.c:11061:63: error: macro "yydestruct" passed 4 arguments, but takes just 3
11061 | /* Pop the current state because it cannot handle the error token. */
| ^
parse.c:5290: note: macro "yydestruct" defined here
5290 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser)
|
parse.c:11116:43: error: macro "yydestruct" passed 4 arguments, but takes just 3
11116 | if (yychar != YYEMPTY)
| ^
parse.c:5290: note: macro "yydestruct" defined here
5290 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser)
|
parse.c:11125:63: error: macro "yydestruct" passed 4 arguments, but takes just 3
11125 | this YYABORT or YYACCEPT. */
| ^
parse.c:5290: note: macro "yydestruct" defined here
5290 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser)
|
make: *** [Makefile:365: parse.o] Error 1
Failed running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "CFLAGS"=>" -fPIC -g -O0 -pipe -I/tmp/rubyc/zlib -I/tmp/rubyc/openssl/include -I/tmp/rubyc/gdbm/build/include -I/tmp/rubyc/yaml/build/include -I/tmp/rubyc/libffi/build/lib/libffi-3.2.1/include -I/tmp/rubyc/ncurses/build/include -I/tmp/rubyc/readline/build/include ", "LDFLAGS"=>" -L/tmp/rubyc/zlib /tmp/rubyc/zlib/libz.a -L/tmp/rubyc/openssl -L/tmp/rubyc/gdbm/build/lib -L/tmp/rubyc/yaml/build/lib -L/tmp/rubyc/libffi/build/lib -L/tmp/rubyc/libffi/build/lib64 -L/tmp/rubyc/ncurses/build/lib -L/tmp/rubyc/readline/build/lib ", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "make -j4 -j1"]
Any suggestions?
It's a terminal application/command-line utility with just a few gems loaded via require 'bundler/inline'.
temporarium commented
Any suggestions/ideas? Can anything be done to make this work?