Unsolved error: undefined reference Qt 5.8 os/ Ubuntu 14.04.05
-
Hi all,
I am working on my first Qt project.
Specifically, I'm working with Qt 5.8 os on a host machine running Ubuntu 14.04.05.
I thought I managed to successfully configure Qt and make Qt, but reaching the make install stage I receive these error messages all do do with Gstreamer:
.obj/camerabinsession.o:camerabinsession.cpp:function valueRange(_GValue const*, bool*): error: undefined reference to '_gst_int_range_type'
.obj/camerabinsession.o:camerabinsession.cpp:function valueRange(_GValue const*, bool*): error: undefined reference to '_gst_value_list_type'
.obj/camerabinsession.o:camerabinsession.cpp:function CameraBinSession::supportedResolutions(QPair<int, int>, bool*, QFlagsQCamera::CaptureMode) const: error: undefined reference to '_gst_fraction_type'
.obj/camerabinsession.o:camerabinsession.cpp:function resolutionToCaps(QSize const&, double, QVideoFrame::PixelFormat): error: undefined reference to '_gst_fraction_type'
.obj/camerabinsession.o:camerabinsession.cpp:function readValue(_GValue const*, QList<QPair<int, int> >, bool): error: undefined reference to '_gst_fraction_type'
.obj/camerabinsession.o:camerabinsession.cpp:function readValue(_GValue const*, QList<QPair<int, int> >, bool): error: undefined reference to '_gst_fraction_range_type'
.obj/camerabinsession.o:camerabinsession.cpp:function readValue(_GValue const*, QList<QPair<int, int> >, bool): error: undefined reference to '_gst_value_list_type'
collect2: error: ld returned 1 exit status
make[5]: *** [../../../../plugins/mediaservice/libgstcamerabin.so] Error 1make[5]: Leaving directory
/home/norman/fus-1-build1/qtmultimedia/src/plugins/gstreamer/camerabin' make[4]: *** [sub-camerabin-install_subtargets] Error 2 make[4]: Leaving directory
/home/norman/fus-1-7-build1/qtmultimedia/src/plugins/gstreamer'
make[3]: *** [sub-gstreamer-install_subtargets] Error 2
make[3]: Leaving directory/home/norman/fus-1-7-build1/qtmultimedia/src/plugins' make[2]: *** [sub-plugins-install_subtargets] Error 2 make[2]: Leaving directory
/home/norman/fus-1-7-build1/qtmultimedia/src'
make[1]: *** [sub-src-install_subtargets] Error 2
make[1]: Leaving directory `/home/norman/fus-1-7-build1/qtmultimedia'
make: *** [module-qtmultimedia-install_subtargets] Error 2Could someone please advise what I should investigate to solve this problem. Having done some background research it appears this might be a problem with the linker and shared libraries, any thoughts?
-
Hi and welcome to devnet,
Are you missing the GStreamer library on your system ?
-
Hi SGaist,
Thanks for stopping by. Does it look like there are packages missing? Can you tell which ones?
I have the following Gstreamer packages installed:
- libpulse-dev
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- ubuntu-restricted-extras
- gst-ffmpeg-0.11.2
- gst-plugins-base-1.10.3
- gst-libav-1.10.3
- gst-plugins-bad-1.12.1
1-4 were installed before make, and 5-8 were installed after make (I thought I only needed 1-4.) I will now make uninstall, and do a fresh install to see if that helps. More news tomorrow morning...
-
Below is a full list of Gstreamer packages installed. I need GStreamer 1.0.
~$ dpkg -l | grep gstreamer
ii bluez-gstreamer 4.101-0ubuntu13.1 amd64 Bluetooth GStreamer supportii gir1.2-gstreamer-0.10 0.10.36-1.2ubuntu3 amd64 Description: GObject introspection data for the GStreamer library
ii gir1.2-gstreamer-1.0 1.2.4-0ubuntu1.1 amd64 Description: GObject introspection data for the GStreamer library
ii gstreamer-tools 0.10.36-1.2ubuntu3 amd64 Tools for use with GStreamer
ii gstreamer0.10-alsa:amd64 0.10.36-1.1ubuntu2.1 amd64 GStreamer plugin for ALSA
ii gstreamer0.10-fluendo-mp3:amd64 0.10.23.debian-3 amd64 Fluendo mp3 decoder GStreamer 0.10 plugin
ii gstreamer0.10-gconf:amd64 0.10.31-3+nmu1ubuntu5.3 amd64 GStreamer plugin for getting the sink/source information from GConf
ii gstreamer0.10-nice:amd64 0.1.4-1 amd64 ICE library (GStreamer 0.10 plugin)
ii gstreamer0.10-plugins-bad:amd64 0.10.23-7.2ubuntu1.3 amd64 GStreamer plugins from the "bad" set
ii gstreamer0.10-plugins-bad-multiverse 0.10.21-1ubuntu3 amd64 GStreamer plugins from the "bad" set (Multiverse Variant)
ii gstreamer0.10-plugins-base:amd64 0.10.36-1.1ubuntu2.1 amd64 GStreamer plugins from the "base" set
ii gstreamer0.10-plugins-base-apps 0.10.36-1.1ubuntu2.1 amd64 GStreamer helper programs from the "base" set
ii gstreamer0.10-plugins-good:amd64 0.10.31-3+nmu1ubuntu5.3 amd64 GStreamer plugins from the "good" set
rc gstreamer0.10-plugins-good:i386 0.10.31-3+nmu1ubuntu5.3 i386 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-good-dbg:amd64 0.10.31-3+nmu1ubuntu5.3 amd64 GStreamer plugins from the "good" set
ii gstreamer0.10-plugins-ugly:amd64 0.10.19-2ubuntu5 amd64 GStreamer plugins from the "ugly" set
ii gstreamer0.10-pulseaudio:amd64 0.10.31-3+nmu1ubuntu5.3 amd64 GStreamer plugin for PulseAudio
ii gstreamer0.10-tools 0.10.36-1.2ubuntu3 amd64 Tools for use with GStreamer
ii gstreamer0.10-x:amd64 0.10.36-1.1ubuntu2.1 amd64 GStreamer plugins for X11 and Pango
ii gstreamer1.0-alsa:amd64 1.2.4-1~ubuntu2.1 amd64 GStreamer plugin for ALSA
ii gstreamer1.0-clutter 2.0.8-1build1 amd64 Clutter PLugin for GStreamer 1.0
ii gstreamer1.0-fluendo-mp3:amd64 0.10.23.debian-3 amd64 Fluendo mp3 decoder GStreamer 1.0 plugin
ii gstreamer1.0-libav:amd64 1.2.4-1~ubuntu1 amd64 libav plugin for GStreamer
ii gstreamer1.0-nice:amd64 0.1.4-1 amd64 ICE library (GStreamer plugin)
ii gstreamer1.0-plugins-bad:amd64 1.2.4-1~ubuntu1.1 amd64 GStreamer plugins from the "bad" set
ii gstreamer1.0-plugins-bad-faad:amd64 1.2.4-1~ubuntu1.1 amd64 GStreamer faad plugin from the "bad" set
ii gstreamer1.0-plugins-bad-videoparsers:amd64 1.2.4-1~ubuntu1.1 amd64
GStreamer videoparsers plugin from the "bad" setii gstreamer1.0-plugins-base:amd64 1.2.4-1~ubuntu2.1 amd64 GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-base-apps 1.2.4-1~ubuntu2.1 amd64 GStreamer helper programs from the "base" set
ii gstreamer1.0-plugins-good:amd64 1.2.4-1~ubuntu1.4 amd64 GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:amd64 1.2.3-2build1 amd64 GStreamer plugins from the "ugly" set
ii gstreamer1.0-pulseaudio:amd64 1.2.4-1~ubuntu1.4 amd64 GStreamer plugin for PulseAudio
ii gstreamer1.0-tools 1.2.4-0ubuntu1.1 amd64 Tools for use with GStreamer
ii gstreamer1.0-x:amd64 1.2.4-1~ubuntu2.1 amd64 GStreamer plugins for X11 and Pango
ii libgstreamer-plugins-bad0.10-0:amd64 0.10.23-7.2ubuntu1.3 amd64 GStreamer shared libraries from the "bad" set
ii libgstreamer-plugins-bad1.0-0:amd64 1.2.4-1~ubuntu1.1 amd64 GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base0.10-0:amd64 0.10.36-1.1ubuntu2.1 amd64 GStreamer libraries from the "base" set
rc libgstreamer-plugins-base0.10-0:i386 0.10.36-1.1ubuntu2.1 i386
GStreamer libraries from the "base" set
ii libgstreamer-plugins-base0.10-dev 0.10.36-1.1ubuntu2.1 amd64GStreamer development files for libraries from the "base" set
ii libgstreamer-plugins-base1.0-0:amd64 1.2.4-1~ubuntu2.1 amd64GStreamer libraries from the "base" set
rc libgstreamer-plugins-base1.0-0:i386 1.2.4-1~ubuntu2.1 i386GStreamer libraries from the "base" set
ii libgstreamer-plugins-base1.0-dev 1.2.4-1~ubuntu2.1 amd64GStreamer development files for libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:amd64 1.2.4-1~ubuntu1.4 amd64GStreamer development files for libraries from the "good" set
ii libgstreamer0.10-0:amd64 0.10.36-1.2ubuntu3 amd64 CoreGStreamer libraries and elements
rc libgstreamer0.10-0:i386 0.10.36-1.2ubuntu3 i386 CoreGStreamer libraries and elements
ii libgstreamer0.10-0-dbg:amd64 0.10.36-1.2ubuntu3 amd64 CoreGStreamer libraries and elements
ii libgstreamer0.10-dev 0.10.36-1.2ubuntu3 amd64GStreamer core development files
ii libgstreamer1.0-0:amd64 1.2.4-0ubuntu1.1 amd64 CoreGStreamer libraries and elements
rc libgstreamer1.0-0:i386 1.2.4-0ubuntu1.1 i386 CoreGStreamer libraries and elements
ii libgstreamer1.0-dev 1.2.4-0ubuntu1.1 amd64 GStreamercore development files
ii libreoffice-avmedia-backend-gstreamer 1:4.2.8-0ubuntu5.1 amd64GStreamer backend for LibreOffice
ii phonon-backend-gstreamer-common:amd64 4:4.7.80-0ubuntu2~ubuntu14.04amd64 Phonon GStreamer 1.0.x backend icons
My configure summary:
Build type: x86_64
Configuration: use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 compile_examples enable_new_dtags largefile precompile_header shared rpath accessibility release c++11 concurrent dbus mremap reduce_exports reduce_relocations stl
Build options:
Mode ................................... release
Building shared libraries .............. yes
Using C++ standard ..................... C++11
Using gold linker ...................... yes
Using new DTAGS ........................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
AVX .................................. AVX AVX2
AVX512 ............................... <none>
Build parts ............................ libs tools
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... yes
Qt Gui ................................. yes
Qt Widgets ............................. yes
Support enabled for:
Accessibility .......................... yes
Using pkg-config ....................... yes
QML debugging .......................... yes
udev ................................... no
Using system zlib ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... yes
iconv .................................. no
ICU .................................... yes
Logging backends:
journald ............................. no
syslog ............................... no
Using system PCRE ...................... no
Qt Network:
getaddrinfo() .......................... yes
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
SCTP ................................... no
Use system proxies ..................... yes
Qt Sql:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Gui:
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... yes
PNG .................................. yes
Using system libpng ................ yes
OpenGL:
EGL .................................. no
Desktop OpenGL ....................... yes
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... no
mtdev .................................. no
tslib .................................. no
xkbcommon-evdev ........................ no
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
LinuxFB ................................ yes
Mir client ............................. no
X11:
Using system provided XCB libraries .. no
EGL on X11 ........................... no
Xinput2 .............................. yes
XCB XKB .............................. no
XLib ................................. yes
Xrender .............................. yes
XCB GLX .............................. yes
XCB Xlib ............................. yes
Using system-provided xkbcommon ...... no
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... yes
Qt SerialBus:
Socket CAN ............................. yes
Socket CAN FD .......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt QML:
QML interpreter ........................ yes
QML network support .................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Quick Designer ............. yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
System Assimp .......................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
Qt Multimedia:
ALSA ................................... yes
GStreamer 1.0 .......................... yes
GStreamer 0.10 ......................... no
Video for Linux ........................ yes
OpenAL ................................. no
PulseAudio ............................. yes
Resource Policy (libresourceqt5) ....... no
DirectShow ............................. no
Windows Media Foundation ............... no
Qt Location:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Sensors:
sensorfw ............................... no
Qt WebEngine:
Proprietary Codecs ..................... no
Spellchecker ........................... yes
ALSA ................................... yes
PulseAudio ............................. yesNote: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.
Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.
Platform notes:
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /qt-5-8-installAny thoughts?
-
You seem to have everything needed installed.
And so it only happens when you call "make install" after calling ",make" ?
-
Yes, it only happens when i call "make install" having called "make".
I have reconfigured the installation and done this several times now and end up with the same error.
-
Can you show the configure line you are using ?
-
../qt-everywhere-opensource-src-5.8.0/configure -nomake tests -nomake examples -opengl desktop -prefix /qt-5-8-install
-
Can you check with a more recent version of Qt ?
-
@roygbiv So this usually happens when you compile with a newer set of gstreamer headers > 1.4 and then link to an older gstreamer 1.0 library.
It sounds to me like you have multiple gstreamer installs and Qt is attempting to use both.
What does
find / -iname "gst.h"
give you? Alsofind / -iname "libgstream*"
? -
Hi @ambershark
Thanks for dropping by.
I think you're onto something. How do I figure out what i don't need and uninstall it without disturbing existing dependencies? I need Gstreamer 1.0.
find / -iname "gst.h" returned:
find: ‘iname’: No such file or directory
find: ‘gst.h’: No such file or directoryfind / -iname "libgstream*" returned:
find: ‘iname’: No such file or directory
find: ‘libgstream*’: No such file or directoryDoes this help :
$ find / -name 'libgstreamer-1.0.so*' 2>/dev/null
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.204.0
/usr/local/lib/libgstreamer-1.0.so
/usr/local/lib/libgstreamer-1.0.so.0.404.0
/usr/local/lib/libgstreamer-1.0.so.0
/home/norman/.local/share/Trash/files/flash_package/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/.local/share/Trash/files/flash_package/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/.local/share/Trash/files/flash_package.2/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/.local/share/Trash/files/flash_package.2/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/.local/share/Trash/files/l4t_19.3/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/.local/share/Trash/files/l4t_19.3/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.203.0
/home/norman/.local/share/Trash/files/flash_package (2)/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/.local/share/Trash/files/flash_package (2)/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/lt4/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/lt4/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/lt4/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/lt4/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/fus-1-7-build-econ/pre-built-binary/flash_package/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/fus-1-7-build-econ/pre-built-binary/flash_package/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.204.0
/home/norman/l4t_19.3/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0
/home/norman/l4t_19.3/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libgstreamer-1.0.so.0.203.0 -
@roygbiv Yea that helps... you have 6 different gstreamers installed, lol. The chance you are linking to multiples just went up by quite a bit. ;)
As for the -iname, it didn't seem to take that as a parameter to find. Which is weird since that has been in find since like ... forever. It's almost like you did
find iname "gstreamer*"
and missed the-iname
based on the output you got. -iname is the same as -name except that it ignores case. I almost never use -name because of case issues in linux. :)Now if I had to guess I'm betting the culprits are the /usr/lib/x86_64 one and the /usr/local/lib one. They are different versions and a lot of people add /usr/local/lib to their LD_LIBRARY_PATH or ld.so.conf.