Short explanation:
Getting /usr/bin/ld.gold: error: cannot find -lglfw
. Linker can’t find my custom glfw install even though I added export LD_LIBRARY_PATH=/usr/local:${LD_LIBRARY_PATH}
to ~/.bashrc
and ran source on it.
Advice welcome
Been banging my head against the keyboard from this problem for a little while now. Any suggestions would be much appricated. Have a feeling maybe chaning a makefile would fix this but I’m more farmilar with cmake and not really sure where to start chaning things in the openFrameworks makefiles.
Long explaination:
Runninng x11 on Fedora 34 because as far as I know you need to be running x11 for nvidia drivers to work. The GLFW package on Fedora 34 is compiled with the intention of being run on wayland because that’s the default on Fedora 34. So here’s the steps I followed to try to fix this problem.
Initial Bug
Ran install_codecs.sh
and install_dependencies.sh
from fedora folder.
Then ran ./compileOF.sh without problems
The first error I was getting: (See first error in first comment on this thread. I exceeded the character limit.)
Trying again with custom build of GLFW
I realized the x11 wayland problem after some duckduckgoing.
So I first followed instructions to make x11 the default session. Configuring Xorg as the default GNOME session :: Fedora Docs
After that I rebooted and ran sudo dnf remove glfw glfw-devel
Then I did a manual install of glfw from source the steps for that were:
- download source from Download | GLFW
- unzip
mkdir cmake-build
cd cmake-build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo cmake -P cmake_install.cmake
The output was:
(base) [duskvirkus@fedora cmake-build]$ sudo cmake -P cmake_install.cmake
-- Install configuration: ""
-- Up-to-date: /usr/local/include/GLFW
-- Installing: /usr/local/include/GLFW/glfw3.h
-- Installing: /usr/local/include/GLFW/glfw3native.h
-- Installing: /usr/local/lib64/cmake/glfw3/glfw3Config.cmake
-- Installing: /usr/local/lib64/cmake/glfw3/glfw3ConfigVersion.cmake
-- Installing: /usr/local/lib64/cmake/glfw3/glfw3Targets.cmake
-- Installing: /usr/local/lib64/cmake/glfw3/glfw3Targets-noconfig.cmake
-- Installing: /usr/local/lib64/pkgconfig/glfw3.pc
-- Installing: /usr/local/lib64/libglfw.so.3.3
-- Installing: /usr/local/lib64/libglfw.so.3
-- Installing: /usr/local/lib64/libglfw.so
Then I added export LD_LIBRARY_PATH=/usr/local:${LD_LIBRARY_PATH}
to ~/.bashrc
and ran source ~/.bashrc
. This was after another install attempt and more duckduckgoing about installing glfw on linux.
You can see it worked.
(base) [duskvirkus@fedora linux]$ echo $LD_LIBRARY_PATH
/usr/local:/usr/local/lib:
Deleted my previous version of openFrameworks and started fresh with a new unzip. Didn’t run install_codecs.sh
and install_dependencies.sh
. But did run compileOF.sh
. And got the following bug when running compilePG.sh
. Same problem when running buildAllExamples.sh
.
(See second error in second comment on this thread. I exceeded the character limit.)