Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scriptix: fix broken build #15921

Merged
merged 2 commits into from
May 29, 2023
Merged

scriptix: fix broken build #15921

merged 2 commits into from
May 29, 2023

Conversation

barracuda156
Copy link
Contributor

Description

The port is currently broken across the board: https://ports.macports.org/port/scriptix/details/
Here is why it fails: https://trac.macports.org/ticket/65727
Solution: Papierkorb/bindgen#77
More info: ivmai/bdwgc#268

Second commit adds modeline, fixes lint warnings, adds proper checksums, changes dead homepage to sourceforce repo.

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.6.8 Server
Xcode 3.2.6

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@barracuda156
Copy link
Contributor Author

Okay, clang builds need extra fixes. Now checks fail on several errors of this kind:

error: no matching constructor for initialization of 'Scriptix::Compiler::CompilerNode'

@barracuda156 barracuda156 marked this pull request as draft August 26, 2022 17:27
@barracuda156
Copy link
Contributor Author

@ryandesign Let me know if we just remove the port. I will close this PR then.

@mascguy mascguy marked this pull request as ready for review May 28, 2023 14:50
@mascguy
Copy link
Member

mascguy commented May 28, 2023

Okay, clang builds need extra fixes. Now checks fail on several errors of this kind:

error: no matching constructor for initialization of 'Scriptix::Compiler::CompilerNode'

Sergey, now that you've got much more experience under your belt, would you be comfortable with trying to fix this?

@barracuda156
Copy link
Contributor Author

@mascguy I can try, but perhaps no point in wasting too much of the effort here, given what @ryandesign wrote: https://trac.macports.org/ticket/65727#comment:1

@barracuda156
Copy link
Contributor Author

(Let me rebase to get new logs.)

@barracuda156
Copy link
Contributor Author

barracuda156 commented May 28, 2023

@mascguy So it is not a Clang issue as such, but rather an issue of archaic code. I just tried to build it with gcc12, and it fails with similar errors:

Click to Expand
In file included from grammar.yy:37:
../include/compiler.h:207:27: error: conflicting declaration 'Scriptix::TypeInfo* type'
  207 |                 TypeInfo* type,
      |                 ~~~~~~~~~~^~~~
../include/compiler.h:201:21: note: previous declaration as 'int type'
  201 |                 int type,
      |                 ~~~~^~~~
grammar.cc: In function 'size_t yystrlen(const char*)':
grammar.cc:1032:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1032 |   register const char *yys = yystr;
      |                        ^~~
grammar.cc: In function 'char* yystpcpy(char*, const char*)':
grammar.cc:1057:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1057 |   register char *yyd = yydest;
      |                  ^~~
grammar.cc:1058:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1058 |   register const char *yys = yysrc;
      |                        ^~~
grammar.cc: In function 'int yyparse()':
grammar.cc:1193:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1193 |   register int yystate;
      |                ^~~~~~~
grammar.cc:1194:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1194 |   register int yyn;
      |                ^~~
grammar.cc:1212:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1212 |   register short int *yyssp;
      |                       ^~~~~
grammar.cc:1217:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1217 |   register YYSTYPE *yyvsp;
      |                     ^~~~~
In file included from lexer.ll:36:
../include/compiler.h:207:27: error: conflicting declaration 'Scriptix::TypeInfo* type'
  207 |                 TypeInfo* type,
      |                 ~~~~~~~~~~^~~~
../include/compiler.h:201:21: note: previous declaration as 'int type'
  201 |                 int type,
      |                 ~~~~^~~~
lexer.cc: In function 'int yylex()':
lexer.cc:700:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  700 |         register yy_state_type yy_current_state;
      |                                ^~~~~~~~~~~~~~~~
lexer.cc:701:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  701 |         register char *yy_cp, *yy_bp;
      |                        ^~~~~
lexer.cc:701:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  701 |         register char *yy_cp, *yy_bp;
      |                                ^~~~~
lexer.cc:702:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  702 |         register int yy_act;
      |                      ^~~~~~
lexer.cc:751:42: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  751 |                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
      |                                          ^~~~
lexer.cc: In function 'int yy_get_next_buffer()':
lexer.cc:1154:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1154 |         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
      |                        ^~~~
lexer.cc:1155:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1155 |         register char *source = (yytext_ptr);
      |                        ^~~~~~
lexer.cc:1156:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1156 |         register int number_to_move, i;
      |                      ^~~~~~~~~~~~~~
lexer.cc:1156:38: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1156 |         register int number_to_move, i;
      |                                      ^
lexer.cc: In function 'yy_state_type yy_get_previous_state()':
lexer.cc:1280:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1280 |         register yy_state_type yy_current_state;
      |                                ^~~~~~~~~~~~~~~~
lexer.cc:1281:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1281 |         register char *yy_cp;
      |                        ^~~~~
lexer.cc:1287:34: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1287 |                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
      |                                  ^~~~
lexer.cc: In function 'yy_state_type yy_try_NUL_trans(yy_state_type)':
lexer.cc:1312:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1312 |         register int yy_is_jam;
      |                      ^~~~~~~~~
lexer.cc:1313:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1313 |         register char *yy_cp = (yy_c_buf_p);
      |                        ^~~~~
lexer.cc:1315:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1315 |         register YY_CHAR yy_c = 1;
      |                          ^~~~
lexer.cc: At global scope:
lexer.cc:1333:49: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1333 |     static void yyunput (int c, register char * yy_bp )
      |                                                 ^~~~~
lexer.cc: In function 'void yyunput(int, char*)':
lexer.cc:1335:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1335 |         register char *yy_cp;
      |                        ^~~~~
lexer.cc:1345:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1345 |                 register int number_to_move = (yy_n_chars) + 2;
      |                              ^~~~~~~~~~~~~~
lexer.cc:1346:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1346 |                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
      |                                ^~~~
lexer.cc:1348:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
 1348 |                 register char *source =
      |                                ^~~~~~
 /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -I/opt/local/include -pipe -Os -arch ppc -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.cc  -fno-common -DPIC -o .libs/parser.o
make[1]: *** [lexer.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [grammar.lo] Error 1
 /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -I/opt/local/include -pipe -Os -arch ppc -MT value.lo -MD -MP -MF .deps/value.Tpo -c value.cc -o value.o >/dev/null 2>&1
 /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -I/opt/local/include -pipe -Os -arch ppc -MT system.lo -MD -MP -MF .deps/system.Tpo -c system.cc -o system.o >/dev/null 2>&1
 /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -I/opt/local/include -pipe -Os -arch ppc -MT type.lo -MD -MP -MF .deps/type.Tpo -c type.cc -o type.o >/dev/null 2>&1
In file included from parser.cc:36:
../include/compiler.h:207:27: error: conflicting declaration 'Scriptix::TypeInfo* type'
  207 |                 TypeInfo* type,
      |                 ~~~~~~~~~~^~~~
../include/compiler.h:201:21: note: previous declaration as 'int type'
  201 |                 int type,
      |                 ~~~~^~~~
parser.cc:292:1: error: no declaration matches 'Scriptix::Compiler::CompilerNode::CompilerNode(Scriptix::Compiler::Compiler*, int, Scriptix::Compiler::CompilerNode*, Scriptix::Compiler::CompilerNode*, Scriptix::Compiler::CompilerNode*, Scriptix::Compiler::CompilerNode*, Scriptix::NameID, Scriptix::TypeInfo*, Scriptix::Value*, int)'
  292 | Scriptix::Compiler::CompilerNode::CompilerNode(Scriptix::Compiler::Compiler* s_info,
      | ^~~~~~~~
../include/compiler.h:184:8: note: candidates are: 'constexpr Scriptix::Compiler::CompilerNode::CompilerNode(Scriptix::Compiler::CompilerNode&&)'
  184 | struct CompilerNode : public GC::Collectable {
      |        ^~~~~~~~~~~~
../include/compiler.h:184:8: note:                 'constexpr Scriptix::Compiler::CompilerNode::CompilerNode(const Scriptix::Compiler::CompilerNode&)'
../include/compiler.h:200:9: note:                 'Scriptix::Compiler::CompilerNode::CompilerNode(...)'
  200 |         CompilerNode(Compiler* info,
      |         ^~~~~~~~~~~~
../include/compiler.h:184:8: note: 'struct Scriptix::Compiler::CompilerNode' defined here
  184 | struct CompilerNode : public GC::Collectable {
      |        ^~~~~~~~~~~~
make[1]: *** [parser.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_scriptix/scriptix/work/scriptix-0.31/lib'
make: *** [all-recursive] Error 1

I am not too inclined to struggle with fixing this, TBH.

Two easy options are:

  1. Close PR, remove the port from Macports.
  2. Set it to be build with apple-gcc42 on whatever systems support that compiler, like it was done for some very old Haskell compilers.

What do you think?

@mascguy
Copy link
Member

mascguy commented May 28, 2023

@mascguy So it is not a Clang issue as such, but rather an issue of archaic code. I just tried to build it with gcc12, and it fails with similar errors:
[...]
I am not too inclined to struggle with fixing this, TBH.

Two easy options are:
1. Close PR, remove the port from Macports.
2. Set it to be build with apple-gcc42 on whatever systems support that compiler, like it was done for some very old Haskell compilers.

What do you think?

Well, port awemud depends on scriptix, so that would have to be removed too.

So I'm inclined to suggest option 2. (And it's probably fixable with patches, if folks want to do so. But let's forget that for now.)

@barracuda156
Copy link
Contributor Author

@mascguy Done, but it cannot be tested on CI, so kinda a blind shot.

Copy link
Member

@mascguy mascguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on 10.5, and looks good. Merging.

@mascguy mascguy merged commit b7c80ff into macports:master May 29, 2023
@barracuda156 barracuda156 deleted the scriptix branch May 29, 2023 00:18
mascguy added a commit that referenced this pull request May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants