Can't build any projects with latest OF + qtcreator (fontconfig)

Hi, after updating qtcreator and oF to the latest on GitHub, I can’t build my project. This is the last part of the output:

fontconfig: file not recognized: Is a directory
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
Process failed with exit code 1.
The following products could not be built for configuration qtc_Desktop_117cab14-debug:
	sdnc
Error while building/deploying project sdnc (kit: Desktop)
When executing step "Qbs Build"
19:05:39: Elapsed time: 00:03.

What could be the problem?

I just noticed that the linking output in the console says

... -lgstreamer-1.0 -ludev fontconfig -lfreetype -lsndfile -lopenal ...

It looks like something is missing… ( “-lfontconfig” ? ). Is that a qtcreator or oF error?

Are you on arch linux? I also had this issue but somehow reinstalling fontconfig solved it.

Hi! Thanks, yes, I am on Arch Linux. I did reinstall fontconfig but it did not fix it for me. Is “sudo pacman -S fontconfig” enough? Or should I remove it first and add it again? I’ll try rebooting…

Today I updated my packages and a new fontconfig package was available, but it did not help. Rebooting also did nothing :frowning:

hmm I am trying to remember what it was exactly that I did. Maybe reinstall libfreetype as well. But I feel like it had something to do with the fonconfig package…

Do you know which component is responsible for prepending “-l” to the library names? What causes it to use “fontconfig” instead of “-lfontconfig”?

Not sure but I guess the linking of those libraries is done via pkg-config. What is your output of:

pkg-config --libs fontconfig

This:

-lfontconfig -lfreetype

Odd… Looks like fontconfig is only defined here as a PKG LIB

https://github.com/openframeworks/openFrameworks/blob/488df8df661ae3b615916a9a0dd50df076781d78/libs/openFrameworksCompiled/project/qtcreator/modules/of/of.qbs#L111

And your output looks fine though…

Yeah, I noticed that .qbs file. I tried removing fontconfig, typing -lfontconfig, moving it to another section, deleting openframeworksCompiled and compiling it again, clean all… No luck. Very odd.

It also doesn’t help that I don’t know where to ask: developers of clang, qtcreator, oF, ArchLinux, fontconfig?

Or just wait and hope it solves itself. But it sucks, because I wanted to start a project with openFrameworks…

Thanks for helping me though :slight_smile:

I’ll leave here the full output in case it contains something useful to figure out why this happens:

12:32:36: Running steps for project ofBoxExample...
building openFrameworks library
compiling main.cpp
compiling ofApp.cpp
/usr/bin/make Debug
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
with PKG_CONFIG_LIBDIR=
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
with PKG_CONFIG_LIBDIR=
Creating library  /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a
ar -cr "/home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a" /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/communication/ofArduino.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/communication/ofSerial.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofTessellator.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofGraphics.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofPixels.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofTrueTypeFont.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofCairoRenderer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofPolyline.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofBitmapFont.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofRendererCollection.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/of3dGraphics.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofPath.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/graphics/ofImage.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/ofMesh.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/ofCamera.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/ofEasyCam.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/ofNode.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/3d/of3dUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/types/ofRectangle.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/types/ofColor.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/types/ofParameterGroup.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/types/ofBaseTypes.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/types/ofParameter.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofThread.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofXml.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofTimer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofLog.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofFpsCounter.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofMatrixStack.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofFileUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofSystemUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/utils/ofURLFileLoader.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/events/ofEvents.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppRunner.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppNoWindow.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppGlutWindow.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofAppGLFWWindow.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/app/ofMainLoop.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofLight.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofVboMesh.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofTexture.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofGLUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofVbo.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofMaterial.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofShader.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofBufferObject.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofGLRenderer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofGLProgrammableRenderer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofFbo.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofSoundBuffer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofSoundPlayer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofRtAudioSoundStream.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofBaseSoundStream.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofFmodSoundPlayer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofSoundStream.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/video/ofGstUtils.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/video/ofVideoGrabber.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/video/ofGstVideoGrabber.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/video/ofGstVideoPlayer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/video/ofVideoPlayer.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofMatrix4x4.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofMath.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofVec4f.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofMatrix3x3.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofVec2f.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/math/ofQuaternion.o
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123 
with PKG_CONFIG_LIBDIR=
Done!
linking ofBoxExample_debug
/usr/bin/clang++ -Wl,--unresolved-symbols=ignore-in-shared-libs '-Wl,-rpath,$ORIGIN' /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/fmodex/lib/linux64/libfmodex.so /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/glfw/lib/linux64/libglfw3.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/kiss/lib/linux64/libkiss.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/tess2/lib/linux64/libtess2.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoNetSSL.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoNet.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoCrypto.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoUtil.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoJSON.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoXML.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoFoundation.a -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lrtaudio -lboost_filesystem -lboost_system -o /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/bin/ofBoxExample_debug /home/myuser/src/openFrameworks/examples/3d/build-ofBoxExample-Desktop-Debug/qtc_Desktop_117cab14-debug/ofBoxExample.qtc-Desktop-117cab14.53458b6f/.obj/f27fede2220bcd32/main.cpp.o /home/myuser/src/openFrameworks/examples/3d/build-ofBoxExample-Desktop-Debug/qtc_Desktop_117cab14-debug/ofBoxExample.qtc-Desktop-117cab14.53458b6f/.obj/f27fede2220bcd32/ofApp.cpp.o /home/myuser/src/openFrameworks/libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/fmodex/lib/linux64/libfmodex.so /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/glfw/lib/linux64/libglfw3.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/kiss/lib/linux64/libkiss.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/tess2/lib/linux64/libtess2.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoNetSSL.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoNet.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoCrypto.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoUtil.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoJSON.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoXML.a /home/myuser/src/openFrameworks/examples/3d/ofBoxExample/../../../libs/poco/lib/linux64/libPocoFoundation.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev fontconfig -lfreetype -lsndfile -lopenal -lssl -lcrypto -lpulse-simple -lpulse -lasound -lGLEW -lGLU -lGL -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lrtaudio -lboost_filesystem -lboost_system
fontconfig: file not recognized: Is a directory
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
Process failed with exit code 1.
The following products could not be built for configuration qtc_Desktop_117cab14-debug:
    ofBoxExample
Error while building/deploying project ofBoxExample (kit: Desktop)
When executing step "Qbs Build"
12:32:39: Elapsed time: 00:03.

Solved.

Unfortunately I can’t explain how exactly. There was a fontconfig/ folder in my home folder. I had already tried removing that folder, but it did not help. Today I tried removing that folder again, and now it works.

I guess the linker first found that folder, before looking for a library with the same name. What I don’t understand is why didn’t it work last time I tried. It contained a bunch of font-cache files.

Well, I got my OF back :slight_smile:

1 Like