polybar: Cannot finish make install (Ubuntu 18.04)

Trying to build on ubuntu 18.04:

 darkdog@darkdog:~/polybar$ ./build.sh
** Fetching submodules
** Setting build options
** Include support for "internal/i3" (requires i3) ------------------- [Y/n]: y
** Include support for "internal/volume" (requires alsalib) ---------- [Y/n]: y
** Include support for "internal/network" (requires wireless_tools) -- [Y/n]: y
** Include support for "internal/mpd" (requires libmpdclient) -------- [Y/n]: y
** Include support for "internal/github" (requires libcurl) ---------- [Y/n]: n
** Build "polybar-msg" used to send ipc messages --------------------- [Y/n]: y
** Using compiler: g++/gcc
** Executing cmake command
-- 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 'libmpdclient'
--   Found libmpdclient, version 2.11
-- Found Libiw: /usr/lib/x86_64-linux-gnu/libiw.so  
-- 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 -O2 -pedantic -pedantic-errors -O2 -g -DNDEBUG
--    LD: /usr/bin/ld  
--  Targets:
-- [X]   polybar-msg
-- [ ]   testsuite
--  Module support:
-- [X]   alsa
-- [ ]   curl
-- [X]   i3
-- [X]   mpd
-- [X]   network
--  X extensions:
-- [X]   xcb-randr
-- [X]   xcb-randr (monitor support)
-- [ ]   xcb-render
-- [ ]   xcb-damage
-- [ ]   xcb-sync
-- [ ]   xcb-composite
-- [X]   xcb-xkb
-- [X]   xcb-xrm
-- [X]   xcb-cursor
-- 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.13
-- 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/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[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-xkb.so  
-- 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/darkdog/polybar/build
** Building project
Scanning dependencies of target xpp
[  1%] Linking CXX static library libxpp.a
/bin/sh: 1: cannot create /home/darkdog/polybar/lib/xpp/include/xpp/proto/randr.hpp: Permission denied
lib/xpp/CMakeFiles/xpp.dir/build.make:68: recipe for target 'lib/xpp/libxpp.a' failed
make[2]: *** [lib/xpp/libxpp.a] Error 2
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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 31 (13 by maintainers)

Most upvoted comments

So taking the ownership comments into account, I managed to finally build the polybar with the following workaround:

$ git clone --branch 3.1.0 --recursive https://github.com/jaagr/polybar
$ sudo chown USERNAME -R /home/USERNAME/*
$ cd polybar/lib/xpp
$ git checkout master
$ rm include/xpp/proto/*
$ cd
$ mkdir polybar/build
$ cd polybar/build
$ cmake ..
$ sudo make install

Obviously the above workaround, was ok for my situation (minimal 18.04 ubuntu installation from mini.iso, I might have messed something in the process) but could cause problems to others.

I’m not sure if it might be related to the same issue, I just retry and I got a slightly different error. Machine is Ubuntu 18.04 fresh install.

javier@skullcanyon:~/polybar/build$ cmake ..
-- 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/cc
-- Check for working C compiler: /usr/bin/cc -- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- 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
-- Found Libiw: /usr/lib/x86_64-linux-gnu/libiw.so  
-- 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/cc  -O2 -g -DNDEBUG
--    CXX: /usr/bin/c++  -Wall -Wextra -Werror -Wno-noexcept-type -O2 -pedantic -pedantic-errors -O2 -g -DNDEBUG
--    LD: /usr/bin/ld  
--  Targets:
-- [X]   polybar-msg
-- [ ]   testsuite
--  Module support:
-- [X]   alsa
-- [X]   curl
-- [X]   i3
-- [X]   mpd
-- [X]   network
--  X extensions:
-- [X]   xcb-randr
-- [X]   xcb-randr (monitor support)
-- [ ]   xcb-render
-- [ ]   xcb-damage
-- [ ]   xcb-sync
-- [ ]   xcb-composite
-- [X]   xcb-xkb
-- [X]   xcb-xrm
-- [X]   xcb-cursor
-- 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.13
-- 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/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[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-xkb.so  
-- 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/javier/polybar/build
javier@skullcanyon:~/polybar/build$ sudo make install
Scanning dependencies of target xpp
[  1%] Linking CXX static library libxpp.a
Traceback (most recent call last):
  File "/home/javier/polybar/lib/xpp/generators/cpp_client.py", line 3163, in <module>
    from xcbgen.state import Module
  File "/usr/lib/python2.7/dist-packages/xcbgen/state.py", line 7, in <module>
    from xcbgen import matcher
  File "/usr/lib/python2.7/dist-packages/xcbgen/matcher.py", line 12, in <module>
    from xcbgen.xtypes import *
  File "/usr/lib/python2.7/dist-packages/xcbgen/xtypes.py", line 1221, in <module>
    class EventStruct(Union):
  File "/usr/lib/python2.7/dist-packages/xcbgen/xtypes.py", line 1239, in EventStruct
    out = __main__.output['eventstruct']
KeyError: 'eventstruct'
lib/xpp/CMakeFiles/xpp.dir/build.make:68: recipe for target 'lib/xpp/libxpp.a' failed
make[2]: *** [lib/xpp/libxpp.a] Error 1
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

@boubounokefalos: Yeah, you probably messed up some of the permissions in your home folder at some point. I will close this as soon as @AakashMallik is able to resolve their issue as well.