t/base/rs.t needs to @INClude the lib directory before requiring
PerlIO::scalar, even if the require is in an eval, because it will
otherwise pick up a previously-installed copy.
Since
87b9e1600 (Eliminate PL_* accessor functions under ithreads), a
binary-incompatible change, I’ve been getting these errors:
t/base/rs......................................................dyld: lazy symbol binding failed: Symbol not found: _Perl_Istack_sp_ptr
Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _Perl_Istack_sp_ptr
Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle
Expected in: dynamic lookup
FAILED--no leader found
Failed a basic test (base/rs.t) -- cannot continue.
make: *** [test] Error 255
}
-if (not eval q/use PerlIO::scalar; use PerlIO::via::scalar; 1/) {
+{
+ # If we do not include the lib directories, we may end up picking up a
+ # binary-incompatible previously-installed version. The eval won’t help in
+ # intercepting a SIGTRAP.
+ local @INC = ("../lib", "lib", @INC);
+ if (not eval q/use PerlIO::scalar; use PerlIO::via::scalar; 1/) {
# In-memory files necessitate PerlIO::via::scalar, thus a perl with
# perlio and dynaloading enabled. miniperl won't be able to run this
# test, so skip it
print "ok $test # skipped - Can't test in memory file with miniperl/without PerlIO::Scalar\n";
$test_count++;
}
-}
-else {
+ }
+ else {
# Test if a file in memory behaves the same as a real file (= re-run the test with a file in memory)
open TESTFILE, "<", \$teststring;
test_string(*TESTFILE);
open TESTFILE, "<", \$teststring2;
test_record(*TESTFILE);
close TESTFILE;
+ }
}
# Get rid of the temp file