Opened 6 years ago

Closed 6 years ago

#55586 closed defect (invalid)

itstool @2.0.2: error: Python module libxml2 is needed to run this package

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: elcapitan Cc: jmroot (Joshua Root), ryandesign (Ryan Carsten Schmidt)
Port: itstool

Description

checking for /opt/local/bin/python2.7 version... 2.7
checking for /opt/local/bin/python2.7 platform... darwin
checking for /opt/local/bin/python2.7 script directory... /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
checking for /opt/local/bin/python2.7 extension module directory... /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
checking for python module libxml2 using /opt/local/bin/python2.7... not found
configure: error: Python module libxml2 is needed to run this package
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_itstool/itstool/work/itstool-2.0.2" && ./configure --prefix=/opt/local 
Exit code: 1

Installed are:

  libxml2 @2.9.7_0 (active)
  py27-libxml2 @2.9.7_0 (active)
  python2_select @0.0_2 (active)
  python27 @2.7.14_0+ucs4 (active)

Attachments (2)

main.log (35.9 KB) - added by ballapete (Peter "Pete" Dyballa) 6 years ago.
config.log (7.2 KB) - added by ballapete (Peter "Pete" Dyballa) 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

comment:1 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Installing py-libxml2 @2.9.7_0 does not cure the problem.

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: devans@… removed
Owner: set to dbevans
Status: newassigned
Summary: itstool @2.0.2₃ does not build on OS X El Capitan, 10.11.6, because of missing dependancy?itstool @2.0.2: error: Python module libxml2 is needed to run this package

Could you attach the config.log file too, please? It's under the work directory (port work itstool).

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmroot ryandesign added

I am able to reproduce the problem if I install python27 with the +ucs4 variant, as you have. The problem is that when you installed py27-libxml2, you got a binary of it from our build server, where it was built with a python27 without the +ucs4 variant.

If you have python27 installed with the +ucs4 variant, then your python modules must also be compiled with a python27 using the +ucs4 variant (and if you have python27 installed without the +ucs4 variant, then your python modules must be compiled with a python27 not using the +ucs4 variant). We don't have a way to enforce that in MacPorts, so we should remove the +ucs4 variant from python27 and revbump it, so that users cannot run into this problem. See also #36107 and #51141.

comment:4 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

It is a similar situation to the one which caused me to have to remove the +q8, +q16, +q32 and +hdri variants from ImageMagick and the reason why the proposed +zts variant for php has not been added.

Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: config.log added

comment:5 in reply to:  3 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign:

Since I am not a native Python I have no idea what that ucs4 is good for. But I have an idea of "America first": 7 bits only. I need some more bits for text handling.

OK, I'll try to remember to build all Python 2.7 packages from source.

Is Python 3 better suited for international usage? Can it be made the default Python port?

comment:6 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Well if you don't need the +ucs4 variant then you can avoid all the problems by deselecting it. And I hope nobody needs +ucs4, since my proposal is to delete it.

Looks like python31 and python32 have +ucs4 variants, but python33 and later don't. I assume python33 and later handle unicode better, without the need for a separate +ucs4 variant.

python 3.x and python 2.x are different and not always compatible with one another; that's why the major version number is different! So it's not advised to set python to be python 3.x. See #51572. It is advised to set python and python2 to be python 2.x and python3 to be python 3.x.

comment:7 Changed 6 years ago by dbevans (David B. Evans)

Resolution: invalid
Status: assignedclosed

I believe we've been over this before, but using python27 +ucs4 does seem to be problematic and as I understand it an anachronism (which is why you don't see it on the later python versions).

Note that the default build is without +ucs4 so if you're having this problem its because you manually installed it with that variant in the past.

Using just

$ sudo port install python27

should fix the problem.

Note: See TracTickets for help on using tickets.