polybar / polybar

A fast and easy-to-use status bar
https://polybar.github.io
MIT License
14.05k stars 702 forks source link

Python error when building on Ubuntu Bionic 18.04 LTS #1562

Closed alexis974 closed 5 years ago

alexis974 commented 5 years ago

Build Process

git clone from master branch (and two latest releases same error) ./build.sh (Yes and No for everything, same issue)

Build Log

[  4%] Generating ../../../lib/xpp/include/xpp/proto/xkb.hpp
Traceback (most recent call last):
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 3193, in <module>
    module.generate()
  File "/usr/local/lib/python2.7/dist-packages/xcbgen/state.py", line 101, in generate
    item.out(name)
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 2929, in c_request
    _c_type_setup(self, name, ('request',))
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 382, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 457, in _c_type_setup
    _c_serialize('serialize', self)
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1236, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1099, in _c_serialize_helper
    space, prefix)
  File "/tmp/polybar/lib/xpp/generators/cpp_client.py", line 734, in _c_serialize_helper_switch
    len_expr = len(b.type.expr)
TypeError: object of type 'Expression' has no len()
lib/xpp/CMakeFiles/xpp.dir/build.make:69: recipe for target '../lib/xpp/include/xpp/proto/xkb.hpp' failed
make[2]: *** [../lib/xpp/include/xpp/proto/xkb.hpp] Error 1
make[2]: *** Deleting file '../lib/xpp/include/xpp/proto/xkb.hpp'
CMakeFiles/Makefile2:402: recipe for target 'lib/xpp/CMakeFiles/xpp.dir/all' failed
make[1]: *** [lib/xpp/CMakeFiles/xpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
** Failed to build project

Environment:

Additional context

Python 2.7

patrick96 commented 5 years ago

Were you able to previously install polybar?

Could you please delete the build folder, rerun build.sh and post the entire output here, there may be some other information there.

Please also post the versions of the python-xcbgen and xcb-proto packages.

alexis974 commented 5 years ago

It was my first attempt to install polybar.

I tried again by deleting the build folder and rerun build.sh (as you said) and the same error happened. Here's the entire output :


** A build dir already exists (pass -f to replace)

** Setting build options

** Use GCC even if Clang is installed ----------------------------- [y/N]: y
** Include support for "internal/i3" (requires i3) ---------------- [y/N]: y
** Include support for "internal/alsa" (requires alsalib) --------- [y/N]: y
** Include support for "internal/pulseaudio" (requires libpulse) -- [y/N]: y
** Include support for "internal/network" (requires libnl/libiw) -- [y/N]: y
** Include support for "internal/mpd" (requires libmpdclient) ----- [y/N]: y
** Include support for "internal/github" (requires libcurl) ------- [y/N]: y
** Build "polybar-msg" used to send ipc messages ------------------ [y/N]: y
** Executing cmake command

-- Trying to enable ccache
-- Couldn't locate ccache, disabling ccache...
-- No build type specified; using RelWithDebInfo
-- Using supported compiler GNU-7.3.0
--  Build:
--    Type: RelWithDebInfo
--    CC: /usr/bin/gcc  -O2 -g -DNDEBUG
--    CXX: /usr/bin/g++  -Wall -Wextra -Werror -Wno-noexcept-type -pedantic -pedantic-errors -O2 -g -DNDEBUG
--    LD: /usr/bin/ld  
--  Targets:
-- [X]   polybar-msg
-- [ ]   testsuite
--  Module support:
-- [X]   alsa (1.1.3)
-- [X]   curl (7.58.0)
-- [X]   i3
-- [X]   mpd (2.11)
-- [X]   network (libnl) (3.2.29)
-- [X]   pulseaudio (11.1)
-- [X]   xkeyboard (1.13)
--  X extensions:
-- [X]   xcb-randr (1.13)
-- [X]   xcb-randr (monitor support) (1.13)
-- [ ]   xcb-render
-- [ ]   xcb-damage
-- [ ]   xcb-sync
-- [X]   xcb-composite (1.13)
-- [X]   xcb-xkb (1.13)
-- [X]   xcb-xrm (1.0)
-- [X]   xcb-cursor (0.1.1)
--  Log options:
-- [X]   Trace logging
-- Font not found: fixed:pixelsize=10
-- Font not found: unifont:fontformat=truetype
-- Font not found: siji:pixelsize=10
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.7") 
-- XCB[XCB]: Found component XCB
-- XCB[ICCCM]: Found component ICCCM
-- XCB[EWMH]: Found component EWMH
-- XCB[UTIL]: Found component UTIL
-- XCB[IMAGE]: Found component IMAGE
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so  
-- Searching for xcbgen with python2
-- Found xcbgen in /usr/local/lib/python2.7/dist-packages
-- XCB[RANDR]: Found component RANDR
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so  
-- XCB[COMPOSITE]: Found component COMPOSITE
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so  
-- XCB[XKB]: Found component XKB
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so;/usr/lib/x86_64-linux-gnu/libxcb-xkb.so  
-- xpp: including xcb proto composite.xml
-- xpp: including xcb proto randr.xml
-- xpp: including xcb proto xkb.xml
-- xpp: including xcb proto xproto.xml
-- Checking for module 'jsoncpp>=1.7.7'
--   Requested 'jsoncpp >= 1.7.7' but version of jsoncpp is 1.7.4
You may find new versions of jsoncpp at https://github.com/open-source-parsers/jsoncpp
-- Could not find jsoncpp>=1.7.7 -- building static lib...
-- JsonCpp Version: 1.7.7
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.6") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alexis/Documents/tmp/polybar/build
** Building project

[  1%] Generating ../../../lib/xpp/include/xpp/proto/xkb.hpp
Traceback (most recent call last):
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 3193, in <module>
    module.generate()
  File "/usr/local/lib/python2.7/dist-packages/xcbgen/state.py", line 101, in generate
    item.out(name)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 2929, in c_request
    _c_type_setup(self, name, ('request',))
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 382, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 457, in _c_type_setup
    _c_serialize('serialize', self)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1236, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1099, in _c_serialize_helper
    space, prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 734, in _c_serialize_helper_switch
    len_expr = len(b.type.expr)
TypeError: object of type 'Expression' has no len()
lib/xpp/CMakeFiles/xpp.dir/build.make:73: recipe for target '../lib/xpp/include/xpp/proto/xkb.hpp' failed
make[2]: *** [../lib/xpp/include/xpp/proto/xkb.hpp] Error 1
make[2]: *** Deleting file '../lib/xpp/include/xpp/proto/xkb.hpp'
CMakeFiles/Makefile2:402: recipe for target 'lib/xpp/CMakeFiles/xpp.dir/all' failed
make[1]: *** [lib/xpp/CMakeFiles/xpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
** Failed to build project

python-xcbgen version : 1.13-1 xcb-proto version : 1.13-1

patrick96 commented 5 years ago

** A build dir already exists (pass -f to replace)

You didn't completely remove the build folder. You can run ./build.sh -f to have the script remove it for you. Please post the output of that. We need the output of build.sh when there is no builder folder because some information is only printed the first time you run build.sh.

I'm also working on reproducing this.

alexis974 commented 5 years ago

Here is the output I have with : "./built.sh -f"

➜  polybar git:(master) ./build.sh -f
** Fetching submodules

** Removing existing build dir (-f)

** Setting build options

** Use GCC even if Clang is installed ----------------------------- [y/N]: y
** Include support for "internal/i3" (requires i3) ---------------- [y/N]: y
** Include support for "internal/alsa" (requires alsalib) --------- [y/N]: y
** Include support for "internal/pulseaudio" (requires libpulse) -- [y/N]: y
** Include support for "internal/network" (requires libnl/libiw) -- [y/N]: y
** Include support for "internal/mpd" (requires libmpdclient) ----- [y/N]: y
** Include support for "internal/github" (requires libcurl) ------- [y/N]: y
** Build "polybar-msg" used to send ipc messages ------------------ [y/N]: y
** Executing cmake command

-- Trying to enable ccache
-- Couldn't locate ccache, disabling ccache...
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type specified; using RelWithDebInfo
-- Using supported compiler GNU-7.3.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Checking for module 'cairo-fc'
--   Found cairo-fc, version 1.15.10
-- Checking for module 'alsa'
--   Found alsa, version 1.1.3
-- Checking for module 'libcurl'
--   Found libcurl, version 7.58.0
-- Checking for module 'libmpdclient'
--   Found libmpdclient, version 2.11
-- Checking for module 'libnl-genl-3.0'
--   Found libnl-genl-3.0, version 3.2.29
-- Checking for module 'libpulse'
--   Found libpulse, version 11.1
-- Checking for module 'xcb-composite'
--   Found xcb-composite, version 1.13
-- Checking for module 'xcb-xkb'
--   Found xcb-xkb, version 1.13
-- Checking for module 'xcb-randr'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-randr>=1.12'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-xrm'
--   Found xcb-xrm, version 1.0
-- Checking for module 'xcb-cursor'
--   Found xcb-cursor, version 0.1.1
--  Build:
--    Type: RelWithDebInfo
--    CC: /usr/bin/gcc  -O2 -g -DNDEBUG
--    CXX: /usr/bin/g++  -Wall -Wextra -Werror -Wno-noexcept-type -pedantic -pedantic-errors -O2 -g -DNDEBUG
--    LD: /usr/bin/ld  
--  Targets:
-- [X]   polybar-msg
-- [ ]   testsuite
--  Module support:
-- [X]   alsa (1.1.3)
-- [X]   curl (7.58.0)
-- [X]   i3
-- [X]   mpd (2.11)
-- [X]   network (libnl) (3.2.29)
-- [X]   pulseaudio (11.1)
-- [X]   xkeyboard (1.13)
--  X extensions:
-- [X]   xcb-randr (1.13)
-- [X]   xcb-randr (monitor support) (1.13)
-- [ ]   xcb-render
-- [ ]   xcb-damage
-- [ ]   xcb-sync
-- [X]   xcb-composite (1.13)
-- [X]   xcb-xkb (1.13)
-- [X]   xcb-xrm (1.0)
-- [X]   xcb-cursor (0.1.1)
--  Log options:
-- [X]   Trace logging
-- Font not found: fixed:pixelsize=10
-- Font not found: unifont:fontformat=truetype
-- Font not found: siji:pixelsize=10
-- Checking for module 'xcb-proto'
--   Found xcb-proto, version 1.8
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.7") 
-- XCB[XCB]: Found component XCB
-- Found XCB_XCB: /usr/lib/x86_64-linux-gnu/libxcb.so  
-- XCB[ICCCM]: Found component ICCCM
-- Found XCB_ICCCM: /usr/lib/x86_64-linux-gnu/libxcb-icccm.so  
-- XCB[EWMH]: Found component EWMH
-- Found XCB_EWMH: /usr/lib/x86_64-linux-gnu/libxcb-ewmh.so  
-- XCB[UTIL]: Found component UTIL
-- Found XCB_UTIL: /usr/lib/x86_64-linux-gnu/libxcb-util.so  
-- XCB[IMAGE]: Found component IMAGE
-- Found XCB_IMAGE: /usr/lib/x86_64-linux-gnu/libxcb-image.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so  
-- Searching for xcbgen with python2
-- Found xcbgen in /usr/local/lib/python2.7/dist-packages
-- XCB[RANDR]: Found component RANDR
-- Found XCB_RANDR: /usr/lib/x86_64-linux-gnu/libxcb-randr.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so  
-- XCB[COMPOSITE]: Found component COMPOSITE
-- Found XCB_COMPOSITE: /usr/lib/x86_64-linux-gnu/libxcb-composite.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so  
-- XCB[XKB]: Found component XKB
-- Found XCB_XKB: /usr/lib/x86_64-linux-gnu/libxcb-xkb.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so;/usr/lib/x86_64-linux-gnu/libxcb-xkb.so  
-- xpp: including xcb proto composite.xml
-- xpp: including xcb proto randr.xml
-- xpp: including xcb proto xkb.xml
-- xpp: including xcb proto xproto.xml
-- Checking for module 'jsoncpp>=1.7.7'
--   Requested 'jsoncpp >= 1.7.7' but version of jsoncpp is 1.7.4
You may find new versions of jsoncpp at https://github.com/open-source-parsers/jsoncpp
-- Could not find jsoncpp>=1.7.7 -- building static lib...
-- JsonCpp Version: 1.7.7
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.6") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alexis/Documents/tmp/polybar/build
** Building project

[  1%] Generating ../../../lib/xpp/include/xpp/proto/xkb.hpp
Traceback (most recent call last):
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 3193, in <module>
    module.generate()
  File "/usr/local/lib/python2.7/dist-packages/xcbgen/state.py", line 101, in generate
    item.out(name)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 2929, in c_request
    _c_type_setup(self, name, ('request',))
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 382, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 457, in _c_type_setup
    _c_serialize('serialize', self)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1236, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1099, in _c_serialize_helper
    space, prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 734, in _c_serialize_helper_switch
    len_expr = len(b.type.expr)
TypeError: object of type 'Expression' has no len()
lib/xpp/CMakeFiles/xpp.dir/build.make:73: recipe for target '../lib/xpp/include/xpp/proto/xkb.hpp' failed
make[2]: *** [../lib/xpp/include/xpp/proto/xkb.hpp] Error 1
make[2]: *** Deleting file '../lib/xpp/include/xpp/proto/xkb.hpp'
CMakeFiles/Makefile2:402: recipe for target 'lib/xpp/CMakeFiles/xpp.dir/all' failed
make[1]: *** [lib/xpp/CMakeFiles/xpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
** Failed to build project

Here is what i get when i enter no to everything :

➜  polybar git:(master) ./build.sh -f
** Fetching submodules

** Removing existing build dir (-f)

** Setting build options

** Use GCC even if Clang is installed ----------------------------- [y/N]: n
** Include support for "internal/i3" (requires i3) ---------------- [y/N]: n
** Include support for "internal/alsa" (requires alsalib) --------- [y/N]: n
** Include support for "internal/pulseaudio" (requires libpulse) -- [y/N]: n
** Include support for "internal/network" (requires libnl/libiw) -- [y/N]: n
** Include support for "internal/mpd" (requires libmpdclient) ----- [y/N]: n
** Include support for "internal/github" (requires libcurl) ------- [y/N]: n
** Build "polybar-msg" used to send ipc messages ------------------ [y/N]: n
** Using compiler: g++/gcc

** Executing cmake command

-- Trying to enable ccache
-- Couldn't locate ccache, disabling ccache...
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type specified; using RelWithDebInfo
-- Using supported compiler GNU-7.3.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Checking for module 'cairo-fc'
--   Found cairo-fc, version 1.15.10
-- Checking for module 'xcb-composite'
--   Found xcb-composite, version 1.13
-- Checking for module 'xcb-xkb'
--   Found xcb-xkb, version 1.13
-- Checking for module 'xcb-randr'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-randr>=1.12'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-xrm'
--   Found xcb-xrm, version 1.0
-- Checking for module 'xcb-cursor'
--   Found xcb-cursor, version 0.1.1
--  Build:
--    Type: RelWithDebInfo
--    CC: /usr/bin/gcc  -O2 -g -DNDEBUG
--    CXX: /usr/bin/g++  -Wall -Wextra -Werror -Wno-noexcept-type -pedantic -pedantic-errors -O2 -g -DNDEBUG
--    LD: /usr/bin/ld  
--  Targets:
-- [ ]   polybar-msg
-- [ ]   testsuite
--  Module support:
-- [ ]   alsa
-- [ ]   curl
-- [ ]   i3
-- [ ]   mpd
-- [ ]   network (libnl)
-- [ ]   pulseaudio
-- [X]   xkeyboard (1.13)
--  X extensions:
-- [X]   xcb-randr (1.13)
-- [X]   xcb-randr (monitor support) (1.13)
-- [ ]   xcb-render
-- [ ]   xcb-damage
-- [ ]   xcb-sync
-- [X]   xcb-composite (1.13)
-- [X]   xcb-xkb (1.13)
-- [X]   xcb-xrm (1.0)
-- [X]   xcb-cursor (0.1.1)
--  Log options:
-- [X]   Trace logging
-- Font not found: fixed:pixelsize=10
-- Font not found: unifont:fontformat=truetype
-- Font not found: siji:pixelsize=10
-- Checking for module 'xcb-proto'
--   Found xcb-proto, version 1.8
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.7") 
-- XCB[XCB]: Found component XCB
-- Found XCB_XCB: /usr/lib/x86_64-linux-gnu/libxcb.so  
-- XCB[ICCCM]: Found component ICCCM
-- Found XCB_ICCCM: /usr/lib/x86_64-linux-gnu/libxcb-icccm.so  
-- XCB[EWMH]: Found component EWMH
-- Found XCB_EWMH: /usr/lib/x86_64-linux-gnu/libxcb-ewmh.so  
-- XCB[UTIL]: Found component UTIL
-- Found XCB_UTIL: /usr/lib/x86_64-linux-gnu/libxcb-util.so  
-- XCB[IMAGE]: Found component IMAGE
-- Found XCB_IMAGE: /usr/lib/x86_64-linux-gnu/libxcb-image.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so  
-- Searching for xcbgen with python2
-- Found xcbgen in /usr/local/lib/python2.7/dist-packages
-- XCB[RANDR]: Found component RANDR
-- Found XCB_RANDR: /usr/lib/x86_64-linux-gnu/libxcb-randr.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so  
-- XCB[COMPOSITE]: Found component COMPOSITE
-- Found XCB_COMPOSITE: /usr/lib/x86_64-linux-gnu/libxcb-composite.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so  
-- XCB[XKB]: Found component XKB
-- Found XCB_XKB: /usr/lib/x86_64-linux-gnu/libxcb-xkb.so  
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-icccm.so;/usr/lib/x86_64-linux-gnu/libxcb-ewmh.so;/usr/lib/x86_64-linux-gnu/libxcb-util.so;/usr/lib/x86_64-linux-gnu/libxcb-image.so;/usr/lib/x86_64-linux-gnu/libxcb-randr.so;/usr/lib/x86_64-linux-gnu/libxcb-composite.so;/usr/lib/x86_64-linux-gnu/libxcb-xkb.so  
-- xpp: including xcb proto composite.xml
-- xpp: including xcb proto randr.xml
-- xpp: including xcb proto xkb.xml
-- xpp: including xcb proto xproto.xml
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alexis/Documents/tmp/polybar/build
** Building project

[  1%] Generating ../../../lib/xpp/include/xpp/proto/xkb.hpp
Traceback (most recent call last):
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 3193, in <module>
    module.generate()
  File "/usr/local/lib/python2.7/dist-packages/xcbgen/state.py", line 101, in generate
    item.out(name)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 2929, in c_request
    _c_type_setup(self, name, ('request',))
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 382, in _c_type_setup
    _c_type_setup(field.type, field.field_type, ())
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 457, in _c_type_setup
    _c_serialize('serialize', self)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1236, in _c_serialize
    count = _c_serialize_helper(context, self, code_lines, temp_vars, prefix=prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 1099, in _c_serialize_helper
    space, prefix)
  File "/home/alexis/Documents/tmp/polybar/lib/xpp/generators/cpp_client.py", line 734, in _c_serialize_helper_switch
    len_expr = len(b.type.expr)
TypeError: object of type 'Expression' has no len()
lib/xpp/CMakeFiles/xpp.dir/build.make:73: recipe for target '../lib/xpp/include/xpp/proto/xkb.hpp' failed
make[2]: *** [../lib/xpp/include/xpp/proto/xkb.hpp] Error 1
make[2]: *** Deleting file '../lib/xpp/include/xpp/proto/xkb.hpp'
CMakeFiles/Makefile2:399: recipe for target 'lib/xpp/CMakeFiles/xpp.dir/all' failed
make[1]: *** [lib/xpp/CMakeFiles/xpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
** Failed to build project
patrick96 commented 5 years ago

Thanks. I will report back once I get my Ubuntu 18.04 VM up and running.

patrick96 commented 5 years ago

I was not able to reproduce the issue on my machine. But the differences in our logs hints at your issue:

--- own_log 2018-12-30 15:40:41.389482501 +0100
+++ their_log   2018-12-30 15:38:05.765438858 +0100
@@ -90,3 +90,3 @@
 -- Checking for module 'xcb-proto'
---   Found xcb-proto, version 1.13
+--   Found xcb-proto, version 1.8
 -- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.7") 
@@ -104,3 +104,3 @@
 -- Searching for xcbgen with python2
--- Found xcbgen in /usr/lib/python2.7/dist-packages
+-- Found xcbgen in /usr/local/lib/python2.7/dist-packages
 -- XCB[RANDR]: Found component RANDR

You seem to have xcb-proto 1.8 installed (alongside 1.13) and polybar detects version 1.8 and thus fails. You need to remove all traces of version 1.8. I'm not quite sure how you can do that on ubuntu, but reinstalling xcb-proto might help.

alexis974 commented 5 years ago

Alright thanks a lot for your help ! I tried to remove it, but with no luck. I'll try to find a way to remove it in the next few days. I'll post the solution as soon as i find it