on installing dwl in archlinux
[~/dwl] > make
c99 pkg-config --cflags wlroots wayland-server xkbcommon libinput -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L -DVERSION="git describe --tags --dirty 2>/dev/null || echo 0.5" -g -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wno-sign-compare -Wshadow -Wunused-macros -Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types -O1 -c dwl.c
Package wlroots was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlroots.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlroots' not found
dwl.c:14:10: fatal error: wlr/backend.h: No such file or directory
14 | #include <wlr/backend.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:66: dwl.o] Error 1
[~/dwl] > sudo make install
c99 pkg-config --cflags wlroots wayland-server xkbcommon libinput -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L -DVERSION="git describe --tags --dirty 2>/dev/null || echo 0.5" -g -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wno-sign-compare -Wshadow -Wunused-macros -Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types -O1 -c dwl.c
Package wlroots was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlroots.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlroots' not found
dwl.c:14:10: fatal error: wlr/backend.h: No such file or directory
14 | #include <wlr/backend.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:66: dwl.o] Error 1
Assistant
It looks like you are trying to build dwl (a dynamic window manager for Wayland) on Arch Linux, but the compilation process is failing because the package wlroots is not found. wlroots is a library that provides essential tools for building Wayland compositors, and it's a required dependency for building dwl.
[~/dwl] > make clean
make
rm -f dwl *.o *-protocol.h
pkg-config --variable=wayland_scanner wayland-scanner server-header pkg-config --variable=pkgdatadir wayland-protocols/staging/cursor-shape/cursor-shape-v1.xml cursor-shape-v1-protocol.h
pkg-config --variable=wayland_scanner wayland-scanner server-header pkg-config --variable=pkgdatadir wayland-protocols/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
pkg-config --variable=wayland_scanner wayland-scanner server-header
protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
c99 pkg-config --cflags wlroots wayland-server xkbcommon libinput -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L -DVERSION="git describe --tags --dirty 2>/dev/null || echo 0.5" -g -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wno-sign-compare -Wshadow -Wunused-macros -Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types -O1 -c dwl.c
Package wlroots was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlroots.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlroots' not found
dwl.c:14:10: fatal error: wlr/backend.h: No such file or directory
14 | #include <wlr/backend.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:66: dwl.o] Error 1
Assistant
The error message indicates that the wlroots package is still not being found by , which is necessary for building . Here are some steps you can take to troubleshoot and resolve this issue:
User
[~/dwl] > doas find /usr -name wlroots.pc
doas (piyush@archlinux) password:
[~/dwl] >
Assistant
It seems that the find command didn't return any results for wlroots.pc, which indicates that the wlroots package is likely not installed, or it's installed in a non-standard location that pkg-config cannot access.
Here’s how you can proceed:
1. Install wlroots
First, try to install wlroots using the Arch package manager, as it is crucial for building dwl. You can do this with either pacman or an AUR helper like .
User
[~/dwl] > pacman -Qs wlroots
local/bemenu-wayland 0.6.23-1
Wayland (wlroots-based compositors) renderer for bemenu
local/waybar 0.11.0-5
Highly customizable Wayland bar for Sway and Wlroots based compositors
local/wlroots 0.18.2-1
Modular Wayland compositor library
local/xdg-desktop-portal-wlr 0.7.1-1
xdg-desktop-portal backend for wlroots
[~/dwl] > pkg-config --cflags wlroots
Package wlroots was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlroots.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlroots' not found
Assistant
User
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Install wlroots:
Ensure that you have wlroots installed. You can install wlroots from the Arch User Repository (AUR) or from the official repositories based on your needs.
From the official repositories (if you are using wayland or any related package):
sudo pacman -S wlroots
If you can't find it, you may want to check the AUR:
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
After installing yay, you can install wlroots using:
yay -S wlroots
Set PKG_CONFIG_PATH (if needed):
If you've installed wlroots but it's still not found, you might need to set the PKG_CONFIG_PATH environment variable to include the directory where wlroots.pc is located. This usually isn't necessary when installed through the package manager, but you could check:
Adjust the path accordingly based on where wlroots is installed.
Rebuild dwl:
After ensuring wlroots is installed, navigate back to your dwl directory and run make again:
make clean
make
If there's an installation step:
sudo make install
Check for Other Dependencies:
Ensure you also have all other necessary dependencies for dwl. You may need to install wayland, xkbcommon, libinput, etc. You can install them using:
sudo pacman -S wayland xkbcommon libinput
Once you've done these steps, the compilation of dwl should succeed. If you still experience issues, double-check all dependencies and ensure both pkg-config and the libraries are properly installed and configured.
pkg-config
dwl
1. Verify Installation
First, ensure that wlroots is actually installed. You can check if the package is listed as installed:
pacman -Qs wlroots
If it is not installed, you can install it using:
sudo pacman -S wlroots
2. Check pkg-config Path
Check where the wlroots.pc file is located:
find /usr -name wlroots.pc
Typically, it should be in /usr/lib/pkgconfig/. If it’s located elsewhere (for instance, /usr/local/lib/pkgconfig/), you’ll need to add that path to your PKG_CONFIG_PATH. For instance:
This command should return flags related to wlroots. If it still indicates that the package is not found, then it means that wlroots is either not installed correctly or pkg-config cannot find it.
4. Check Other Dependencies
Make sure you have the other necessary development packages installed as well. You can install the development versions of the related libraries if they are not already installed:
Sometimes, it helps to clean up and reset to a known state. From your dwl source directory, run:
make clean
Then try to build again, ensuring you have the correct PKG_CONFIG_PATH set right before you run make.
6. Manual Build (if necessary)
If all else fails, you can also try to manually specify the include path by changing the Makefile (or your build command). Find where it uses pkg-config, and if wlroots is not found, replace it with hard-coded paths to wlroots includes (if you know where they are).
7. Alternative: AUR
If all these options fail and you've exhausted all possibilities, consider installing dwl from the AUR instead of building manually:
yay -S dwl
This will handle dependencies and installation for you, which should mitigate the issue. If you continue to encounter problems, please provide more details about your wlroots installation process or any specific output/error messages.
yay
Using pacman:
sudo pacman -S wlroots
If wlroots appears to be missing from the official repositories, then it’s likely available from the AUR.
2. Install from the AUR
If you do not have wlroots in the official repositories, you can install it from the AUR:
Clone the AUR repository for wlroots:
git clone https://aur.archlinux.org/wlroots.git
cd wlroots
Build and install:
makepkg -si
This will compile wlroots and install it. Make sure to check the output and resolve any dependency issues that may arise during this process.
3. Verify Installation
Once the installation is complete, check again for wlroots.pc:
find /usr/lib/pkgconfig -name wlroots.pc
You should now see the wlroots.pc file if the installation was successful.
4. Try Compiling dwl Again
Once wlroots is installed, navigate back to your dwl directory:
cd ~/dwl
Run make again:
make clean
make
5. Further Steps (if necessary)
If you continue to encounter issues, ensure you have all dependencies installed as previously suggested, and check your PKG_CONFIG_PATH again after the installation. The final command to compile dwl should work if wlroots and its .pc file are set up correctly.
If you encounter other error messages during this process, do let me know, and I can help troubleshoot those specific issues.
From the information you've provided, it looks like you have wlroots installed (local/wlroots 0.18.2-1), but the associated wlroots.pc file is not being found by pkg-config. Here are a few troubleshooting steps you can take:
1. Confirm the Installation of wlroots
Since wlroots is installed, the .pc file should typically be located in /usr/lib/pkgconfig/. However, given that it is not found, verify the installation:
# Check if the package is properly installed
pacman -Ql wlroots | grep wlroots.pc
This command lists the files provided by the wlroots package and looks for wlroots.pc. If it’s missing, then something went wrong during the installation, or it may have been omitted.
2. Reinstall wlroots
If the .pc file is indeed missing, a simple reinstallation might resolve the issue. You can uninstall and then reinstall wlroots:
sudo pacman -R wlroots
sudo pacman -S wlroots
3. Check for Alternative Locations
It's possible that wlroots was installed to a non-standard location. After reinstalling, check again for the .pc file:
If the package from the official repositories continues to cause issues, consider using the AUR version. Ensure that git and base-devel are installed if you're using makepkg:
Clone and install from AUR:
git clone https://aur.archlinux.org/wlroots.git
cd wlroots
makepkg -si
5. Compile dwl Again
Once you have confirmed that the wlroots.pc file is correctly installed, try compiling dwl again:
Set the PKG_CONFIG_PATH if needed (though it should not be necessary after installation):
If you still cannot find wlroots.pc, check the permissions in the directories to ensure your user has access:
ls -l /usr/lib/pkgconfig
Make sure that your user has the necessary permissions to read from this directory.
Conclusion
If all these steps fail, please provide the output of the command to list wlroots files again:
pacman -Ql wlroots
This should help determine if wlroots is installed correctly and if its .pc file exists. If you have any further questions or run into additional issues, let me know!
[~/dwl/wlroots] > makepkg -si
==> Making package: wlroots 0.2-1 (Tue 07 Jan 2025 11:12:19 AM IST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
[sudo] password for piyush:
resolving dependencies...
looking for conflicting packages...
A full log can be found at /home/piyush/dwl/wlroots/src/build/meson-logs/meson-log.txt
==> ERROR: A failure occurred in build().
Aborting...
The error you're encountering during the build process for wlroots indicates that the Meson build system is rejecting the xcb-xkb option as an unknown option. This can occur if you're trying to build an older version or if there are discrepancies in the package's build configuration.
Here are steps you can take to troubleshoot and resolve the issue:
1. Check the Version of wlroots
Make sure you're trying to build the correct version of wlroots. The error message indicates that you're using version 0.2, which is significantly outdated. The latest version of wlroots might have different dependencies and options.
2. Revert Back to the Correct AUR Source
If you're trying to install wlroots from the AUR, consider obtaining the correct version. You can specify a particular version in the AUR or use git to get the latest version from the repository:
git clone https://git.sr.ht/~emersion/wlroots
cd wlroots
makepkg -si
3. Install the Correct Dependencies
If you continue to work with an older version or specific build, you may need to install required dependencies to ensure all components function correctly.
Make sure basic dependencies for building wlroots are installed:
Before building wlroots, make sure to clean any previous build artifacts that might conflict:
make clean
5. Adjust Build Options
Sometimes parameters in the PKGBUILD file may need to be updated or tailored for newer library versions. Check the AUR's PKGBUILD file for wlroots to see what options it attempts to pass to meson, inspect its compatibility with your installed packages.
You can view the PKGBUILD by:
cat PKGBUILD
Make necessary adjustments as required.
6. Check the Logs for More Information
If the build fails again, check the logs located at /home/piyush/dwl/wlroots/src/build/meson-logs/meson-log.txt. This file contains detailed information that might help diagnose further:
The key is ensuring that you’re attempting to build a compatible version of wlroots along with the correct dependencies. If you are still facing issues, consider:
Searching for an updated PKGBUILD from various AUR helpers.
Asking for help in the Arch Linux forums or the appropriate GitHub repository, where maintainers can provide guidance on building the library under your specific conditions.
If you need further assistance or have specific issues after trying these steps, feel free to share the detailed errors or outputs!