Repository navigation
Closed
Description
This is likely due to 32-bitness of the arch or possibly something specific to ppc. I have no i386 set-up at hand to compare.
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/tokenizer.h:6,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser.h:6,
from parser.yy:24,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser.tab.cc:91:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: error: static assertion failed
115 | static_assert(sizeof(YYSTYPE) == sizeof(Vec<LPython::AST::ast_t*>));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: note: the comparison reduces to '(16 == 12)'
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/tokenizer.h:6,
from tokenizer.re:4:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: error: static assertion failed
115 | static_assert(sizeof(YYSTYPE) == sizeof(Vec<LPython::AST::ast_t*>));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: note: the comparison reduces to '(16 == 12)'
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/tokenizer.h:6,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser.h:6,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser.cpp:7:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: error: static assertion failed
115 | static_assert(sizeof(YYSTYPE) == sizeof(Vec<LPython::AST::ast_t*>));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_lpython/lpython/work/lpython-0.20.0/src/lpython/parser/parser_stype.h:115:31: note: the comparison reduces to '(16 == 12)'
Metadata
Metadata
Assignees
Labels
No labels
Activity
barracuda156 commentedon Jan 10, 2024
@certik Not sure if this is a problem or an arch specifics, but with this static assert commented out plus two minor fixes – #2459 and #2461 –
lpythonbuilds fine for me onppc.There is no support for powerpc assembler in the code, so I do not know to what extent it will be usable, but it builds :)
parser_stype.h: allow building for ppc
barracuda156 commentedon Jan 10, 2024
If this is of little concern (i.e. the code still gonna work, just slower), then something like this allows it to build: barracuda156@8ad2ce3
certik commentedon Jan 10, 2024
The fix at barracuda156@8ad2ce3 is fine. This is just a performance problem in parsing --- when the node is bigger than necessary (the AST node, 12 bytes in this case), we are wasting memory and copying too much, but there are no functional issues, just slightly slower performance of parsing.
barracuda156 commentedon Jan 11, 2024
@certik Great, then I can make a PR for this.
parser_stype.h: allow building for ppc
parser_stype.h: allow building for ppc