clbr/radeontop

getting this error while running `make` command

Closed this issue · 2 comments

(myenv) hemang@hemang-levono-15arr:~/Documents/GitHub/radeontop$ make
./getver.sh
ec97e6f11b106bcb1b3aadaa9a173afd61e3eb03
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o auth.o auth.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o detect.o detect.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o dump.o dump.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o family_str.o family_str.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o radeon.o radeon.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o radeontop.o radeontop.c
radeontop.c: In function ‘main’:
radeontop.c:52:9: warning: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   52 |         seteuid(getuid());
      |         ^~~~~~~~~~~~~~~~~
radeontop.c:136:9: warning: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  136 |         seteuid(0);
      |         ^~~~~~~~~~
radeontop.c:140:9: warning: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  140 |         setuid(getuid());
      |         ^~~~~~~~~~~~~~~~
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o ticks.o ticks.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o ui.o ui.c
ui.c: In function ‘printcenter’:
ui.c:30:9: warning: ignoring return value of ‘vasprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   30 |         vasprintf(&ptr, fmt, ap);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
ui.c: In function ‘printright’:
ui.c:53:9: warning: ignoring return value of ‘vasprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   53 |         vasprintf(&ptr, fmt, ap);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s   -c -o amdgpu.o amdgpu.c
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -o radeontop auth.o detect.o dump.o family_str.o radeon.o radeontop.o ticks.o ui.o amdgpu.o -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s -Wl,-O1 -Wl,-gc-sections -ldrm_amdgpu  -lpciaccess  -ldrm  -lm -ldl -lncursesw -ltinfo 
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
Package xcb-dri2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-dri2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-dri2', required by 'virtual:world', not found
cc -shared -fPIC -Wl,-soname,libradeontop_xcb.so -o libradeontop_xcb.so auth_xcb.c -Os -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections  -I/usr/include/libdrm   -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -DHAS_AMDGPU_QUERY_SENSOR_INFO=1 -s -Wl,-O1 -Wl,-gc-sections 
auth_xcb.c:20:10: fatal error: xcb/dri2.h: No such file or directory
   20 | #include <xcb/dri2.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:99: libradeontop_xcb.so] Error 1
clbr commented

@clbr thanks for the suggestion . SOLVED this by running sudo apt-get install -y libxcb-dri2-0-dev