Ticket #2124 (new bug)

Opened 11 years ago

Last modified 11 years ago

Including extend.h without first including parrot.h blows up in Rakudo

Reported by: dukeleto Owned by: whiteknight
Priority: normal Milestone:
Component: embed/extend Version: master
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

15:15:49     @pmichaud | NotFound: http://gist.github.com/994223   # results of including extend.h without first including parrot.h          

Sample:

cd src/binder && cc -c -o bind.o -I../../src/pmc -I/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel -I/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/pmc -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD -DDISABLE_GC_DEBUG=1 -DNDEBUG -DHAS_GETTEXT -fPIC -falign-functions=16 -funit-at-a-time -fexcess-precision=standard -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wdiv-by-zero -Wenum-compare -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wmultichar -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wno-unused -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wc++-compat -Wdeclaration-after-statement -Werror=declaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -Wold-style-definition -Wstrict-prototypes -fvisibility=hidden bind.c
In file included from /home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend.h:19:0,
                 from bind.c:8:
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/interpreter.h:557:34: error: expected ‘)’ before ‘(’ token
In file included from /home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend.h:55:0,
                 from bind.c:8:
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:17:47: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:18:42: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:19:46: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:20:48: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:21:46: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:22:43: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:23:43: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:24:41: error: expected ‘)’ before ‘(’ token
/home/pmichaud/rakudo/parrot_install/include/3.4.0-devel/parrot/extend_vtable.h:25:52: error: expected ‘)’ before ‘(’ token

Change History

Changed 11 years ago by whiteknight

  • version changed from 3.4.0 to master

Including parrot.h with extend.h has always been a requirement that I am aware of. extend.h is simply not sufficient for extending applications besides the most trivial ones. This is because of the fact that we don't have a separate and distinct extending API in the way that we do have a separate embedding API. Basically, our extending APIs are currently defined at the subsystem level, not at the parrot level.

Notice that parrot.h is automatically included in some extending situations such as dynops and dynpmcs. It would require significant effort to fix that situation, in addition to the significant effort required to bring a new extending API up to a usable level. I'm not against this idea, but it would be a lot of work.

Note: See TracTickets for help on using tickets.