[MacPorts] #54220: texinfo @6.3.0 +universal build fails due to perl5.24 library search path

MacPorts noreply at macports.org
Wed May 24 00:59:24 UTC 2017


#54220: texinfo @6.3.0 +universal build fails due to perl5.24 library search path
--------------------+-------------------------------
 Reporter:  kencu   |      Owner:
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  texinfo, perl5.24
--------------------+-------------------------------
 I will start this by admitting I don't know a lot about perl, or the perl
 library search paths. I'm not sure if this is a problem with texinfo, or
 more likely a problem with the perl5.24 +universal installation. I defer
 to the gurus here.

 I am trying to install some software +universal, and it calls in a
 +universal build of texinfo, which fails:

 {{{
 $ sudo port -v upgrade --enforce-variants gnutls +universal
 --->  Computing dependencies for texinfo.
 --->  Configuring texinfo
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_texinfo/texinfo/work/texinfo-6.3"
 && ./configure --prefix=/opt/local --disable-dependency-tracking
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
 checking for gawk... no
 checking for mawk... no
 checking for nawk... no
 checking for awk... awk
 checking whether make sets $(MAKE)... yes
 checking whether make supports nested variables... yes
 checking whether UID '503' is supported by ustar format... yes
 checking whether GID '500' is supported by ustar format... yes
 checking how to create a ustar tar archive... gnutar
 checking for perl... /opt/local/bin/perl5.24
 checking Perl version and Encode module... no
 configure: error: perl >= 5.7.3 with Encode required by Texinfo.
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_texinfo/texinfo/work/texinfo-6.3"
 && ./configure --prefix=/opt/local --disable-dependency-tracking
 Exit code: 1
 Error: Failed to configure texinfo, consult
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_texinfo/texinfo/work/texinfo-6.3/config.log
 Error: Failed to configure texinfo: configure failure: command execution
 failed
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_texinfo/texinfo/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
 }}}

 during the configure phase for texinfo, it calls this test, which fails:
 {{{
 $ /opt/local/bin/perl5.24 -e "use 5.007_003; use Encode;"
 Can't load '/opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle' for module Encode:
 dlopen(/opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle, 1): no suitable image found.  Did find:
         /opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle: mach-o, but wrong architecture at
 /opt/local/lib/perl5/5.24/XSLoader.pm line 99.
  at /opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/Encode.pm line 10.
 Compilation failed in require at -e line 1.
 BEGIN failed--compilation aborted at -e line 1.
 }}}
 There are a couple of versions of the Encode.bundle installed. The
 vendor_perl one is ppc only (even though perl5.24 is installed as
 +universal):

 {{{
 $ file /opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle
 /opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle: Mach-O bundle ppc
 }}}

 This other one is a fat binary, though:
 {{{
 $ file /opt/local/lib/perl5/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle
 /opt/local/lib/perl5/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle: Mach-O universal binary with 4
 architectures
 /opt/local/lib/perl5/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle (for architecture i386): Mach-O bundle
 i386
 /opt/local/lib/perl5/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle (for architecture ppc7400):      Mach-O
 bundle ppc
 /opt/local/lib/perl5/5.24/darwin-thread-multi-
 2level/auto/Encode/Encode.bundle (for architecture ppc64):        Mach-O
 64-bit bundle ppc64
 }}}

 The default perl search path is like this, and finds the wrong (non-
 universal) version of Encode.bundle first:
 {{{
   @INC:
     /opt/local/lib/perl5/site_perl/5.24/darwin-thread-multi-2level
     /opt/local/lib/perl5/site_perl/5.24
     /opt/local/lib/perl5/vendor_perl/5.24/darwin-thread-multi-2level
     /opt/local/lib/perl5/vendor_perl/5.24
     /opt/local/lib/perl5/5.24/darwin-thread-multi-2level
     /opt/local/lib/perl5/5.24
 }}}




 So running the configure test like this works:
 {{{
 $ export PERL5LIB=/opt/local/lib/perl5/5.24/darwin-thread-multi-2level
 $ /opt/local/bin/perl5.24 -e "use 5.007_003; use Encode;"
 }}}

 And that leads to what I found to be a fix for installing texinfo as
 +universal. Adding these two lines to the texinfo Portile:

 {{{
 configure.env-append  PERL5LIB=/opt/local/lib/perl5/5.24/darwin-thread-
 multi-2level
 build.env-append     PERL5LIB=/opt/local/lib/perl5/5.24/darwin-thread-
 multi-2level
 }}}

 and texinfo installs correctly as +universal in the end:
 {{{
 $ port -v installed texinfo
 The following ports are currently installed:
   texinfo @6.3_0 platform='darwin 9' archs='ppc'
 date='2016-10-02T18:25:22-0700'
   texinfo @6.3_0+universal (active) platform='darwin 9' archs='i386 ppc
 ppc64 x86_64' date='2017-05-23T17:46:15-0700'
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54220>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list