Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH 5.8.x] ext/DynaLoader/t/XSLoader.t assumes dynamic loading #9490

Closed
p5pRT opened this issue Sep 22, 2008 · 5 comments
Closed

[PATCH 5.8.x] ext/DynaLoader/t/XSLoader.t assumes dynamic loading #9490

p5pRT opened this issue Sep 22, 2008 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 22, 2008

Migrated from rt.perl.org#59208 (status was 'resolved')

Searchable as RT59208$

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2008

From @doughera88

On perl-5.8.x @​ 34398, compiled without dynamic loading
(i.e. I ran Configure with -Uusedl) I get the following test failure​:

../ext/DynaLoader/t/XSLoader....
not ok 5 - calling XSLoader​::load() under a package with no XS part
# Failed test 'calling XSLoader​::load() under a package with no XS part'
# at ../ext/DynaLoader/t/XSLoader.t line 55.
# 'Can't load module Thwack, dynamic loading not available in this perl.
# (You may need to build a new perl executable which either supports
# dynamic loading or has the Thwack module statically linked into it.)
# at ../ext/DynaLoader/t/XSLoader.t line 54
# '
# doesn't match '/^Can't locate loadable object for module Thwack in @​INC/'

If you build perl without dynamic loading, the error message is different.
This patch adjusts the test's expectations accordingly.

Inline Patch
--- perl-5.8.x/ext/DynaLoader/t/XSLoader.t	2008-09-19 17:03:43.000000000 -0400
+++ perl-5.8.x-andy/ext/DynaLoader/t/XSLoader.t	2008-09-22 13:31:51.760219335 -0400
@@ -52,8 +52,14 @@
         "calling XSLoader::load() with no argument" );
 
 eval q{ package Thwack; XSLoader::load('Thwack'); };
-like( $@, q{/^Can't locate loadable object for module Thwack in @INC/},
-        "calling XSLoader::load() under a package with no XS part" );
+if ($Config{usedl}) {
+    like( $@, q{/^Can't locate loadable object for module Thwack in @INC/},
+	"calling XSLoader::load() under a package with no XS part" );
+}
+else {
+    like( $@, q{/^Can't load module Thwack, dynamic loading not available in this perl./},
+	"calling XSLoader::load() under a package with no XS part" );
+}
 
 # Now try to load well known XS modules
 my $extensions = $Config{'extensions'};

-- 

  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2008

From @smpeters

On Mon Sep 22 10​:37​:31 2008, doughera wrote​:

On perl-5.8.x @​ 34398, compiled without dynamic loading
(i.e. I ran Configure with -Uusedl) I get the following test failure​:

../ext/DynaLoader/t/XSLoader....
not ok 5 - calling XSLoader​::load() under a package with no XS part
# Failed test 'calling XSLoader​::load() under a package with no XS
part'
# at ../ext/DynaLoader/t/XSLoader.t line 55.
# 'Can't load module Thwack, dynamic loading not
available in this perl.
# (You may need to build a new perl executable which either supports
# dynamic loading or has the Thwack module statically linked into
it.)
# at ../ext/DynaLoader/t/XSLoader.t line 54
# '
# doesn't match '/^Can't locate loadable object for module Thwack
in @​INC/'

If you build perl without dynamic loading, the error message is
different.
This patch adjusts the test's expectations accordingly.

--- perl-5.8.x/ext/DynaLoader/t/XSLoader.t 2008-09-19
17​:03​:43.000000000 -0400
+++ perl-5.8.x-andy/ext/DynaLoader/t/XSLoader.t 2008-09-22
13​:31​:51.760219335 -0400
@​@​ -52,8 +52,14 @​@​
"calling XSLoader​::load() with no argument" );

eval q{ package Thwack; XSLoader​::load('Thwack'); };
-like( $@​, q{/^Can't locate loadable object for module Thwack in
@​INC/},
- "calling XSLoader​::load() under a package with no XS part" );
+if ($Config{usedl}) {
+ like( $@​, q{/^Can't locate loadable object for module Thwack in
@​INC/},
+ "calling XSLoader​::load() under a package with no XS part" );
+}
+else {
+ like( $@​, q{/^Can't load module Thwack, dynamic loading not
available in this perl./},
+ "calling XSLoader​::load() under a package with no XS part" );
+}

# Now try to load well known XS modules
my $extensions = $Config{'extensions'};

Thanks! I applied this patch as change #34402.

Steve Peters

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2008

@smpeters - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Sep 23, 2008
@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2008

From maddingue@free.fr

Steve Peters wrote​:

On Mon Sep 22 10​:37​:31 2008, doughera wrote​:

On perl-5.8.x @​ 34398, compiled without dynamic loading
(i.e. I ran Configure with -Uusedl) I get the following test failure​:

../ext/DynaLoader/t/XSLoader....
not ok 5 - calling XSLoader​::load() under a package with no XS part
# Failed test 'calling XSLoader​::load() under a package with no XS
part'
# at ../ext/DynaLoader/t/XSLoader.t line 55.
# 'Can't load module Thwack, dynamic loading not
available in this perl.
# (You may need to build a new perl executable which either
supports
# dynamic loading or has the Thwack module statically linked into
it.)
# at ../ext/DynaLoader/t/XSLoader.t line 54
# '
# doesn't match '/^Can't locate loadable object for module Thwack
in @​INC/'

If you build perl without dynamic loading, the error message is
different.
This patch adjusts the test's expectations accordingly.

--- perl-5.8.x/ext/DynaLoader/t/XSLoader.t 2008-09-19
17​:03​:43.000000000 -0400
+++ perl-5.8.x-andy/ext/DynaLoader/t/XSLoader.t 2008-09-22
13​:31​:51.760219335 -0400
@​@​ -52,8 +52,14 @​@​
"calling XSLoader​::load() with no argument" );

eval q{ package Thwack; XSLoader​::load('Thwack'); };
-like( $@​, q{/^Can't locate loadable object for module Thwack in
@​INC/},
- "calling XSLoader​::load() under a package with no XS
part" );
+if ($Config{usedl}) {
+ like( $@​, q{/^Can't locate loadable object for module Thwack in
@​INC/},
+ "calling XSLoader​::load() under a package with no XS part" );
+}
+else {
+ like( $@​, q{/^Can't load module Thwack, dynamic loading not
available in this perl./},
+ "calling XSLoader​::load() under a package with no XS part" );
+}

# Now try to load well known XS modules
my $extensions = $Config{'extensions'};

Thanks! I applied this patch as change #34402.

Thanks, applied as well.
The tarball and patch for version 0.10 are ready but I want to check
the CPAN Testers reports first. I'll send both tonight.

--
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant