CMake not able to find X11 package
Asked Answered
H

2

7

I am trying to run the verilog simulator "verilog-to-routing (vtr). When building vtr, I am not able to enable the graphics.

A warning message appears: "EasyGL: Failed to find required X11 library (on debian/ubuntu try sudo apt-get install libx11-dev to install)". Installing libx11-dev is not solving the problem.

In the file "vtr-verilog-to-routing-8.0.0/libs/libeasygl/CMakeLists.txt" there are the following lines related to this:

#Look for X11, font and cairo libraries 
message(STATUS "EasyGL: UNIX detected, looking for X11 and font libraries")
find_package(Fontconfig)
find_package(X11 COMPONENTS X11 Xft)
find_package(Freetype)
find_package(Cairo)

if(NOT X11_FOUND)
set(FOUND_EASYGL_DEPENDANCIES  false)
message(WARNING "EasyGL: Failed to find required X11 library (on debian/ubuntu try 'sudo apt-get install libx11-dev' to install)")
endif()

When I execute the Makefile the following message appears:

-- EasyGL: UNIX detected, looking for X11 and font libraries
-- Could NOT find X11 (missing: X11)
CMake Warning at libs/libeasygl/CMakeLists.txt:49 (message):
EasyGL: Failed to find required X11 library (on debian/ubuntu try 'sudo
apt-get install libx11-dev' to install)

-- EasyGL: graphics disabled

The packet libx11-dev is already installed.

These are the corresponding lines in the CMakeCache.txt file (I have only included the NOTFOUND paths):

//Path to a file.
X11_Xpm_INCLUDE_PATH:PATH=X11_Xpm_INCLUDE_PATH-NOTFOUND

//Path to a library.
X11_Xpm_LIB:FILEPATH=X11_Xpm_LIB-NOTFOUND

//Path to a file.
X11_Xss_INCLUDE_PATH:PATH=X11_Xss_INCLUDE_PATH-NOTFOUND

/Path to a library.
X11_Xss_LIB:FILEPATH=X11_Xss_LIB-NOTFOUND

//Path to a file.
X11_Xv_INCLUDE_PATH:PATH=X11_Xv_INCLUDE_PATH-NOTFOUND

//Path to a library.
X11_Xv_LIB:FILEPATH=X11_Xv_LIB-NOTFOUND

/Path to a file.
X11_Xxf86misc_INCLUDE_PATH:PATH=X11_Xxf86misc_INCLUDE_PATH-NOTFOUND

//Path to a library.
X11_Xxf86misc_LIB:FILEPATH=X11_Xxf86misc_LIB-NOTFOUND

//Path to a file.
X11_Xxf86vm_INCLUDE_PATH:PATH=X11_Xxf86vm_INCLUDE_PATH-NOTFOUND

//Path to a library.
X11_Xxf86vm_LIB:FILEPATH=X11_Xxf86vm_LIB-NOTFOUND

//Path to a file.
X11_xkbfile_INCLUDE_PATH:PATH=X11_xkbfile_INCLUDE_PATH-NOTFOUND

//Path to a library.
X11_xkbfile_LIB:FILEPATH=X11_xkbfile_LIB-NOTFOUND

When looking in the directory usr/inlcude/X11 there is a Xft directory, and it seems like it is founding it. Here, there is not any X11.h file or another X11 directory. Next there is a picture of the contents of the directory:

contents of X11 directory

I am using Ubuntu 20.04 and verilog-to-routing 8.0.0.

I have opened an issue in the verilog-to-routing github (https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/1461), but I guess this problem is more related to cmake.

Hummocky answered 4/8, 2020 at 5:38 Comment(2)
Have you deleted your CMakeCache.txt file after installing the package?Hoggish
I had already installed the package before making the first make.Hummocky
T
3

You probably need to install a few more packages such as:

apt-get install libxss-dev libxxf86vm-dev libxkbfile-dev libxv-dev

then try the cmake command again.

Ty answered 19/2, 2021 at 22:30 Comment(0)
S
1

In my case, I needed to include theses packages:

sudo apt-get install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

It worked after these additional installs

Slavism answered 19/11, 2022 at 11:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.