Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491496 - x11-libs/libxcb-1.9.1 with x11-proto/xcb-proto-1.9-r1 - .../work/libxcb-1.9.1/src/c_client.py: AttributeError: 'list' object has no attribute 'lenfield_name'
Summary: x11-libs/libxcb-1.9.1 with x11-proto/xcb-proto-1.9-r1 - .../work/libxcb-1.9.1...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 12:17 UTC by Sergey Ilinykh
Modified: 2017-01-26 07:12 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild patch (libxcb-1.9.1.ebuild.patch,273 bytes, patch)
2013-11-20 08:08 UTC, gerardo@gnuardo.com
Details | Diff
Lenfield patch (libxcb-1.9.1-lenfield.patch,1.40 KB, patch)
2013-11-20 08:09 UTC, gerardo@gnuardo.com
Details | Diff
1.8-r3-fix-expression-len.patch (1.8-r3-fix-expression-len.patch,1.05 KB, patch)
2013-11-29 16:19 UTC, gerardo@gnuardo.com
Details | Diff
xcb-proto-1.8-r3.ebuild.patch (xcb-proto-1.8-r3.ebuild.patch,559 bytes, patch)
2013-11-29 16:19 UTC, gerardo@gnuardo.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Ilinykh 2013-11-17 12:17:09 UTC
proper dependency should be added

Reproducible: Always
Comment 1 Sergey Ilinykh 2013-11-17 12:18:08 UTC
x11-libs/libxcb-1.9.1 compatible with x11-proto/xcb-proto-1.8-r3
Comment 2 Dennis Schridde 2013-11-17 14:50:00 UTC
Is the incompatibility what causes the following, or is that a different issue?

Traceback (most recent call last):
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 2925, in <module>
    module.generate()
  File "/usr/lib64/python2.7/site-packages/xcbgen/state.py", line 103, in generate
/usr/bin/python2.7 /var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py -p /usr/lib64/python2.7/site-packages /usr/share/xcb/xfixes.xml
    item.out(name)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 2788, in c_request
    _c_type_setup(self, name, ('request',))
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 338, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 413, in _c_type_setup
    _c_serialize('serialize', self)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1171, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1045, in _c_serialize_helper
    space, prefix)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 690, in _c_serialize_helper_switch
    bitcase_expr = _c_accessor_get_expr(b.type.expr, None)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1417, in _c_accessor_get_expr
    lenexp = _c_accessor_get_length(expr, field_mapping)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1394, in _c_accessor_get_length
    lenfield_name = expr.lenfield_name
AttributeError: 'list' object has no attribute 'lenfield_name'
make[1]: *** [sync.c] Error 1
Comment 3 Sergey Ilinykh 2013-11-17 16:26:06 UTC
yes

AttributeError: 'list' object has no attribute 'lenfield_name'
Comment 4 gerardo@gnuardo.com 2013-11-20 08:05:52 UTC
This patch fix the problem:
http://cgit.freedesktop.org/xcb/libxcb/commit/?id=e602b65

Changes to be added to the ebuild:

diff -ruN /usr/portage/x11-libs/libxcb/libxcb-1.9.1.ebuild libxcb-1.9.1.ebuild 
--- /usr/portage/x11-libs/libxcb/libxcb-1.9.1.ebuild    2013-10-08 07:31:37.000000000 +0200
+++ libxcb-1.9.1.ebuild 2013-11-20 08:04:30.139233262 +0100
@@ -43,4 +43,7 @@
                --enable-xinput
        )
        xorg-2_src_configure
+       cd "${S}"
+       epatch "${FILESDIR}/${P}-lenfield.patch"
 }
Comment 5 gerardo@gnuardo.com 2013-11-20 08:08:22 UTC
Created attachment 363618 [details, diff]
Ebuild patch
Comment 6 gerardo@gnuardo.com 2013-11-20 08:09:11 UTC
Created attachment 363620 [details, diff]
Lenfield patch
Comment 7 Dennis Schridde 2013-11-22 16:37:59 UTC
Could someone please fix this? The current version of qtgui depends on this specific version, because 1.9.3 is broken - so there currently is no way around installing libxcb-1.9.1 for me:
=x11-libs/libxcb-1.9.1*[xkb] required by (dev-qt/qtgui-5.2.0_beta1::qt, installed)
Comment 8 Daniel Scharrer 2013-11-22 16:44:29 UTC
Dennis: All it would take to "fix" this is to make =x11-libs/libxcb-1.9.1 depend on <x11-proto/xcb-proto-1.9 - you can manually mask =x11-proto/xcb-proto-1.9-r1 for the same effect.
Comment 9 Dennis Schridde 2013-11-22 16:52:04 UTC
(In reply to gerardo@gnuardo.com from comment #4)
> This patch fix the problem:
> http://cgit.freedesktop.org/xcb/libxcb/commit/?id=e602b65

This patch seems insufficient. After applying it (/etc/portage/{patches,env}), I get another error:

In file included from /var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/xcb.h:185:0,
                 from /var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/xcb_out.c:37:
./xproto.h:1216:3: error: conflicting types for 'xcb_ge_event_t'
 } xcb_ge_event_t;
   ^
In file included from /var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/xcb_out.c:37:0:
/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/xcb.h:155:3: note: previous declaration of 'xcb_ge_event_t' was here
 } xcb_ge_event_t;
   ^
make[2]: *** [xcb_out.lo] Error 1
Comment 10 Dennis Schridde 2013-11-22 16:57:56 UTC
(In reply to gerardo@gnuardo.com from comment #4)
> This patch fix the problem:
> http://cgit.freedesktop.org/xcb/libxcb/commit/?id=e602b65

And another error:

Traceback (most recent call last):
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 2935, in <module>
    module.generate()
  File "/usr/lib64/python3.3/site-packages/xcbgen/state.py", line 101, in generate
    item.out(name)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 2798, in c_request
    _c_type_setup(self, name, ('request',))
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 338, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 413, in _c_type_setup
    _c_serialize('serialize', self)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1181, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 1055, in _c_serialize_helper
    space, prefix)
  File "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py", line 690, in _c_serialize_helper_switch
    len_expr = len(b.type.expr)
TypeError: object of type 'Expression' has no len()
Comment 11 Mark Wright gentoo-dev 2013-11-23 11:57:01 UTC
Added libxcb-1.9.1-r1:
Part of fix for bug 491496, thanks to Rion for reporting, thanks to gerardo for the libxcb-list-object-has-no-attribute-lenfield_name.patch. libxcb-1.9.1-conflicting-types-for-xcb_ge_event_t.patch by me.

However this bug is not completely fixed yet, as

(1) I have not added the upper bound:

<x11-proto/xcb-proto-1.9-r1[${MULTILIB_USEDEP},${PYTHON_USEDEP}]

x11-libs/libxcb-1.9.1.ebuild

(2) x11-libs/libxcb-1.9.1-r1 needs testing
Comment 12 gerardo@gnuardo.com 2013-11-29 16:17:13 UTC
Hi Dennis.
I found the patch for this error. It's located here: 
http://cgit.freedesktop.org/xcb/proto/commit/?id=a9a892e

And we need also to modify the xcb-proto ebuild. I will add the patches to fix this bug.

Mark I don't know if I did what you already did because I can't see your patch. Sorry!

Cheers.

(In reply to Dennis Schridde from comment #10)
> (In reply to gerardo@gnuardo.com from comment #4)
> > This patch fix the problem:
> > http://cgit.freedesktop.org/xcb/libxcb/commit/?id=e602b65
> 
> And another error:
> 
> Traceback (most recent call last):
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 2935, in <module>
>     module.generate()
>   File "/usr/lib64/python3.3/site-packages/xcbgen/state.py", line 101, in
> generate
>     item.out(name)
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 2798, in c_request
>     _c_type_setup(self, name, ('request',))
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 338, in _c_type_setup
>     _c_type_setup(field.type, field.field_type, ())
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 413, in _c_type_setup
>     _c_serialize('serialize', self)
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 1181, in _c_serialize
>     count = _c_serialize_helper(context, self, code_lines, temp_vars,
> prefix=prefix)
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 1055, in _c_serialize_helper
>     space, prefix)
>   File
> "/var/tmp/portage/x11-libs/libxcb-1.9.1/work/libxcb-1.9.1/src/c_client.py",
> line 690, in _c_serialize_helper_switch
>     len_expr = len(b.type.expr)
> TypeError: object of type 'Expression' has no len()
Comment 13 gerardo@gnuardo.com 2013-11-29 16:19:16 UTC
Created attachment 364204 [details, diff]
1.8-r3-fix-expression-len.patch
Comment 14 gerardo@gnuardo.com 2013-11-29 16:19:48 UTC
Created attachment 364206 [details, diff]
xcb-proto-1.8-r3.ebuild.patch
Comment 15 Matt Turner gentoo-dev 2017-01-26 06:31:34 UTC
I think this is long since fixed upstream? Please confirm or reopen if not fixed.