xslate / p5-Mouse

Lightweight class builder for Perl, as a subset of Moose
https://metacpan.org/release/Mouse
Other
46 stars 32 forks source link

Pages and pages of test failures on Perl 5.8 (CentOS 5) #63

Closed wyoung closed 8 years ago

wyoung commented 8 years ago

Mouse builds just fine on this system, but make test gives pages and pages of complaints, of which this is the first bit before it starts repeating itself:

xs tests.
Generate Mouse::Tiny ...
done.
xs-src/MouseAccessor.xs => xs-src/MouseAccessor.c
xs-src/MouseAttribute.xs => xs-src/MouseAttribute.c
xs-src/MouseTypeConstraints.xs => xs-src/MouseTypeConstraints.c
xs-src/MouseUtil.xs => xs-src/MouseUtil.c
gcc -I. -Ixs-src -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -fPIC -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o xs-src/MouseAccessor.o xs-src/MouseAccessor.c
xs-src/MouseAccessor.xs: In function ‘mouse_attr_set’:
xs-src/MouseAccessor.xs:214: warning: ‘old_value’ may be used uninitialized in this function
gcc -I. -Ixs-src -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -fPIC -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o xs-src/MouseAttribute.o xs-src/MouseAttribute.c
gcc -I. -Ixs-src -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -fPIC -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o xs-src/MouseTypeConstraints.o xs-src/MouseTypeConstraints.c
xs-src/MouseTypeConstraints.xs: In function ‘S_nv_is_integer’:
xs-src/MouseTypeConstraints.xs:156: warning: ignoring return value of ‘gcvt’, declared with attribute warn_unused_result
xs-src/MouseTypeConstraints.xs: In function ‘mouse_tc_generate’:
xs-src/MouseTypeConstraints.xs:509: warning: passing argument 2 of ‘Perl_newXS’ discards qualifiers from pointer target type
gcc -I. -Ixs-src -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -fPIC -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o xs-src/MouseUtil.o xs-src/MouseUtil.c
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o blib/arch/auto/Mouse/Mouse.so lib/Mouse.o xs-src/MouseAccessor.o xs-src/MouseAttribute.o xs-src/MouseTypeConstraints.o xs-src/MouseUtil.o
/usr/bin/perl: symbol lookup error: /home/etr/.cpanm/work/1472002074.25280/Mouse-v2.4.5/blib/arch/auto/Mouse/Mouse.so: undefined symbol: DPPP_my_gv_fetchpvn_flags
t/000-load.t ................................................... 
Dubious, test returned 127 (wstat 32512, 0x7f00)
Failed 2/2 subtests 
/usr/bin/perl: symbol lookup error: /home/etr/.cpanm/work/1472002074.25280/Mouse-v2.4.5/blib/arch/auto/Mouse/Mouse.so: undefined symbol: DPPP_my_gv_fetchpvn_flags
t/000_recipes/002_schwartz_tutorial.t .......................... 
Dubious, test returned 127 (wstat 32512, 0x7f00)
No subtests run 
/usr/bin/perl: symbol lookup error: /home/etr/.cpanm/work/1472002074.25280/Mouse-v2.4.5/blib/arch/auto/Mouse/Mouse.so: undefined symbol: DPPP_my_gv_fetchpvn_flags
t/000_recipes/basics-recipe10.t ................................ 
Dubious, test returned 127 (wstat 32512, 0x7f00)
Failed 10/10 subtests 

There's a lot more, but I think it all stems from that strange link error complaining about undefined symbol: DPPP_my_gv_fetchpvn_flags. What does it want?

I'm not using Mouse directly, but instead am getting it as a dependency via DancerDancer::Template::XslateText::Xslate.

This is with the latest platform-provided Perl, v5.8.8. (Don't complain about it, CentOS 5 is still in support, and this is what they provide.) If I need to downgrade to an older version of Mouse, please let me know which version.

wyoung commented 8 years ago

I've since discovered that this has something to do with Devel::PPPort, and that the base API function in question is gv_fetchpvn_flags(), but according to man Devel::PPPort, gv_fetchpvn_flags() is from Perl 5.9.2 and isn't supported. Yet, I cannot see that Mouse is even trying to call this function, so where is the link error coming from?

For what it's worth, since starting down this path, I've blown away my old CPAN module installation directory, in order to rebuild all modules afresh against my current Perl version, so I can't see that there could be any old cruft sitting around confusing things.

wyoung commented 8 years ago

More info: apparently Devel::PPPort does provide this function now, detecting when it's run on a system too old to have it natively. And, it appears to be present:

$ nm -C /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/Devel/PPPort/PPPort.so | grep fetchpvn
0000000000012590 t DPPP_my_gv_fetchpvn_flags

If you look at the output in the original post, it looks like the problem is that Mouse is not linking to PPPort.so. I have no idea how to make it do so, but while waiting for an answer, I will try to figure it out on my own.

wyoung commented 8 years ago

All tests are successful when forcing pure-Perl:

$ PERL_ONLY=1 ./Build test

I'm going to install this and move on, then see if Dancer works despite the problems.

I dug into the Minilla docs, and couldn't see a way to affect how it links binaries, so I'm stuck on that front.

wyoung commented 8 years ago

I've found the problem: it was introduced in Devel::PPPort 3.33, the very next version past the one we last successfully tested against on CentOS 5. Rolling back to 3.32 solves the Mouse make test failures.

I'm taking this up with them now.

jjn1056 commented 7 years ago

Thanks you saved my deploy tonight! I had similar problem also on CentOS5 but with Data::Clone, if gave the same error and downgrading helped. I'll try to help get it fixed.