Bug 905369 - Installation of module XML::LibXSLT fails
Summary: Installation of module XML::LibXSLT fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-29 09:30 UTC by Jan Pazdziora
Modified: 2015-05-14 23:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 14:24:59 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Pazdziora 2013-01-29 09:30:23 UTC
Description of problem:

When Perl application tries to use the XML::LibXSLT Perl module, the installation fails because of

/usr/bin/ld: cannot find -lgdbm

I did not find any way to tell OpenShift that it should install the gdbm-devel rpm which would bring the libgdbm.so.

Version-Release number of selected component (if applicable):

OpenShift with Perl cartridge as of today.

How reproducible:

Deterministic.

Steps to Reproduce:
1. Create new application with Perl cartridge.
2. Apply patch:

diff --git a/perl/index.pl b/perl/index.pl
index c851391..3d30cdb 100644
--- a/perl/index.pl
+++ b/perl/index.pl
@@ -1,4 +1,7 @@
 #!/usr/bin/perl
+
+use XML::LibXSLT;
+
 print "Content-type: text/html\r\n\r\n";
 print <<EOF
 <!doctype html>

3. Commit push.
  
Actual results:

remote: Building XML-LibXML-2.0014 ... OK
remote: Successfully installed XML-LibXML-2.0014
remote: Building XML-LibXSLT-1.80 ... FAIL
remote: ! Installing XML::LibXSLT failed. See /var/lib/openshift/d710c2e8e5d44f7d8adcb5127a7bd74a/.cpanm/build.log for details.
remote: 5 distributions installed
remote: Running .openshift/action_hooks/build

and in the log there is

Successfully installed XML-LibXML-2.0014
Building XML-LibXSLT-1.80
cp LibXSLT.pm blib/lib/XML/LibXSLT.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl5/ExtUtils/typemap -typemap typemap  LibXSLT.xs > LibXSLT.xsc && mv LibXSLT.xsc LibXSLT.c
gcc -c  -I/usr/local/include -I/usr/include -I/usr/include/libxml2   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.80\" -DXS_VERSION=\"1.80\" -fPIC "-I/usr/lib64/perl5/CORE"  -DHAVE_BLANK -DHAVE_BLANK -DHAVE_EXSLT LibXSLT.c
LibXSLT.xs: In function ‘LibXSLT__function’:
LibXSLT.xs:252: warning: pointer targets in passing argument 1 of ‘xmlNewDoc’ differ in signedness
/usr/include/libxml2/libxml/tree.h:735: note: expected ‘const xmlChar *’ but argument is of type ‘char *’
LibXSLT.xs: In function ‘LibXSLT_context_element’:
LibXSLT.xs:518: warning: unused variable ‘ent’
LibXSLT.xs: In function ‘LibXSLT_init_functions’:
LibXSLT.xs:916: warning: suggest parentheses around assignment used as truth value
LibXSLT.xs: In function ‘LibXSLT_init_elements’:
LibXSLT.xs:948: warning: suggest parentheses around assignment used as truth value
gcc -c  -I/usr/local/include -I/usr/include -I/usr/include/libxml2   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.80\" -DXS_VERSION=\"1.80\" -fPIC "-I/usr/lib64/perl5/CORE"  -DHAVE_BLANK -DHAVE_BLANK -DHAVE_EXSLT perl-libxml-mm.c
Running Mkbootstrap for XML::LibXSLT ()
chmod 644 LibXSLT.bs
rm -f blib/arch/auto/XML/LibXSLT/LibXSLT.so
gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic LibXSLT.o perl-libxml-mm.o  -o blib/arch/auto/XML/LibXSLT/LibXSLT.so       \
           -L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm -lexslt -lgcrypt -ldl -lgpg-error -lresolv -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc      \
          
/usr/bin/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/XML/LibXSLT/LibXSLT.so] Error 1
-> FAIL Installing XML::LibXSLT failed. See /var/lib/openshift/d710c2e8e5d44f7d8adcb5127a7bd74a/.cpanm/build.log for details.
5 distributions installed

Expected results:

Installation of the XML::LibXSLT module passes and application can be used.

Additional info:

One solution is to add the gdbm-devel package to the Perl cartridge -- it already has /usr/bin/xslt-config (from libxslt-devel, I assume) installed anyway.

Another possibility is to add perl-XML-LibXSLT rpm to the Perl cartridge -- it is in the Optional channel.

Another possibility is for the Perl cartridge to install the "perl(the-module)" rpm package first, before trying to compile the module from CPAN somehow.

Comment 1 Jan Pazdziora 2013-01-29 09:42:03 UTC
Hmm, the problem probably start somewhere earlier, around:

Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.55_02)
Configuring XML-LibXSLT-1.80
Running Makefile.PL
running xslt-config... using fallback values for LIBS and INC
failed
options:
  LIBS='-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm'
  INC='-I/usr/local/include -I/usr/include'
If this is wrong, Re-run as:
  $ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include'

looking for -lxslt... yes
looking for -lexslt... yes
running pkg-config libexslt... Warning: prerequisite XML::LibXML 1.70 not found.
ok
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -ldb

The "running xslt-config... failed" most probably stems from the fact that the Makefile.PL wants at least version 1.1.28 of libxslt and the version is

> xslt-config --version
1.1.26

Comment 2 Jan Pazdziora 2013-01-29 13:55:51 UTC
A quick chat with perl component maintainer suggests that it actually might be a problem with perl packaging, see bug 905482. If that turns out to be true, we might want to put some workaround to the Perl cartridges, until it is somehow resovled in RHEL 6.

Comment 3 Jan Pazdziora 2013-01-29 13:56:43 UTC
(In reply to comment #1)
> Hmm, the problem probably start somewhere earlier, around:
> 
> Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.55_02)
> Configuring XML-LibXSLT-1.80
> Running Makefile.PL
> running xslt-config... using fallback values for LIBS and INC
> failed

[...]

> The "running xslt-config... failed" most probably stems from the fact that
> the Makefile.PL wants at least version 1.1.28 of libxslt and the version is
> 
> > xslt-config --version
> 1.1.26

While this might be a problem for using xslt-config, this (the version of libxslt) should not be a blocker for getting the XML::LibXSLT built.

Comment 4 manoj 2013-02-01 19:52:07 UTC
Looking for library that contains the broker.

Comment 5 Troy Dawson 2013-02-01 20:26:04 UTC
I'm not sure why this just got assigned to me.
The broker is in rubygem-openshift-origin-broker, but that isn't even mentioned earlier in this ticket.

What do you want me to do and/or fix?

Comment 6 Dan McPherson 2013-02-04 20:03:20 UTC
Hi Troy,

   I think what Manoj was trying to say:  We need the XML::LibXSLT Perl module packaged.  We didn't know enough about perl packaging to know what that looks like in rpm terms.

-Dan

Comment 7 Troy Dawson 2013-02-04 20:07:56 UTC
Ahh ... OK.  This makes sense now.  I'll get right on that.

Comment 8 Troy Dawson 2013-02-05 00:22:59 UTC
Initial tests:
- added gdbm-devel rpm's : still fails
- added perl-XML-LibXSLT and perl-XML-LibXML (version 1.70) rpm's : still tries to download version 1.80 of LibXSLT, still fails.

I will work on getting a 1.80 version of LibXSLT, LibXML, and their corresponding dependancies done tomorrow.  See if that fixes things.

Comment 9 Jan Pazdziora 2013-02-05 06:43:58 UTC
(In reply to comment #8)
> Initial tests:
> - added gdbm-devel rpm's : still fails

Well, this will complain but build and install from CPAN just fine, won't it?

> - added perl-XML-LibXSLT and perl-XML-LibXML (version 1.70) rpm's : still
> tries to download version 1.80 of LibXSLT, still fails.

This does not sound right. Why would it try to install the module from CPAN if you have it installed from rpm? Can you investigate the cause of this?

Comment 10 Troy Dawson 2013-02-05 14:35:40 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Initial tests:
> > - added gdbm-devel rpm's : still fails
> 
> Well, this will complain but build and install from CPAN just fine, won't it?
> 
> > - added perl-XML-LibXSLT and perl-XML-LibXML (version 1.70) rpm's : still
> > tries to download version 1.80 of LibXSLT, still fails.
> 
> This does not sound right. Why would it try to install the module from CPAN
> if you have it installed from rpm? Can you investigate the cause of this?

That's a good point.  Maybe our rpm is messed up and doesn't install everything in the correct places.  It didn't try to download any of the other packages, just XML-LibXSLT

investigating ...

Comment 11 manoj 2013-02-06 19:11:54 UTC
Does not block release, marking FutureFeature

Comment 12 Troy Dawson 2013-02-07 23:23:46 UTC
OK, fixed.  
Well, you now just need to have gdbm-devel on the machine.  So please add gdbm-devel to the perl cartrdige dependancies.

I'd love to say I did something, but all I did was use the latest dev AMI's.  So something in the latest AMI's fixed the problem.
It wasn't working for me the other day.  But today I brought up a new devenv machine, installed gdbm-devel on it, and it works.
I did try it before I put gdbm-devel on it, still broken.

Should I assign this back to whoever is working on the perl cartridge?  Or did you want me to update it?

Comment 13 Jhon Honce 2013-02-16 18:12:19 UTC
Fixed in https://github.com/openshift/origin-server/pull/1384

When testing add 'XML::LibXSLT' to deplist.txt

Comment 14 openshift-github-bot 2013-02-16 19:14:49 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/0fe7d5e87adef3aebeeea47dd94a50f6bfb41b4c
Bug 905369 - Add gdbm-devel to dependancies

* Support using XML::LibXML in applications

Comment 15 Jianwei Hou 2013-02-17 02:11:13 UTC
Verified on devenv_2822

[root@ip-10-143-182-210 openshift]# rpm -q gdbm-devel
gdbm-devel-1.8.0-36.el6.x86_64

Now we have the gdbm-devel installed, so the problem is gone when building app with this dependency

1 file changed, 3 insertions(+)
Warning: Permanently added 'perl1-2822t.dev.rhcloud.com,107.21.165.114' (RSA) to the list of known hosts.
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 357 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: restart_on_add=false
remote: Waiting for stop to finish
remote: Done
remote: restart_on_add=false
remote: Running .openshift/action_hooks/pre_build
remote: --> Working on XML::LibXSLT
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXSLT-1.80.tar.gz ... OK
remote: Configuring XML-LibXSLT-1.80 ... OK
remote: ==> Found dependencies: XML::LibXML
remote: --> Working on XML::LibXML
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0014.tar.gz ... OK
remote: Configuring XML-LibXML-2.0014 ... OK
remote: ==> Found dependencies: XML::SAX, XML::NamespaceSupport, ExtUtils::MakeMaker
remote: --> Working on XML::SAX
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/G/GR/GRANTM/XML-SAX-0.99.tar.gz ... OK
remote: Configuring XML-SAX-0.99 ... OK
remote: ==> Found dependencies: XML::NamespaceSupport, XML::SAX::Base
remote: --> Working on XML::NamespaceSupport
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.
gz ... OK
remote: Configuring XML-NamespaceSupport-1.11 ... OK
remote: Building XML-NamespaceSupport-1.11 ... OK
remote: Successfully installed XML-NamespaceSupport-1.11
^[[B^[[B^[[Bremote: --> Working on XML::SAX::Base
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-1.08.tar.gz ... OK
Aremote: Configuring XML-SAX-Base-1.08 ... OK
remote: Building XML-SAX-Base-1.08 ... OK
remote: Successfully installed XML-SAX-Base-1.08
remote: Building XML-SAX-0.99 ... OK
remote: Successfully installed XML-SAX-0.99
remote: --> Working on ExtUtils::MakeMaker
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.64.tar.gz
 ... OK
remote: Configuring ExtUtils-MakeMaker-6.64 ... OK
remote: Building ExtUtils-MakeMaker-6.64 ... OK
remote: Successfully installed ExtUtils-MakeMaker-6.64 (upgraded from 6.55_02)
remote: Building XML-LibXML-2.0014 ... OK
remote: Successfully installed XML-LibXML-2.0014
remote: Building XML-LibXSLT-1.80 ... OK
remote: Successfully installed XML-LibXSLT-1.80
remote: 6 distributions installed
remote: Running .openshift/action_hooks/build
remote: Running .openshift/action_hooks/deploy
remote: hot_deploy_added=false
remote: Done
remote: Running .openshift/action_hooks/post_deploy
To ssh://512039f3a4f3d7ed9f00003f@perl1-2822t.dev.rhcloud.com/~/git/perl1.git/
   af82461..a047955  master -> master


Note You need to log in before you can comment on or make changes to this bug.