[MacPorts] #33264: p5.12-xml-parser claims to be i386 but is not

MacPorts noreply at macports.org
Wed Feb 15 13:29:37 PST 2012


#33264: p5.12-xml-parser claims to be i386 but is not
-------------------------------------------------------------------------+--
 Reporter:  jhkoivis@…                                                   |       Owner:  macports-tickets@…                   
     Type:  defect                                                       |      Status:  new                                  
 Priority:  Normal                                                       |   Milestone:                                       
Component:  ports                                                        |     Version:  2.0.3                                
 Keywords:  architechture build_arch i386 x86_64 snow_leopard migration  |        Port:  p5.12-xml-parser                     
-------------------------------------------------------------------------+--
 I have migrated from leopard to snow leopard (osx 10.6.8) and I have a
 macbook 5.1. This is system that has some x86_64 features, but not all,
 hence I always compile for arch i386. I have checked the migration guide
 and my macport.conf has build_arch=i386.

 if I say 'installed' in port shell I get (for p5.12-xml-parser):

 {{{
 p5.12-xml-parser @2.400.0_2 (active) platform='darwin 10' archs='i386'
 }}}

 But if I say:

 {{{
 lipo -info /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/auto/XML/Parser/Expat/Expat.bundle /opt/local/lib/libexpat.1.dylib
 }}}

 I get:

 {{{
 Architectures in the fat file: /opt/local/lib/libexpat.1.dylib are: i386
 ppc7400

 Non-fat file: /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/auto/XML/Parser/Expat/Expat.bundle is architecture: x86_64

 }}}

 Which means that the architechture is x86_64. Now every port that is
 checking p5-xml-parser fails, because they run the check:

 {{{
 /opt/local/bin/perl5.12 -e "require XML::Parser"
 }}}

 Which outputs:

 {{{
 Can't load '/opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/auto/XML/Parser/Expat/Expat.bundle' for module XML::Parser::Expat:
 dlopen(/opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/auto/XML/Parser/Expat/Expat.bundle, 1): no suitable image found.
 Did find:
         /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/auto/XML/Parser/Expat/Expat.bundle: mach-o, but wrong architecture
 at /opt/local/lib/perl5/5.12.3/darwin-multi-2level/DynaLoader.pm line 204.
  at /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-
 2level/XML/Parser.pm line 18
 Compilation failed in require at /opt/local/lib/perl5/vendor_perl/5.12.3
 /darwin-multi-2level/XML/Parser.pm line 18.
 BEGIN failed--compilation aborted at
 /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-2level/XML/Parser.pm
 line 22.
 Compilation failed in require at -e line 1.
 }}}

 To fix this I hacked my /usr/bin/gcc-4.2 to look like this:

 {{{
 #!/bin/sh
 /usr/bin/gcc-4.2-orig -m32 "$@"
 }}}

 I just force 32bit mode by -m32. The original gcc-4.2 is moved to
 gcc-4.2-orig. This fixed my problem: lipo gives i368 and intltool is
 compiling (requires p5-xml-parser).

 I think in some point p5.12-xml-parser does not add -m32 flag even if its
 supposed to do that. I would like to contribute by fixing this if you give
 me a nudge where to start. I am noob to macports but not with
 collaboration and programming.

-- 
Ticket URL: <https://trac.macports.org/ticket/33264>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list