#34731 closed defect (fixed)
policykit: configure: error: XML::Parser perl module is required for intltool
Reported by: | mndavidoff (Monte Davidoff) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.1 |
Keywords: | haspatch | Cc: | ryandesign (Ryan Carsten Schmidt), mamoll (Mark Moll), tony.li@…, nonstop.server@…, rmstonecipher@… |
Port: | policykit |
Description
Building policykit @0.103_1 fails if the perl5
port was installed with the +perl5_14
variant.
$ port installed | grep 'perl5 ' perl5 @5.12.3_1+perl5_14 (active) $ sudo port -vs install policykit ---> Computing dependencies for policykit. ---> Fetching distfiles for policykit ---> Verifying checksum(s) for policykit ---> Checksumming polkit-0.103.tar.gz ---> Extracting policykit ---> Extracting polkit-0.103.tar.gz ---> Applying patches to policykit ---> Applying patch-configure.diff patching file configure ---> Configuring policykit ... checking for perl... /opt/local/bin/perl checking for perl >= 5.8.1... 5.14.2 checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_policykit/policykit/work/polkit-0.103" && ./configure --prefix=/opt/local --with-authfw=pam --with-pam-prefix=/etc/pam.d --with-pam-module-dir=/usr/lib/pam --disable-introspection --disable-silent-rules --enable-man-pages --disable-gtk-doc Exit code: 2 Error: org.macports.configure for port policykit returned: configure failure: command execution failed Warning: targets not executed for policykit: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Please see the log file for port policykit for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_policykit/policykit/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port policykit failed
The problem appears to be that the polickit
Portfile does not set the INTLTOOL_PERL
environment variable in configure.env
in the same manner as other Portfiles that depend on intltool
(for example, shared-mime-info
). I've attached a patch that fixes the problem.
Attachments (3)
Change History (15)
Changed 12 years ago by mndavidoff (Monte Davidoff)
Attachment: | main.log.bz2 added |
---|
Changed 12 years ago by mndavidoff (Monte Davidoff)
Attachment: | Portfile.diff added |
---|
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… mmoll@… added; devans@… removed |
---|---|
Keywords: | haspatch added |
Owner: | changed from macports-tickets@… to devans@… |
comment:2 Changed 12 years ago by mamoll (Mark Moll)
I just don't understand how the different perl ports work. If add a dependency to p5.12-xml-parser is preferred, then that's fine with me. Coincidentally, someone just emailed me that perhaps this is the proper fix:
if {${perl5.major} != ""} { depends_lib-append port:p${perl5.major}-xml-parser }
But this means that policykit needs to use the perl PortGroup, no?
comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Does policykit itself use XML::Parser at build time or runtime, or did you only add the dependency because it gets used indirectly at build time via intltool?
If policykit itself needs XML::Parser, then you're right to add a dependency, but we should never add dependencies on stub ports—meaning, a port that is replaced_by another port. (p5-xml-parser and all other p5- ports are stub ports.) Instead we should add the dependency on a specific perl version of the module, such as p5.12-xml-parser, and then instruct policykit to always use the "perl5.12" program and never the "perl" program.
policykit is not a perl module, so it should not use the perl5 portgroup.
comment:7 Changed 12 years ago by nonstop.server@…
When migrating my installed ports to use perl5.16 only, I ran in a likewise issue.
I was able to solve this problem by setting the variable INTLTOOL_PERL to the perl version with which intltool was build during installation.
See comment 4 of ticket #30937 for specific information.
comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | policykit @0.103_1 build fails with perl5 +perl5_14 → policykit: configure: error: XML::Parser perl module is required for intltool |
---|
rmstonecipher changed the p5-xml-parser dependency to p5.12-xml-parser in r96849.
comment:9 Changed 12 years ago by mndavidoff (Monte Davidoff)
Well, changing the dependency in r96849 did not fix this build failure:
$ port installed perl5 The following ports are currently installed: perl5 @5.12.4_0+perl5_16 (active) $ sudo port -vs install policykit ---> Computing dependencies for policykit. ---> Fetching distfiles for policykit ---> Verifying checksum(s) for policykit ---> Checksumming polkit-0.103.tar.gz ---> Extracting policykit ---> Extracting polkit-0.103.tar.gz ---> Applying patches to policykit ---> Applying patch-configure.diff patching file configure ---> Configuring policykit ... checking for perl... /opt/local/bin/perl checking for perl >= 5.8.1... 5.16.0 checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool Command failed: cd "/opt/local/var/macports/build/_Users_monte.clear_Sites_apps_notes_MacPorts_ports_security_policykit/policykit/work/polkit-0.103" && ./configure --prefix=/opt/local --with-authfw=pam --with-pam-prefix=/etc/pam.d --with-pam-module-dir=/usr/lib/pam --disable-introspection --disable-silent-rules --enable-man-pages --disable-gtk-doc Exit code: 2 Error: org.macports.configure for port policykit returned: configure failure: command execution failed Warning: targets not executed for policykit: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Please see the log file for port policykit for details: /opt/local/var/macports/logs/_Users_monte.clear_Sites_apps_notes_MacPorts_ports_security_policykit/policykit/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port policykit failed
To fix this build problem, please apply the attached patch in Portfile2.diff to remove the p5.12-xml-parser dependency and set the INTLTOOL_PERL environment variable use the version of perl explicitly required by intltool. This is the method used by ten other Portfiles.
Changed 12 years ago by mndavidoff (Monte Davidoff)
Attachment: | Portfile2.diff added |
---|
comment:10 Changed 12 years ago by jmroot (Joshua Root)
Right, intltool already depends on p5.12-xml-parser, so adding another dependency in the port using intltool won't help. It's highly inconvenient that programs building with intltool have to know which perl intltool is configured to use internally, though.
comment:11 Changed 12 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:12 Changed 12 years ago by jmroot (Joshua Root)
Cc: | rmstonecipher@… added |
---|
Mark Moll added a p5-xml-parser dependency to policykit in r94601. If anything, this should have been a p5.12-xml-parser dependency, but instead I assume we should revert r94601 and apply the patch in this ticket. Mark, do you agree, or was there another reason why you added the p5-xml-parser dependency?