compileOF.sh fails to compile OpenFrameworks on Arch Linux

This is the error I’m getting and I did run both install_codecs.sh and install_dependencies.sh

In file included from /home/archspect/of_v0.11.2_linux64gcc6_release/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:10:
/usr/include/sndfile.h:356:33: error: conflicting declaration 'typedef struct sf_private_tag SNDFILE'
  356 | typedef struct sf_private_tag   SNDFILE ;
      |                                 ^~~~~~~
In file included from /home/archspect/of_v0.11.2_linux64gcc6_release/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
/home/archspect/of_v0.11.2_linux64gcc6_release/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:18:33: note: previous declaration as 'typedef struct SNDFILE_tag SNDFILE'
   18 | typedef struct SNDFILE_tag      SNDFILE ;
      |                                 ^~~~~~~
make[1]: *** [makefileCommon/compile.core.mk:238: /home/archspect/of_v0.11.2_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o] Error 1
make: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
there has been a problem compiling Debug OF library
please report this problem in the forums

Hi @Archspect and welcome to the forum!

See this post:

Try the nightly build on the download page.

Okay it compiled OF successfully and now when I try to run the projectGenerator which I made it install globally, it gives me this error:

projectGenerator: symbol lookup error: /usr/lib/libfreeimage.so.3: undefined symbol: TIFFFieldSetGetSize

Edit:
After downgrading freeimage (which is suspiciously the same version) the error changed to

projectGenerator: error while loading shared libraries: libIlmImf-2_4.so.24: cannot open shared object file: No such file or directory

That library is nowhere to be found. both not in the official repository and AUR

I am not on Arch but on Debian but

seems to be located in

libopenexr*

I found a package named openexr and I installed it. same error. I also downgraded it down a version. still the same error.

Some Arch guru have to help you here.

Can you make the examples?

is this thread of any use?

Let me try and see if it works.

On my machine I also have libopenexr-dev installed. I don’t know if this makes any difference but maybe worth a try.

before I have to quit the system update again, what else related packages do you have installed

Well, I ran the install_dep and install_codecs script, just like you did. I don’t think I added anything manually to make it work (but who knows, I use this machine for developing other stuff too). :slight_smile:

And I always run my machine with the latest updates (Debian 11.4 Testing).

I was unable to find any package under that name so back to trying to upgrade my system and hope that it fixes the isse.

After an upgrade and installing a couple more packages, I managed to run both the CLI and GUI. But then when I want to actually create the project it gives me this error

Command failed: /bin/sh -c "/home/archspect/of_v20220724_linux64gcc6_release/apps/projectGenerator/commandLine/bin/projectGenerator"  -o"/home/archspect/of_v20220724_linux64gcc6_release" -a" " -p"linux64" -t"" "/home/archspect/of_v20220724_linux64gcc6_release/apps/myApps/mySketch"
malloc_consolidate(): invalid chunk size

I can’t reproduce this error on my Debian machine. This is when you run the compiled projectgenerator with the window/GUI?

Can you create an oF project from inside QT Creator, whis is the supported IDE for oF on GNU/Linux? (QT Creator > Create project > openFrameworks > openFrameworks application)

“This is when you run the compiled projectgenerator with the window/GUI?”

Yes

Can you create an oF project from inside QT Creator, whis is the supported IDE for oF on GNU/Linux? (QT Creator > Create project > openFrameworks > openFrameworks application)

Well this is gonna take forever to download (I have very bad internet)

More errors


/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxSvg/src/ofxSvg.cpp:30: error: undefined reference to 'ofToDataPath[abi:cxx11](boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxSvg/src/ofxSvg.cpp:37: error: undefined reference to 'ofBufferFromFile(boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:32: error: undefined reference to 'ofFile::open(boost::filesystem::path const&, ofFile::Mode, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:258: error: undefined reference to 'ofFilePath::getEnclosingDirectory[abi:cxx11](boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:259: error: undefined reference to 'ofFilePath::getFileName[abi:cxx11](boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:260: error: undefined reference to 'ofFilePath::join[abi:cxx11](boost::filesystem::path const&, boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:260: error: undefined reference to 'ofFilePath::join[abi:cxx11](boost::filesystem::path const&, boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:262: error: undefined reference to 'ofFile::doesFileExist(boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp:282: error: undefined reference to 'ofLoadImage(ofTexture&, boost::filesystem::path const&, ofImageLoadSettings const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxVectorGraphics/src/ofxVectorGraphics.cpp:154: error: undefined reference to 'ofToDataPath[abi:cxx11](boost::filesystem::path const&, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:104: error: undefined reference to 'ofTrueTypeFont::load(boost::filesystem::path const&, int, bool, bool, bool, float, int)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:232: error: undefined reference to 'ofFilePath::getFileExt[abi:cxx11](boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:235: error: undefined reference to 'ofFile::ofFile(boost::filesystem::path const&, ofFile::Mode, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:236: error: undefined reference to 'ofXml::load(boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:239: error: undefined reference to 'ofXml::save(boost::filesystem::path const&) const'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:251: error: undefined reference to 'ofFilePath::getFileExt[abi:cxx11](boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:254: error: undefined reference to 'ofXml::load(boost::filesystem::path const&)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxGui/src/ofxBaseGui.cpp:258: error: undefined reference to 'ofFile::ofFile(boost::filesystem::path const&, ofFile::Mode, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/libs/openFrameworks/utils/ofJson.h:19: error: undefined reference to 'ofFile::ofFile(boost::filesystem::path const&, ofFile::Mode, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/libs/openFrameworks/utils/ofJson.h:57: error: undefined reference to 'ofFile::ofFile(boost::filesystem::path const&, ofFile::Mode, bool)'
/home/archspect/of_v20220724_linux64gcc6_release/addons/ofxOpenCv/src/ofxCvHaarFinder.cpp:56: error: undefined reference to 'ofToDataPath[abi:cxx11](boost::filesystem::path const&, bool)'
collect2: error: ld returned 1 exit status
Process failed with exit code 1.
The following products could not be built for configuration Debug_Desktop_038b678e9426a45b:
untitled1
Error while building/deploying project untitled1 (kit: Desktop)
When executing step "Qbs Build"
21:55:24: Elapsed time: 00:03.

Hi @Archspect , I hope the following is helpful for the errors in your most recent post:

The nightly build now supports c++17. There were some changes made to support a new file system to accomplish this. There is a flag set in the config.linux.common.mk file (line 139), which can be commented out if c++17 is not desired when oF is compiled with the compileOF.sh script:

PLATFORM_CXXVER = -std=c++17

If oF is compiled for c++17 (the default in the nightly), then the projects should be too. So you may have to uncomment and add a flag in the project config.make file (scroll down to the bottom of this file):

PROJECT_CXX += -std=c++17

Or if you’re using Qt Creator you’d set this flag in the project .qbs file.

1 Like

I added the line in the qbs file and it compiled fine. but when I run it it gives me this error

/home/archspect/untitled1/bin/untitled1_debug: error while loading shared libraries: libfmod.so.12: cannot open shared object file: No such file or directory

It still gives that error after installing libfmod

Maybe this post will help:

One other thing: you don’t really need the project generator if it doesn’t work. You can copy another project and edit the files manually. But using QT Creator to create a new project works pretty good.

Is there any way that I will be able to use openframeworks without any Qt things involved?

Hey sure you don’t have to use Qt. I’ve seen some forum threads with linux users who use VSCode for example. I don’t think VSCode is officially supported for linux like Qt Creator, but people have gotten it working, including maybe with code completion. CodeBlocks was officially supported several years ago before Qt Creator. I’ve used Geany on a Raspberry Pi before, so a light-weight editor like that could work. In general, code completion and etc could be an issue with alternative IDEs. Accommodating oF for Arch linux (and related distress) could be a bit more complex too because of the rolling nature of the distro.

Searching the forum might be a good place to start. There may be more threads like this one: Linux users, what IDE are you using and do you have code completion?