plparrot/perl6

0 views
Skip to first unread message

Hitoshi Harada

unread,
Jun 13, 2010, 5:24:53 AM6/13/10
to plpa...@googlegroups.com
So, I've been trying perl6 branch today, and found it cannot be built
with parrot HEAD.

plparrot.c:512: warning: implicit declaration of function
‘Parrot_str_new_constant’

Actually make is ok with bunch of warnings such as above, but make
installcheck fails with CREATE FUNCTION. My conclusion is parrot
functions like Parrot_str_new_constant() has special call convention,
which results in the return address is missing without the correct
#include when compiling.

I tried many ways to build to succeed #include by randomly relocating
*.h in the head of plparrot.c, though there seems almost no way. The
only way I can see is to separate parrot-related APIs to another .c
file (i.e. plparrot_misc.c) and to keep plparrot.c clean. If this
approach is on the right way, I'll work by forking perl6 branch but
not sure it is.

Regards,

--
Hitoshi Harada

Jonathan Leto

unread,
Jun 16, 2010, 3:45:44 AM6/16/10
to plpa...@googlegroups.com
Howdy,

The warnings are due to bugs in Parrot, some functions are not listed
in the public-facing header files.

I don't use "make installcheck" much, i usually run "make test". What
exact output did you get? Installcheck might be broke.

Also, it is always helpful to say which SHA1 of a branch you were
using, as well as the version of Postgres and Parrot
that are involved. The term "trunk" or HEAD constantly change, so
using specific revision numbers and SHA1's is best.

Duke

--
Jonathan "Duke" Leto
jona...@leto.net
http://leto.net

Hitoshi Harada

unread,
Jun 17, 2010, 3:39:02 AM6/17/10
to plpa...@googlegroups.com
2010/6/16 Jonathan Leto <jal...@gmail.com>:

> Howdy,
>
> The warnings are due to bugs in Parrot, some functions are not listed
> in the public-facing header files.

Yep, and that causes call convention mismatch as below.

> I don't use "make installcheck" much, i usually run "make test". What
> exact output did you get? Installcheck might be broke.

[plparrot]$ make test
Found a sufficiently new version of Parrot r47271
./bin/text2macro.pl plparrot_secure.pir > plparrot.h
./bin/text2macro.pl plperl6.pir > plperl6.h
\n\n\tHappy Hacking with PL/Parrot!\n\n
psql -AX -f t/sql/test.sql
psql:plparrot.sql:3: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
psql:plparrot.sql:3: connection to server was lost
make: *** [test] Error 2

From what I looked at it is in _PG_init(). The return address from
parrot API is bogus.

> Also, it is always helpful to say which SHA1 of a branch you were
> using, as well as the version of Postgres and Parrot
> that are involved. The term "trunk" or HEAD constantly change, so
> using specific revision numbers and SHA1's is best.

PostgreSQL => 9.0b2

[parrot-head] $ svn info
Path: .
URL: https://svn.parrot.org/parrot/trunk
Repository Root: https://svn.parrot.org/parrot
Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe
Revision: 47271
Node Kind: directory
Schedule: normal
Last Changed Author: moritz
Last Changed Rev: 47265
Last Changed Date: 2010-06-02 05:49:16 +0900 (Wed, 02 Jun 2010)

[plparrot] $ git info
commit bfef901baa4e084c8319a9127b590d6175357dc4
Author: Duke Leto <jona...@leto.net>
Date: Wed Jun 16 21:57:59 2010 -0700

Dump the return value with dumper.pbc

> Duke
>
>
>
> On Sun, Jun 13, 2010 at 2:24 AM, Hitoshi Harada <umi.t...@gmail.com> wrote:
>> So, I've been trying perl6 branch today, and found it cannot be built
>> with parrot HEAD.
>>
>> plparrot.c:512: warning: implicit declaration of function
>> ‘Parrot_str_new_constant’
>>
>> Actually make is ok with bunch of warnings such as above, but make
>> installcheck fails with CREATE FUNCTION. My conclusion is parrot
>> functions like Parrot_str_new_constant() has special call convention,
>> which results in the return address is missing without the correct
>> #include when compiling.
>>
>> I tried many ways to build to succeed #include by randomly relocating
>> *.h in the head of plparrot.c, though there seems almost no way. The
>> only way I can see is to separate parrot-related APIs to another .c
>> file (i.e. plparrot_misc.c) and to keep plparrot.c clean. If this
>> approach is on the right way, I'll work by forking perl6 branch but
>> not sure it is.
>>
>> Regards,
>>
>> --
>> Hitoshi Harada
>>
>
>
>
> --
> Jonathan "Duke" Leto
> jona...@leto.net
> http://leto.net
>

--
Hitoshi Harada

Jonathan Leto

unread,
Jun 17, 2010, 12:46:30 PM6/17/10
to plpa...@googlegroups.com
Howdy,

Could you run "gdb postgres core" on the core file that generates? You
may have to stop Postgres,
and set "ulimit -c unlimited", and then restart Postgres to get core
files generated. They will drop
into the data directory of your Postgres database.

Once you are in "gdb", can you type "bt<enter>" to generate a backtrce
and send the output to the list?

Thanks!

PS: Also, the output of "uname -a" would be useful too.

Duke

Hitoshi Harada

unread,
Jun 20, 2010, 1:47:15 PM6/20/10
to plpa...@googlegroups.com
After more fighting with plperl6, I figured out it was that
Parrot_load_bytecode doesn't work without PERL6PBC string. So with

export PERL6PBC=/path/to/perl6pbc

then make && make test succeeded partially as parrot trunk.

Thanks!

2010/6/18 Jonathan Leto <jal...@gmail.com>:

--
Hitoshi Harada

Reply all
Reply to author
Forward
0 new messages