mitsuba
mitsuba copied to clipboard
Package QtWidgets was not found in the pkg-config search path.
Hello.
I follow the documentation for compiling. Just didn't do the Collada thing. http://mitsuba-renderer.org/docs.html.
Instead of installing libpng12-dev
I installed libpng-dev
, and instead of libpcrecpp0
I installed libpcrecpp0v5
. I haven't modified my local repo.
After running scons
,here's the error message I have :
scons: Reading SConscript files ...
Using configuation file "/home/lam/work/ext/mitsuba/config.py"
Checking for Qt 5.x... yes
Checking for g++ ...yes
Checking for C header file png.h... yes
Checking for C header file jpeglib.h... yes
Checking for C++ header file ImfRgba.h... yes
Checking for C++ header file xercesc/dom/DOMLSParser.hpp... yes
Checking for C++ header file dae.h... no
COLLADA DOM is missing: not building the COLLADA importer
Checking for C++ header file pyconfig.h... yes
Checking for C++ header file pyconfig.h... yes
Checking for C++ header file boost/version.hpp... yes
Checking for C++ header file Eigen/Core... yes
Checking for C++ header file fftw3.h... yes
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for C header file GL/glext.h... yes
Checking for C header file GL/glew.h... yes
Checking for C type GLEWContext... yes
Checking for C header file X11/extensions/xf86vmode.h... yes
Checking for Mitsuba version .. 0.6.0
Package QtWidgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtWidgets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtWidgets' found
OSError: 'pkg-config QtGui QtWidgets QtCore QtOpenGL QtXml QtXmlPatterns QtNetwork --libs --cflags' exited 1:
File "/home/lam/work/ext/mitsuba/SConstruct", line 54:
build('src/mtsgui/SConscript', ['mainEnv', 'converter_objects'], duplicate=True)
File "/home/lam/work/ext/mitsuba/SConstruct", line 29:
variant_dir=os.path.join(env['BUILDDIR'], dirname), duplicate=duplicate)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 614:
return method(*args, **kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/lib/scons/SCons/Script/SConscript.py", line 256:
call_stack[-1].globals)
File "/home/lam/work/ext/mitsuba/build/release/mtsgui/SConscript", line 28:
qtEnv.EnableQt5Modules(['QtGui', 'QtWidgets', 'QtCore', 'QtOpenGL', 'QtXml', 'QtXmlPatterns', 'QtNetwork'])
File "/usr/lib/scons/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/home/lam/work/ext/mitsuba/data/scons/qt5.py", line 449:
self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
File "/usr/lib/scons/SCons/Environment.py", line 1557:
return function(self, self.backtick(command))
File "/usr/lib/scons/SCons/Environment.py", line 594:
raise OSError("'%s' exited %d" % (command, status))
It seems issue #32 is similar, but has apparently been fixed by #38.
From another project, I know that QtWidgets is located here : /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
so I added this line to my .bashrc : export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
But the error persists. I'm not quite sure what else to do. I have had many problems with Qt before... Any help would be appreciated!
Since qt changed their naming to include the version, one fix is to cd into your pkgconfig directory (maybe /usr/lib/x86_64-linux-gnu/pkgconfig) make sure the file Qt5Widgets is there, then run: sudo ln -s ./Qt5Widgets.pc ./QtWidgets.pc
This issue happened to me as well, and I followed @adnphllps instructions, since it didn't work for any Qt related file before.
Thing I did was: find pkg-config using find / -type d -name "pkgconfig" 2>/dev/null
, and looked for the most relevant path with Qt inside and then I entered in my case cd /usr/lib/x86_64-linux-gnu/pkgconfig
. From there I listed using ls Qt*
and got:
Qt5Concurrent.pc Qt5Core.pc Qt5DBus.pc Qt5Gui.pc Qt5Network.pc Qt5OpenGLExtensions.pc Qt5OpenGL.pc Qt5PrintSupport.pc Qt5Sql.pc Qt5Test.pc Qt5Widgets.pc Qt5XmlPatterns.pc Qt5Xml.pc
As you can see, everything now is named as Qt<version_number><file_name> (i.e. Qt5Core) instead of Qt<file_name> (i.e. QtCore) as scons is expecting it.
In order to overcome this problem I used symbolic link in the same way as @adnphllps did:
sudo ln -s ./Qt5Core.pc ./QtCore.pc
for every single file_name there, and finally resolved my issue.
@dsvilarkovic Your approach worked well for me thanks.