Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules

by syphilis (Archbishop)
on Jul 25, 2021 at 01:16 UTC ( [id://11135361]=note: print w/replies, xml ) Need Help??


in reply to perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules

Back to building perl sans -DDEBUGGING ...

Looking at https://github.com/Perl/perl5/issues/16607, it seems to me that another solution would be to build your XS modules from source (ie cpan -i DateTime), rather than installing the port (which was built for a non-debugging perl) provided by the system vendor.
And, that's the option I would take, if my understanding of the issue is correct.
I would not expect any XS module built for a specific configuration of perl to necessarily work on a perl of a different configuration.

Update:
Is there a way to have perl built with DEBUGGING and XS modules not fail?

AFAIK, the XS modules will generally be fine on a -DDEBUGGING perl as long as they are built using that -DDEBUGGING perl.

Cheers,
Rob
  • Comment on Re: perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules
  • Download Code

Replies are listed 'Best First'.
Re^2: perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules
by Fletch (Bishop) on Jul 25, 2021 at 02:23 UTC

    Seconded. If you change perl's flags don't expect to be able to use XS modules compiled against a perl with a different set of flags. In general if you keep the same flags within the same major.minor you're probably safe (i.e. you probably can vary patchlevel, but . . .); other than that it's safer to make sure you build with what you're running with.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re^2: perl built with -DDEBUGGING causes "failed to extend arg stack" error with XS modules
by parv (Parson) on Jul 25, 2021 at 14:10 UTC

    I did built DateTime from source ...

    I recently built perl 5.32.1 with -DDEBUGGING & DateTime 1.54 from source ...

    ... Only after then I had posted here. FreeBSD Ports allows one to do that any time (except for the cases where only the binary blobs are available).

      I recently built perl 5.32.1 with -DDEBUGGING

      You built that -DDEBUGGING perl yourself ??
      I took one look at the "config_args" as reported in the "perl -V" output you provided in your original post and decided that this must be a perl provided by FreeBSD Ports.
      When I build perl on FreeBSD 12.0, I specify Configure args of "-des -Duse64bitall -Dprefix=/home/me/perl-5.x.y", and that's all.
      If I wanted a DEBUG perl then I'd just be adding the "-DDEBUGGING" flag to the list I used. (It's a while since I've built a -DDEBUGGING perl, so correct me if there are other flags that need to be added.)

      Try building your perl with a trimmed back list of configure args (like the list that I use) and see if that makes a difference.

      How did you actually build and install DateTime-1.54 from source ? (Seeing the output from that process might be useful.)

      Cheers,
      Rob

        Yes, I had built perl from source with debugging via Potrs (set DEBUG option for the port either in /etc/make.conf or via "dialog" brought up with make config in the port directory); at the end of "perl -V" ...

        ... Characteristics of this binary (from libperl): Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE ...

        I had rebuilt DateTime again (from source, with perl with debugging) in case I might not have removed all of its dependencies. No difference.

        I will try later to build perl & DateTime outside of Ports, but does not look like that would help any given the evidence so far.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-19 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found