Describe how you build polybar, list the exact commands you are using: This repository
If you build polybar directly from this repository:
Output of git describe --tags: 3.4.0-180-g5002297
Build Log
Post everything that is output to the terminal while building polybar below. This HAS to include the output of the cmake and make commands, if you used them.
$ ./build.sh -d
** Fetching submodules
** 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]: n
** 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
** Parallelize the build using make -j4 --------------------------- [y/N]: y
** Executing cmake command
-- Trying to enable ccache
-- Couldn't locate ccache, disabling ccache...
-- No build type specified; using Release
-- Using supported compiler GNU-9.3.0
-- Build:
-- Version: 3.4.0-180-g5002297
-- Type: Release
-- CXX: /usr/bin/g++ -Wall -Wextra -Wpedantic -O3 -DNDEBUG
-- LD: /usr/bin/ld
-- Install Paths:
-- PREFIX: /usr/local
-- BINDIR: /usr/local/bin
-- DATADIR: /usr/local/share
-- DOCDIR: /usr/local/share/doc/polybar
-- MANDIR: /usr/local/share/man
-- Targets:
-- [X] polybar-msg
-- [ ] testsuite
-- [ ] documentation
-- Module support:
-- [X] alsa (1.2.2)
-- [X] curl (7.68.0)
-- [X] dwm
-- [ ] i3
-- [X] mpd (2.18)
-- [X] network (wireless-tools)
-- [X] pulseaudio (13.99.1)
-- [X] xkeyboard (1.14)
-- X extensions:
-- [X] xcb-randr (1.14)
-- [X] xcb-randr (monitor support) (1.14)
-- [X] xcb-composite (1.14)
-- [X] xcb-xkb (1.14)
-- [X] xcb-xrm (1.0)
-- [X] xcb-cursor (0.1.1)
-- Log options:
-- [X] Trace logging
-- 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 /usr/bin/python3
-- Found xcbgen in /usr/lib/python3/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
-- Font not found: fixed:pixelsize=10
-- Font not found: unifont:fontformat=truetype
-- Font not found: siji:pixelsize=10
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jesus/git/polybar-dwm-module/build
** Building project
Scanning dependencies of target dwmipcpp
[ 5%] Built target xpp
[ 6%] Building CXX object lib/dwmipcpp/CMakeFiles/dwmipcpp.dir/src/connection.cpp.o
[ 11%] Built target polybar-msg
[ 12%] Linking CXX static library libdwmipcpp.a
[ 16%] Built target dwmipcpp
Scanning dependencies of target poly
[ 17%] Building CXX object bin/CMakeFiles/poly.dir/components/controller.cpp.o
[ 18%] Building CXX object bin/CMakeFiles/poly.dir/modules/dwm.cpp.o
In file included from /home/jesus/git/polybar-dwm-module/include/modules/dwm.hpp:3,
from /home/jesus/git/polybar-dwm-module/src/modules/dwm.cpp:1:
/home/jesus/git/polybar-dwm-module/lib/dwmipcpp/include/dwmipcpp/connection.hpp: In instantiation of ‘static void dwmipc::Connection::run_command_build(Json::Value&, T) [with T = long unsigned int]’:
/home/jesus/git/polybar-dwm-module/lib/dwmipcpp/include/dwmipcpp/connection.hpp:138:26: required from ‘void dwmipc::Connection::run_command(std::string, Types ...) [with Types = {long unsigned int}; std::string = std::__cxx11::basic_string<char>]’
/home/jesus/git/polybar-dwm-module/src/modules/dwm.cpp:266:47: required from here
/home/jesus/git/polybar-dwm-module/lib/dwmipcpp/include/dwmipcpp/connection.hpp:354:9: error: conversion from ‘long unsigned int’ to ‘const Json::Value’ is ambiguous
354 | arr.append(arg);
| ^~~
In file included from /usr/include/jsoncpp/json/json.h:10,
from /home/jesus/git/polybar-dwm-module/lib/dwmipcpp/include/dwmipcpp/connection.hpp:10,
from /home/jesus/git/polybar-dwm-module/include/modules/dwm.hpp:3,
from /home/jesus/git/polybar-dwm-module/src/modules/dwm.cpp:1:
/usr/include/jsoncpp/json/value.h:312:3: note: candidate: ‘Json::Value::Value(bool)’
312 | Value(bool value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:289:3: note: candidate: ‘Json::Value::Value(double)’
289 | Value(double value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:287:3: note: candidate: ‘Json::Value::Value(Json::Value::UInt64)’
287 | Value(UInt64 value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:286:3: note: candidate: ‘Json::Value::Value(Json::Value::Int64)’
286 | Value(Int64 value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:284:3: note: candidate: ‘Json::Value::Value(Json::Value::UInt)’
284 | Value(UInt value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:283:3: note: candidate: ‘Json::Value::Value(Json::Value::Int)’
283 | Value(Int value);
| ^~~~~
/usr/include/jsoncpp/json/value.h:437:30: note: initializing argument 1 of ‘Json::Value& Json::Value::append(const Json::Value&)’
437 | Value& append(const Value& value);
| ~~~~~~~~~~~~~^~~~~
make[2]: *** [bin/CMakeFiles/poly.dir/build.make:492: bin/CMakeFiles/poly.dir/modules/dwm.cpp.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
make[1]: *** [CMakeFiles/Makefile2:528: bin/CMakeFiles/poly.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
** Failed to build project
Environment:
Distro (with Version): Ubuntu 20.04.1 LTS
Additional context
Add any other context that you think is necessary about the problem here.
I don't have enough experience with these things, but I think the problem originates from the jsoncpp version used to build. On my distro, the latest version available in apt is 1.7.4-3.1ubuntu2. That seems to be much older than the latest version shown on jsoncpp repository (1.9.3). I seem to have been able to "install" the newer version with vcpkg, but there probably are a couple extra steps to get the compiler to use it. Is there a workaround to this?
Build Process
Describe how you build polybar, list the exact commands you are using: This repository
If you build polybar directly from this repository:
git describe --tags
: 3.4.0-180-g5002297Build Log
Post everything that is output to the terminal while building polybar below. This HAS to include the output of the
cmake
andmake
commands, if you used them.Environment:
Additional context
Add any other context that you think is necessary about the problem here. I don't have enough experience with these things, but I think the problem originates from the jsoncpp version used to build. On my distro, the latest version available in apt is 1.7.4-3.1ubuntu2. That seems to be much older than the latest version shown on jsoncpp repository (1.9.3). I seem to have been able to "install" the newer version with vcpkg, but there probably are a couple extra steps to get the compiler to use it. Is there a workaround to this?