Opened 14 years ago

Closed 13 years ago

#26418 closed defect (fixed)

python3: xorg-libxcb @1.7_0 fails to build

Reported by: gotyaoi@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: python Cc: aguynamedryan+macports@…, krissen (Kristian Niemi)
Port: xorg-libxcb xorg-xcb-proto

Description

I actually found a fix in between opening this page and posting this.

Basically, I was upgrading xorg-libX11, which depended on xorg-libxcb. When Macports tried to upgrade that, it hit a build error and exited. looking into the log, I noticed that it was trying to build a python file by calling /opt/local/bin/python and running into a syntax error. I have python_select installed, and at the time it was currently set to python31. Noticing that one of the arguments was a python26 framework, I switched python_select over to python26. Worked like a charm.

So the port is calling something that if you have python_select installed, is in fact a symlink.

Attachments (6)

debug.log (10.7 KB) - added by aguynamedryan+macports@… 14 years ago.
xorg-libxcb failing to build
main.log (16.6 KB) - added by gotyaoi@… 14 years ago.
xorg-xcb-proto-Portfile.diff (1.2 KB) - added by jmroot (Joshua Root) 13 years ago.
xcbproto-python3.patch (692 bytes) - added by jmroot (Joshua Root) 13 years ago.
xorg-libxcb-Portfile.diff (1.2 KB) - added by jmroot (Joshua Root) 13 years ago.
libxcb-python3.patch (701 bytes) - added by jmroot (Joshua Root) 13 years ago.

Download all attachments as: .zip

Change History (17)

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

Owner: changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 14 years ago by aguynamedryan+macports@…

Cc: aguynamedryan+macports@… added

Cc Me!

comment:3 Changed 14 years ago by aguynamedryan+macports@…

gotyai: Solid tip. I did the following to get python_select all set up:

sudo port install python_select
sudo python_select python26

and that worked for me as a workaround too. I'm attaching a debug.log file showing how xorg-libxcb is failing to build.

Changed 14 years ago by aguynamedryan+macports@…

Attachment: debug.log added

xorg-libxcb failing to build

comment:4 Changed 14 years ago by gotyaoi@…

hmm, it appears our debug logs differ. I recreated the problem, so I could post mine.

Changed 14 years ago by gotyaoi@…

Attachment: main.log added

comment:5 in reply to:  description Changed 14 years ago by krissen (Kristian Niemi)

Thanks for the tip!

Didn't have python_select installed, and once it was installed all "python_select -l" would show was current, none, python26 and python26-apple. Don't know which was set from the get-go, if any (perhaps python26-apple?), but setting it to python26 as proposed here worked like a charm!

comment:6 Changed 14 years ago by krissen (Kristian Niemi)

Cc: kristian.niemi@… added

Cc Me!

comment:7 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Keywords: python added

Do you have a patch to make it work with python 3?

comment:8 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: xorg-libxcb @1.7_0 fails to buildpython3: xorg-libxcb @1.7_0 fails to build

Changed 13 years ago by jmroot (Joshua Root)

Changed 13 years ago by jmroot (Joshua Root)

Attachment: xcbproto-python3.patch added

Changed 13 years ago by jmroot (Joshua Root)

Attachment: xorg-libxcb-Portfile.diff added

Changed 13 years ago by jmroot (Joshua Root)

Attachment: libxcb-python3.patch added

comment:9 Changed 13 years ago by jmroot (Joshua Root)

Port: xorg-xcb-proto added

Attached patches fix syntax for python3 by running 2to3. A couple of other fixes are also needed as referenced from https://bugs.freedesktop.org/show_bug.cgi?id=36188 -- a circular import in xcbproto and an attempt to compare None with a number in libxcb. These are taken care of by the patchfiles.

comment:10 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Please send these patches upstream (attachint them to the bug report referenced will help). I don't use python3, but the ports are openmaintainer, so you're free to add them.

comment:11 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Applied to the ports in r83061; no point having the variants if they don't work. This isn't in a form suitable for sending upstream since it's mostly just running 2to3 in the portfile. It looks like upstream is planning on solving this by dropping python 2.5 compatibility and using a common subset of python that works in versions 3.x and 2.6+.

Note: See TracTickets for help on using tickets.