Make test fails on Fedora Core 64bit machines

Bug #407412 reported by josh803316
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman::XS
Fix Released
Low
Dennis Schön

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.
####################################

Related branches

Revision history for this message
Dennis Schön (roccoblues) wrote :

please try to rebuild without touching the Makefile.PL. You can set the include and lib path with:

export GEARMAN_INCLUDE=/usr/local/include/
export GEARMAN_LIB=/usr/local/lib/

Changed in gearmanxs:
assignee: nobody → Dennis Schön (roccoblues)
importance: Undecided → Low
milestone: none → 0.5
status: New → Fix Committed
Revision history for this message
josh803316 (josh803316) wrote : Re: [Bug 407412] Re: Make test fails on Fedora Core 64bit machines
Download full text (6.2 KiB)

Sorry, I had a system crash so I wasn't able to get to this sooner.

This still didn't work:

[root@jnispc Gearman-XS-0.4-0qoDyN]# export
GEARMAN_INCLUDE=/usr/local/include/
[root@jnispc Gearman-XS-0.4-0qoDyN]# export GEARMAN_LIB=/usr/local/lib/
[root@jnispc Gearman-XS-0.4-0qoDyN]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgearman
Writing Makefile for Gearman::XS

#locate libgearman
/usr/local/include/libgearman
/usr/local/include/libgearman/client.h
/usr/local/include/libgearman/con.h
/usr/local/include/libgearman/conf.h
/usr/local/include/libgearman/conf_module.h
/usr/local/include/libgearman/conn.h
/usr/local/include/libgearman/constants.h
/usr/local/include/libgearman/gearman.h
/usr/local/include/libgearman/gearmand.h
/usr/local/include/libgearman/gearmand_con.h
/usr/local/include/libgearman/gearmand_thread.h
/usr/local/include/libgearman/job.h
/usr/local/include/libgearman/modconf.h
/usr/local/include/libgearman/modconf_constants.h
/usr/local/include/libgearman/modconf_module.h
/usr/local/include/libgearman/modconf_structs.h
/usr/local/include/libgearman/packet.h
/usr/local/include/libgearman/protocol_http.h
/usr/local/include/libgearman/server.h
/usr/local/include/libgearman/server_client.h
/usr/local/include/libgearman/server_con.h
/usr/local/include/libgearman/server_function.h
/usr/local/include/libgearman/server_job.h
/usr/local/include/libgearman/server_packet.h
/usr/local/include/libgearman/server_thread.h
/usr/local/include/libgearman/server_worker.h
/usr/local/include/libgearman/structs.h
/usr/local/include/libgearman/task.h
/usr/local/include/libgearman/visibility.h
/usr/local/include/libgearman/worker.h
/usr/local/lib/libgearman.a
/usr/local/lib/libgearman.la
/usr/local/lib/libgearman.so
/usr/local/lib/libgearman.so.0
/usr/local/lib/libgearman.so.0.0.5
/usr/local/lib/libgearman.so.1
/usr/local/lib/libgearman.so.1.0.0
/usr/local/lib/libgearman.so.1.0.1
/usr/local/lib/libgearman.so.1.0.2

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

> please try to rebuild without touching the Makefile.PL. You can set the
> include and lib path with:
>
> export GEARMAN_INCLUDE=/usr/local/include/
> export GEARMAN_LIB=/usr/local/lib/
>
> ** Changed in: gearmanxs
> Importance: Undecided => Low
>
> ** Changed in: gearmanxs
> Status: New => Fix Committed
>
> ** Changed in: gearmanxs
> Milestone: None => 0.5
>
> ** Changed in: gearmanxs
> Assignee: (unassigned) => Dennis Schön (roccoblues)
>
> --
> 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 "-MEx...

Read more...

Revision history for this message
Dennis Schön (roccoblues) wrote :

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

Revision history for this message
josh803316 (josh803316) wrote :
Download full text (7.9 KiB)

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/lo...

Read more...

Changed in gearmanxs:
status: Fix Committed → Fix Released
Revision history for this message
josh803316 (josh803316) wrote :
Download full text (4.5 KiB)

I get the same failure when attempting to upgrade via cpan. Looks like the
libgearman still isn't found. It is in /usr/local/lib

# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib64
/usr/lib
/usr/local/lib

# perl Makefile.PL
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::More ...loaded. (0.92)
- Storable ...loaded. (2.21)
*** Module::AutoInstall configuration finished.
Note (probably harmless): No library found for -lgearman
Writing Makefile for Gearman::XS

I'm sure this is because of my environment but it was a standard Fedora Core
11 install and then a standard gearmand install on an x86_64 system. I just
thought we should keep tracking this.

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

> ** Changed in: gearmanxs
> Status: Fix Committed => Fix Released
>
> --
> 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 Released
>
> 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 ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.