Cannot Run or Build [solved]

Hi, I just installed Ubuntu 22.04 LTS. I successfully installed the dependencies and compileOF, but when I try the next step in the installation process which is to make the polygon example, it does not make and has these 2 errors:

make[1]: *** [/home/willpowerstudios/Documents/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/ bin/polygonExample] Error 1
make[1]: Leaving directory ‘/home/willpowerstudios/Documents/of_v0.11.2_linux64gcc6_release/examples/graphics/polygonExample’
make: *** [/home/willpowerstudios/Documents/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/ Release] Error 2

How can this be fixed ? Is there a solution ?

Thank you.

Hey @WillpowerStudios , were there any other errors in the terminal output? Also just to clarify, the compileOF script did compile oF, right? I ususally use Qt Creator with linux. Did you try running the project generator to update the project, and then also did you try to compile a project with sudo?

Hi @TimChi

here is the entire error message:

Compiling OF library for Release
make[1]: Entering directory '/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project'
make[1]: Leaving directory '/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project'

Compiling polygonExample for Release
make[1]: Entering directory '/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/examples/graphics/polygonExample'
Linking bin/polygonExample for linux64
g++ -o bin/polygonExample  obj/linux64/Release/src/ofApp.o obj/linux64/Release/src/main.o   /home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a  -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections -fuse-ld=gold -L/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/fmod/lib/linux64/ -lfmod /home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/kiss/lib/linux64/libkiss.a /home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/tess2/lib/linux64/libtess2.a -L/usr/lib64 -lcairo -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lpulse-simple -pthread -lpulse -pthread -lasound -lGL -lGLEW -lGL -lX11 -lGLU -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama
/usr/bin/ error: cannot find -lXi
/usr/bin/ error: cannot find -lXcursor
/usr/bin/ error: cannot find -lXinerama
collect2: error: ld returned 1 exit status
make[1]: *** [/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/ bin/polygonExample] Error 1
make[1]: Leaving directory '/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/examples/graphics/polygonExample'
make: *** [/home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/ Release] Error 2

It seems that lXi, lXcursor and lXinerama are issues. Do you know what these are or what this message indicates ?

I also work with QT creator, I love it. Actually, everything was working well but now I’m having these strange issues… I wonder what the source of it is…

when trying to run Project Generator, I get this error:

There was a problem generating your project.../home/willpowerstudios/Nextcloud/of_v0.11.2_linux64gcc6_release/apps/myApps/mySketch

I’m thinking the linker can’t find these 3 libraries, which I think are related to the windowing system and the GLFW window library that oF uses. Most often, linux packages will install into the /usr/ directory. I would speculate that the packages that contain these libraries used to be installed by default with Ubuntu. But they’re (currently) missing, maybe because of an oversight with a new release.

So, you could try to install these packages. In many cases, a linker flag incorporates the name of library its trying to link. And then the package name also has the library name incorporated somehow. So, a linker flag like -lXi would be trying to link the library called libXi. And if you google “ubuntu 22.04 libxi”, you’ll see some results for libxi-dev, which is probably the package that contains the library. So in a terminal, you could sudo apt install libxi-dev, or you could try searching for libxi-dev in the software center. And you’d do this for each of the three linker errors, realizing that there could be a single package that contains some or all of them. On Mint 19.3, the and libraries reside in /user/lib/x86_64-linux-gnu.

As you update 22.04, you may get these packages anyway. So you could also try a sudo apt update every once in a while over the next couple of weeks. And you could also try downloading the nightly build of oF, which does have some nice updates (like c++17 compatibility (I think)). But, this seems like missing dependencies to me.

OK hope this helps! I’m a little over my head with this topic. But, if you have a chance definitely post how it goes as others might have the same problem as they install 22.04 and try to get oF working.

1 Like

Hi @TimChi , it worked :smiley: :sob: :hugs:
Thank you so much !

All I did was install each lib:

How to install libxcursor-dev on Ubuntu
How to install libxi-dev on Ubuntu
How to install libxinerama-dev on Ubuntu

I am so grateful. Thank you again !!!


Just ran into this on 22.04 - thanks for the fix @TimChi @WillpowerStudios
Going to add those libs to the install script.


Did it work for you ?

Hey @theo just a quick note. As I posted in this related thread, I installed the nightly OF and Qt Creator on Mint 21 (newly released and based on ubuntu 22.04). I had to “reinstall” libgtk-3-dev and then recompile OF in order to get OF to work with Qt Creator 6.0.2, which whined about not being able to find gtk+3.0 in its search paths. But I noticed that when the OF script was running, it indicated that libgtk-3-dev was “already installed”. So maybe its there its just in a different place in these distros based on ubuntu 22.04.

As a side note, everything installs, compiles, and runs great on the newest LMDE (debian mint) with the nightly as of a few weeks ago.


Thanks @TimChi

Can confirm on Ubuntu 22.04 I had to reinstall libgtk-3-dev and then Qt Creator 6.0.2 worked.
Can you see anything we can do with the to make it work straight off the bat?

I will have a look and see. I was reading this morning about maybe some issues with apt and ubuntu 22.04, so maybe its not on the OF side. I’ll post back to this thread if I see anything.