Comment 4 for bug 407412

Revision history for this message
josh803316 (josh803316) wrote : Re: [Bug 407412] Re: Make test fails on Fedora Core 64bit machines

Dennis,
You are absolutely correct, I hadn't gotten the latest trunk. It worked
just as you suggested and here is the outcome:

[root@jnispc gearmanxs]# export GEARMAN_INCLUDE=/usr/local/include/
[root@jnispc gearmanxs]# export GEARMAN_LIB=/usr/local/lib/
[root@jnispc gearmanxs]# perl Makefile.PL
Using GEARMAN_LIB = /usr/local/lib/
Using GEARMAN_INCLUDE = /usr/local/include/
Checking if your kit is complete...
Looks good
Writing Makefile for Gearman::XS
[root@jnispc gearmanxs]# make
cp lib/Gearman/XS.pm blib/lib/Gearman/XS.pm
cp lib/Gearman/XS/Client.pm blib/lib/Gearman/XS/Client.pm
cp lib/Gearman/XS/Job.pm blib/lib/Gearman/XS/Job.pm
cp lib/Gearman/XS/Worker.pm blib/lib/Gearman/XS/Worker.pm
cp lib/Gearman/XS/Task.pm blib/lib/Gearman/XS/Task.pm
/usr/bin/perl /usr/lib/perl5/5.10.0/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.10.0/ExtUtils/typemap -typemap typemap XS.xs > XS.xsc &&
mv XS.xsc XS.c
gcc -c -I. -I/usr/local/include/ -D_REENTRANT -D_GNU_SOURCE
-DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe
-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
-DVERSION=\"0.4\" -DXS_VERSION=\"0.4\" -fPIC
"-I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE" XS.c
XS.xs: In function ‘_perl_worker_function_callback’:
XS.xs:122: warning: value computed is not used
Running Mkbootstrap for Gearman::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/Gearman/XS/XS.so
LD_RUN_PATH="/usr/local/lib" gcc -shared -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic XS.o -o
blib/arch/auto/Gearman/XS/XS.so \
       -L/usr/local/lib/ -lgearman \

chmod 755 blib/arch/auto/Gearman/XS/XS.so
cp XS.bs blib/arch/auto/Gearman/XS/XS.bs
chmod 644 blib/arch/auto/Gearman/XS/XS.bs
Manifying blib/man3/Gearman::XS::Client.3pm
Manifying blib/man3/Gearman::XS.3pm
Manifying blib/man3/Gearman::XS::Job.3pm
Manifying blib/man3/Gearman::XS::Worker.3pm
Manifying blib/man3/Gearman::XS::Task.3pm
[root@jnispc gearmanxs]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-use.t .......... 1/5 # Testing Gearman::XS 0.4
t/00-use.t .......... ok
t/02-pod.t .......... ok
t/03-basic.t ........ ok
t/04-live.t ......... ok
t/05-live-worker.t .. ok
t/99-perlcritic.t ... skipped: Author test. Set $ENV{TEST_AUTHOR} to a true
value to run.
All tests successful.
Files=6, Tests=184, 1 wallclock secs ( 0.06 usr 0.01 sys + 0.25 cusr
0.05 csys = 0.37 CPU)
Result: PASS
[root@jnispc gearmanxs]# make install
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/auto/Gearman/XS/XS.so
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Gearman/XS.pm
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Gearman/XS/Task.pm
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Gearman/XS/Job.pm
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Gearman/XS/Worker.pm
Installing
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Gearman/XS/Client.pm
Installing /usr/local/share/man/man3/Gearman::XS::Worker.3pm
Installing /usr/local/share/man/man3/Gearman::XS.3pm
Installing /usr/local/share/man/man3/Gearman::XS::Job.3pm
Installing /usr/local/share/man/man3/Gearman::XS::Task.3pm
Installing /usr/local/share/man/man3/Gearman::XS::Client.3pm
Appending installation info to
/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/perllocal.pod

2009/8/7 Dennis Schön <email address hidden>

> Hi Josh,
>
> thanks for your answer. Are you sure you're trying with the latest
> trunk? You can get it with:
>
> bzr clone lp:gearmanxs
>
> When you've set the environment variables the makefile should output:
>
> dschoen@nb-dschoen-2:~/repos/gearmanxs/trunk $ perl Makefile.PL
> Using GEARMAN_LIB = /usr/local/lib/
> Checking if your kit is complete...
> Looks good
> Writing Makefile for Gearman::XS
>
>
> notice the "Using GEARMAN_LIB=..." line.
>
>
> cheers,
> Dennis
>
> --
> Make test fails on Fedora Core 64bit machines
> https://bugs.launchpad.net/bugs/407412
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gearman Perl Frontend: Fix Committed
>
> Bug description:
> I have had trouble getting the Gearman::XS modules to install via cpan
> because the Makefile isn't built to find a non-standard libgearman location.
> On some Linux machines the standard C gearman installation goes to
> /usr/lib64 or /usr/local/lib instead of /usr/lib....... the fix for this was
> to change the Makefile.PL file manually (see below the issue)
>
>
> (ISSUE HERE)
> via cpan:
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/Gearman-XS.t .. 1/105
> # Failed test 'use Gearman::XS;'
> # at t/Gearman-XS.t line 13.
> # Tried to use 'Gearman::XS'.
> # Error: Can't load
> '/root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/arch/auto/Gearman/XS/XS.so'
> for module Gearman::XS:
> /root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/arch/auto/Gearman/XS/XS.so:
> undefined symbol: gearman_worker_add_server at
> /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/DynaLoader.pm line 203.
> # at (eval 4) line 2
> # Compilation failed in require at (eval 4) line 2.
> # BEGIN failed--compilation aborted at (eval 4) line 2.
>
> # Failed test 'use Gearman::XS::Client;'
> # at t/Gearman-XS.t line 14.
> # Tried to use 'Gearman::XS::Client'.
> # Error: Attempt to reload Gearman/XS.pm aborted.
> # Compilation failed in require at
> /root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/lib/Gearman/XS/Client.pm line
> 13.
> # BEGIN failed--compilation aborted at
> /root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/lib/Gearman/XS/Client.pm line
> 13.
> # Compilation failed in require at (eval 5) line 2.
> # BEGIN failed--compilation aborted at (eval 5) line 2.
>
> # Failed test 'use Gearman::XS::Worker;'
> # at t/Gearman-XS.t line 15.
> # Tried to use 'Gearman::XS::Worker'.
> # Error: Attempt to reload Gearman/XS.pm aborted.
> # Compilation failed in require at
> /root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/lib/Gearman/XS/Worker.pm line
> 13.
> # BEGIN failed--compilation aborted at
> /root/.cpan/build/Gearman-XS-0.2-ro0p30/blib/lib/Gearman/XS/Worker.pm line
> 13.
> # Compilation failed in require at (eval 6) line 2.
> # BEGIN failed--compilation aborted at (eval 6) line 2.
> Attempt to reload Gearman/XS.pm aborted.
> Compilation failed in require at t/Gearman-XS.t line 20.
> BEGIN failed--compilation aborted at t/Gearman-XS.t line 20.
> # Looks like you planned 105 tests but ran 3.
> # Looks like you failed 3 tests of 3 run.
> # Looks like your test exited with 2 just after 3.
> t/Gearman-XS.t .. Dubious, test returned 2 (wstat 512, 0x200)
> Failed 105/105 subtests
>
> Test Summary Report
> -------------------
> t/Gearman-XS.t (Wstat: 512 Tests: 3 Failed: 3)
> Failed tests: 1-3
> Non-zero exit status: 2
> Parse errors: Bad plan. You planned 105 tests but ran 3.
> Files=1, Tests=3, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.04 cusr 0.00
> csys = 0.08 CPU)
> Result: FAIL
> Failed 1/1 test programs. 3/3 subtests failed.
> ##########################################
>
> (From Dennis this is the fix)
> That's the problem, the build can't find the library. Don't ask me why
> that's reported as "probably harmless". :)
>
> This is where the libraries are installled:
>
> /usr/local/include/libgearman
> /usr/local/lib/libgearman.a
>
>
> hm, that looks ok to me. Please try to change the following line in
> Makefile.pl:
> LIBS => ['-lgearman'],
> to
> LIBS => ['-L/usr/local/lib/ -lgearman'],
>
> and rebuild Gearman::XS.
> ####################################
>