Closed GoogleCodeExporter closed 9 years ago
$ perlcc --staticxs -e 'require IO; eval "require List::Util"; print "OK\n"';
./a.out
Goto undefined subroutine &DynaLoader::bootstrap_inherit at
/usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int/XSLoad
er.pm line 100.
Compilation failed in require at -e line 1.
If we change the first require, outside the eval, at BEGIN time, this starts
working:
$ perlcc --staticxs -e 'use IO; eval "require List::Util"; print "OK\n"';
./a.out
OK
Original comment by chro...@gmail.com
on 1 May 2014 at 8:02
While adding parens to the end of a use is syntactically the same as require,
it works in this form:
$ perlcc --staticxs -e 'use IO(); eval "require List::Util"; print "OK\n"';
./a.out
OK
Original comment by chro...@gmail.com
on 1 May 2014 at 8:04
Also broken on master branch - 9a31913090728
Original comment by todd.e.rinaldo
on 1 May 2014 at 8:07
Original comment by todd.e.rinaldo
on 1 May 2014 at 8:21
The problem is that --staticxs explicitly sets -DNO_DYNAMIC_LOADING which
prevents DynaLoader being booted.
And then uses NO_DYNAMIC_LOADING to decide if to dynaload or boot the staticxs
modules.
We need to keep the first part, always boot DynaLoader (if usedl is available),
and change the 2nd part.
Original comment by reini.urban
on 1 May 2014 at 9:02
Fixed with commit 064503093e0105afef22045e4d5793decd6ad394
Author: Reini Urban <rurban@cpanel.net>
Date: Thu May 1 15:51:40 2014 -0500
C: fix #312 -DNO_DYNAMIC_LOADING with --staticxs disables DynaLoader
--staticxs explicitly sets -DNO_DYNAMIC_LOADING which prevents DynaLoader being booted.
And then uses NO_DYNAMIC_LOADING to decide if to dynaload or boot the staticxs modules.
We need to keep the first part, always boot DynaLoader (if usedl is available),
renamed NO_DYNAMIC_LOADING to STATICXS to avoid further confusion
changed in C and perlcc.
Original comment by reini.urban
on 1 May 2014 at 9:06
I needed 2nd fix also:
commit 586a772fde9d52f9ba0defa7bf192ae77a1f4ff8
Author: Reini Urban <rurban@cpanel.net>
Date: Fri May 2 10:33:07 2014 -0500
perlcc: oops, fix prev. -DNO_DYNAMIC_LOADING with STATICXS on non-MSVC compilers
Original comment by reini.urban
on 2 May 2014 at 3:40
Original issue reported on code.google.com by
chro...@gmail.com
on 1 May 2014 at 7:55