Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #37651] [PATCH] Add $LINK_DYNAMIC when linking pbc_merge

4 views
Skip to first unread message

Nick Glencross

unread,
Nov 10, 2005, 11:08:32 AM11/10/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Nick Glencross
# Please include the string: [perl #37651]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37651 >


This patch is required for pbc_merge on some platforms (HP-UX is the
one that I see it on), particularly when creating tcllib.

pbc_merge calls dynamically loaded pmc code which needs access to
symbols in the executable, such as const_string.

Cheers,

Nick

parrot_r9883_pbc_merge_link_dynamic-patch.txt

Francois PERRAD

unread,
Nov 15, 2005, 1:34:42 AM11/15/05
to perl6-i...@perl.org
At 08:08 10/11/2005 -0800, you wrote:
># New Ticket Created by Nick Glencross
># Please include the string: [perl #37651]
># in the subject line of all future correspondence about this issue.
># <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37651 >
>
>
>This patch is required for pbc_merge on some platforms (HP-UX is the
>one that I see it on), particularly when creating tcllib.

Same problem on Win32, but this patch doesn't solve it with MinGW.

Now a stupid question, why pbc_merge is a big/fat executable and not a Perl
script or better a PIR program ?

François Perrad.


>pbc_merge calls dynamically loaded pmc code which needs access to
>symbols in the executable, such as const_string.
>
>Cheers,
>
>Nick

>Index: config/gen/makefiles/root.in
>===================================================================
>--- config/gen/makefiles/root.in (revision 9883)
>+++ config/gen/makefiles/root.in (working copy)
>@@ -817,7 +817,7 @@
> $(LINK) ${ld_out}$(PBCMERGE) \
> $(SRC_DIR)/pbc_merge$(O) \
> $(SRC_DIR)/parrot_config$(O) \
>- $(LINKFLAGS) $(ALL_PARROT_LIBS)
>+ $(LINKFLAGS) $(LINK_DYNAMIC) $(ALL_PARROT_LIBS)
>
>
>


Jonathan Worthington

unread,
Nov 15, 2005, 8:48:57 AM11/15/05
to perl6-i...@perl.org, Francois PERRAD
"Francois PERRAD" <fpe...@besancon.parkeon.com> wrote:
> >
> >This patch is required for pbc_merge on some platforms (HP-UX is the
> >one that I see it on), particularly when creating tcllib.
>
> Same problem on Win32, but this patch doesn't solve it with MinGW.
>
Yup, I know about this problem. We shouldn't be loading the dynamic
libraries at all, which is the right fix. I'll try and sort that out
sometime soon.

> Now a stupid question, why pbc_merge is a big/fat executable and not a
> Perl script or better a PIR program ?
>

Not really a stupid question. Writing it in Perl would involve either
writing packfile handling routines in Perl or using XS to call into Parrot
packfile handling code, meaning a lot of work. I'd like to have written it
in PIR, but at the moment we just don't have facilities for working with
packfiles or walking bytecode from PIR. One day we will, then pbc_merge can
be re-written in PIR. Writing it in C was the easiest way to get a working
pbc_merge until that time.

Jonathan

0 new messages