Compilation help: cannot find vibrant.h

Hi, guys.

I’m getting this error when compiling an application I downloaded from GitHub:

HEAD is now at a80e4c8 config now remembers whether you want focus checking or not
warning: Pulling without specifying how to reconcile divergent branches is
discouraged. You can squelch this message by running one of the following
commands sometime before your next pull:

  git config pull.rebase false  # merge (the default strategy)
  git config pull.rebase true   # rebase
  git config pull.ff only       # fast-forward only

You can replace "git config" with "git config --global" to set a default
preference for all repositories. You can also pass --rebase, --no-rebase,
or --ff-only on the command line to override the configured default per
invocation.

Already up to date.
/usr/bin/qmake-qt5
Info: creating stash file /home/zeno/Programs/vibrantLinux/.qmake.stash
/../lib64/qt5/bin/uic forms/entryeditor.ui -o ui_entryeditor.h
/../lib64/qt5/bin/uic forms/mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -O2 -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DVIBRANT_LINUX_VERSION=\"2.1.5\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -I/../lib64/qt5/mkspecs/linux-g++ -o autostart.o src/autostart.cpp
g++ -c -pipe -O2 -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DVIBRANT_LINUX_VERSION=\"2.1.5\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -I/../lib64/qt5/mkspecs/linux-g++ -o displaymanager.o src/displaymanager.cpp
In file included from src/displaymanager.cpp:1:
include/displaymanager.h:8:10: fatal error: vibrant/vibrant.h: No such file or directory
    8 | #include <vibrant/vibrant.h>
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:448: displaymanager.o] Error 1
rm: cannot remove '*.cpp': No such file or directory

dnf provides \*/vibrant gives me nothing and I have installed all the required dependencies. libvibrant from GitLab compiled properly this time, too.

Well, dnf won’t find it because libvibrant is not in the Fedora repositories: a search gave me nothing. You’ve compiled libvibrant from source, so you need to tell this new project you are installing where you’ve installed it. Where is the vibrant/vibrant.h file installed by your libvibrant compilation? You need to specify this directory to the compiler using the -I... option.

4 Likes

Alternatively, if you make install your compiled libvibrant, it should install itself to /usr/local/lib, where the compiler should find it by default.

4 Likes

@FranciscoD Thanks. I’m quite new to Linux, so I’m still trying to figure out how it works. Unfortunately, I did not know how or where to append -I, so I went with @lcts’s solution.

@lcts Thanks, Chris!

3 Likes

For other noobs trying to get this to work in the future and you get the error quoted hereunder:

./vibrantLinux: error while loading shared libraries: libvibrant.so.1: cannot open shared object file: No such file or directory

Do sudo echo "/usr/local/lib64" >> /etc/ld.so.conf and sudo ldconfig and try re-running ./vibrantLinux in the terminal - it should now work.

2 Likes

Be careful with sudo echo "/usr/local/lib64" >> /etc/ld.so.conf because the version I have on Fedora 32 has include ld.so.conf.d/*.conf and it might be better to make a single-line file in /etc/ld.so.conf.d like sudo echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-x86_64.conf

`

2 Likes

Thanks for the tip :blush:

Note, neither of those should actually work. The sudo applies to the echo and the redirection (>>) is run by the shell, which is running as the user. Since this is creating a new file, a way to do this is:

$ echo "/usr/local/lib64" | sudo tee /etc/ld.so.conf.d/local-x86_64.conf
3 Likes

Yes, that is correct. Since I am noob, I did micro /etc/ld.so.conf.d and typed it in manually :joy:

Thanks for showing me how to do it using the CLI :+1:

You’re right. From a command line, I usually sudo bash and then run the commands at a # prompt and exit when I am done. From inside a script, another alternative for commands with redirection is sudo /bin/bash -c "echo /usr/local/lib64 >> /etc/ld.so.conf.d/local-x86_64.conf"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.