Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#51514 closed defect (wontfix)

xorg-libxcb fails to build if python3 is port selected

Reported by: mf2k (Frank Schima) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc:
Port: xorg-libxcb

Description

Fails at:

:debug:build system:  cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_x11_xorg-libxcb/xorg-libxcb/work/libxcb-1.12" && /usr/bin/make -j8 -w all 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_x11_xorg-libxcb/xorg-libxcb/work/libxcb-1.12'
:info:build Making all in src
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_x11_xorg-libxcb/xorg-libxcb/work/libxcb-1.12/src'
:info:build   GEN      bigreq.c
:info:build   GEN      xproto.c
:info:build   GEN      xc_misc.c
:info:build   GEN      composite.c
:info:build   GEN      damage.c
:info:build   GEN      dpms.c
:info:build   GEN      dri2.c
:info:build   GEN      dri3.c
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build   File "./c_client.py", line 1937
:info:build     after_end_of_request = '(((char*)R) + R->length * 4)'
:info:build                                                         ^
:info:build TabError: inconsistent use of tabs and spaces in indentation
:info:build make[1]: *** [dri2.c] Error 1

Attachments (2)

main.log (26.9 KB) - added by mf2k (Frank Schima) 8 years ago.
fix1_main.log (10.9 KB) - added by Jobst.Ziebell@… 8 years ago.

Download all attachments as: .zip

Change History (22)

Changed 8 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:1 Changed 8 years ago by Jobst.Ziebell@…

This happens on my machine too. OS X 10.11.5, macports 2.3.4. After fixing the above issue (some tabs were lurking in the c_client.py file) another error pops up, see fix1_main.log.

Changed 8 years ago by Jobst.Ziebell@…

Attachment: fix1_main.log added

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

If you port select python 2.7 for your python interpreter, does it work for you?

comment:3 in reply to:  2 Changed 8 years ago by Jobst.Ziebell@…

Still exactly the same error.

comment:4 in reply to:  2 Changed 8 years ago by mf2k (Frank Schima)

Replying to jeremyhu@…:

If you port select python 2.7 for your python interpreter, does it work for you?

Yes, it built for me.

comment:5 in reply to:  2 Changed 8 years ago by GussyFinkNottle

Replying to jeremyhu@…:

If you port select python 2.7 for your python interpreter, does it work for you?

Same fail: Yosemite 10.10.5, Xcode 7.2.1, macports 2.3.4. No difference selecting python34, python27, python27-apple, cleaning xorg* inbetween.

comment:6 in reply to:  2 Changed 8 years ago by GussyFinkNottle

Replying to jeremyhu@…:

If you port select python 2.7 for your python interpreter, does it work for you?

It does if I also change the variant of xorg-libxcb on install to be +python27 rather than +python34, which it was for some reason. I also selected python27 to be the active python. Now things work.

comment:7 in reply to:  2 Changed 8 years ago by m74z00219@…

Replying to jeremyhu@…:

If you port select python 2.7 for your python interpreter, does it work for you?

This worked for me too. Thanks!

comment:8 Changed 8 years ago by neverpanic (Clemens Lang)

Sounds like a bug to me, builds shouldn't depend on what's selected?

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

Yes. That's just a workaround. If someone has a fix, I'll commit it.

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

Status: newassigned
Summary: xorg-libxcb: build failurexorg-libxcb fails to build if python3 is port selected

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

Resolution: fixed
Status: assignedclosed

There was a fix upstream. Pulled in.

r149169.

comment:12 Changed 8 years ago by cdeil (Christoph Deil)

Just now I tried to do the update:

xorg-libxcb                    1.11.1_0 < 1.12_1

and it still fails like this:

:info:build Traceback (most recent call last):
:info:build   File "./c_client.py", line 3294, in <module>
:info:build     from xcbgen.state import Module
:info:build   File "/opt/local/lib/python3.4/site-packages/xcbgen/state.py", line 7, in <module>
:info:build     from xcbgen import matcher
:info:build   File "/opt/local/lib/python3.4/site-packages/xcbgen/matcher.py", line 12, in <module>
:info:build     from xcbgen.xtypes import *
:info:build   File "/opt/local/lib/python3.4/site-packages/xcbgen/xtypes.py", line 504
:info:build     print "Explicit start-align for %s: %s\n" % (self, self.required_start_align)
:info:build                                             ^
:info:build SyntaxError: invalid syntax

Full log: https://gist.github.com/cdeil/eac3b160a5b6475eac3b4e0b129e7bb6#file-gistfile1-txt-L393

Do I have to issue some special clean or update command to get xcbgen/xtypes.py updated? Or is there still a bug?

comment:13 in reply to:  12 Changed 8 years ago by jenstroeger (Jens Troeger)

Replying to Deil.Christoph@…:

Just now I tried to do the update: [...]

Yes I'm seeing the same problems after an update just now. Looks like a Py2 print statement being executed by Py3.

Last edited 8 years ago by jenstroeger (Jens Troeger) (previous) (diff)

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

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

Resolution: fixed
Status: closedreopened

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

Resolution: wontfix
Status: reopenedclosed

Filed upstream, and they'll support python3 eventually. For now, they just support python2. Furthermore, the shbang is setup to execute using python2 (#!/usr/bin/env python), so if python is setup as python in the environment, it is a user configuration issue.

cf https://www.python.org/dev/peps/pep-0394

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

#51572 filed to warn users when they try to do this.

comment:18 Changed 8 years ago by jenstroeger (Jens Troeger)

So to handle this problem, I port select python2 as python, upgrade and build the port tree, and then switch back to python 3? (Ignoring #51572 for now...)

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

You shouldn't need to port select python3. It should work for you with python3 now.

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

But to be clear, you should not have python3 selected for python for correctness reasons in general as you're bound to run into compatibility issues like this one.

Note: See TracTickets for help on using tickets.