[MacPorts] #51032: gtk-doc-1.25 fails to build on Mac OS X 10.6.8, Snow Leopard, because of Python27 problems
#51032: gtk-doc-1.25 fails to build on Mac OS X 10.6.8, Snow Leopard, because of Python27 problems -----------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: gtk-doc -----------------------------+-------------------------------- That's the error: {{{ Traceback (most recent call last): File "/opt/local/bin/itstool", line 25, in <module> import libxml2 File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/libxml2.py", line 1, in <module> import libxml2mod ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/libxml2mod.so, 2): Symbol not found: _PyUnicodeUCS2_AsUTF8String Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/libxml2mod.so Expected in: flat namespace in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/libxml2mod.so }}} I have installed: {{{ itstool @2.0.2_2 (active) py27-libxml2 @2.9.2_0 (active) python27 @2.7.11_2+ucs4 (active) }}} -- Ticket URL: <https://trac.macports.org/ticket/51032> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: gtk-doc @1.25 fails to build with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: gtk-doc | ------------------------------+---------------------- Changes (by ryandesign@…): * cc: devans@…, openmaintainer@… (removed) * owner: macports-tickets@… => devans@… Comment: As I recall, using python27's +ucs4 variant is the problem. My recollection is that the use of that variant is not recommended. -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: gtk-doc @1.25 fails to build with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: gtk-doc | ------------------------------+---------------------- Comment (by Peter_Dyballa@…): Replying to [comment:1 ryandesign@…]:
As I recall, using python27's +ucs4 variant is the problem. My recollection is that the use of that variant is not recommended.
Some other package, that I don't remember, is needing exactly that variant… -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: gtk-doc @1.25 fails to build with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: gtk-doc | ------------------------------+---------------------- Comment (by devans@…): The problem here is not with gtk-doc but with py27-xml2 which is being loaded by itstool during the build process. py27-xml2 is usually installed via binary archive which is built on the buildbots using python27 built with the default variants (not with +ucs4). As Ryan has said, the recommended solution is to avoid using python27 +ucs4 which does not provide the same symbols as the default version. If you insist on using python27 +ucs4 then you may need to rebuild py27-xml2 (and possibly others) locally using the -s option to build from source using your python version rather than loading the prebuilt binary archive. {{{ sudo port -ns upgrade --force py27-xml2 }}} I haven't tried doing this so no guarantees. Best to stick with the default version if at all possible. -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: gtk-doc @1.25 fails to build with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: gtk-doc | ------------------------------+---------------------- Comment (by phoenix.zerin@…): Upgrading `py27-libxml2` using the method recommended in https://trac.macports.org/ticket/51032#comment:3 allowed me to build gtk- doc successfully. ``` sudo port -ns upgrade --force py27-libxml2 ``` -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: python27: modules built with the default python27 fail when used with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: wontfix | Keywords: Port: python27 | ------------------------------+---------------------- Changes (by devans@…): * status: new => closed * resolution: => wontfix * port: gtk-doc => python27 Comment: Replying to [comment:5 phoenix.zerin@…]:
Upgrading `py27-libxml2` using the method recommended in https://trac.macports.org/ticket/51032#comment:3 allowed me to build gtk- doc successfully.
``` sudo port -ns upgrade --force py27-libxml2 ```
Best to upgrade to Python 3.3 if at all possible (https://www.python.org/dev/peps/pep-0393/).
In general, if use of the full Unicode code set is important for you, using a recent python3 where it is handled natively is, indeed, your best bet. We are currently discontinuing support for Python 3.3 so Python 3.4+ is recommended. The problem here is not an issue with a particular port but with mixing binary modules built against python27 (binary archive of py27-xml2) with python27 +ucs4. Rebuilding these modules against python27 +ucs4 as recommended above can help but this is not guaranteed to work in all cases. Doing this properly would mean rebuilding all python modules from source (using port -s) against python2.7 +ucs but again this is believed to have led to other problems in the past. I'm looking at upgrading itstool to use python3 if possible. See https://trac.macports.org/ticket/51141#comment:3 for additional discussion of the +ucs4 issue. -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#51032: python27: modules built with the default python27 fail when used with python27 +ucs4 ------------------------------+---------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: wontfix | Keywords: Port: python27 | ------------------------------+---------------------- Comment (by devans@…): Follow up: itstool does not currently support python3 but there's work going on upstream to remedy the situation. See [https://github.com/itstool/itstool/pull/3 itstool PR #3]. -- Ticket URL: <https://trac.macports.org/ticket/51032#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts