<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi,<br><br>I am reviving this thread as things have moved a bit since the last post.<br><br>To resume the issue at hand : I was happily developing with Qt and GStreamer SDK.<br>Then I upgraded to a more recent version of the GStreamer SDK and started hitting a link issue (on Windows...).<br>With the help of the community I came to understand that the issue was caused by a MinGW toolchain incompatibility concerning exceptions.<br>- the upgraded GStreamer SDK was compiled with SJLJ exceptions (prior version was using DWARF)<br>- Qt was compiled with DWARF exceptions<br>- It is not possible to mix the two models in the same compilation unit.<br><br>At the time my hopes to solve this issue were boosted when I was pointed to a new release of Qt (5.0.1) that was compiled with SJLJ exceptions.<br><br>Since then, the open
 source project I contribute to has switched to Qt 5.1.0, so I revisited the link issue.<br>But, unfortunately, that version of Qt switched back to DWARF...<br>The trigger for the switch was performance issues with SJLJ.<br><br>The switch was announced and motivated here : http://lists.qt-project.org/pipermail/development/2013-April/010667.html<br>Additionaly, this page compares the exception models and arguments the choice made by Qt : http://qt-project.org/wiki/MinGW-64-bit<br><br>Here is the failing link command:<br><br>g++ -shared -mthreads -Wl,--out-implib,D:/Projects/OP5/build/openpilotgcs_debug/lib/openpilotgcs/libGST_libd.a -o ../../../lib/openpilotgcs/GST_libd.dll<br>debug/gst_global.o debug/videowidget.o debug/moc_videowidget.o<br>-lglu32 -lopengl32 -lgdi32 -luser32<br>-LD:/Projects/OP5/build/openpilotgcs_debug/lib/openpilotgcs -Ld:/gstreamer/1.0/x86/lib -lgobject-2.0 -lglib-2.0
 -lgstreamer-1.0<br>-Ld:/Projects/OpenPilotTools/qt-5.1.0/5.1.0/mingw48_32/lib -lQt5Testd -lQt5Guid -lQt5Cored<br><br>debug/gst_global.o:gst_global.cpp:(.eh_frame$_ZN6QDebug6StreamD1Ev+0x13): undefined reference to `__gxx_personality_v0'<br>debug/gst_global.o:gst_global.cpp:(.eh_frame$_ZN6QDebugD1Ev+0x13): undefined reference to `__gxx_personality_v0'<br>debug/gst_global.o:gst_global.cpp:(.eh_frame$_ZN6QDebuglsEPKc+0x13): undefined reference to `__gxx_personality_v0'<br>debug/gst_global.o:gst_global.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'<br>debug/gst_global.o:gst_global.cpp:(.eh_frame$_ZN5QListI7QStringE6appendERKS0_+0x13): undefined reference to `__gxx_personality_v0'<br>debug/gst_global.o:gst_global.cpp:(.eh_frame$_ZN5QListI7QStringE9node_copyEPNS1_4NodeES3_S3_+0x13): more undefined references to `__gxx_personality_v0' follow<br>debug/videowidget.o: In function
 `ZN11VideoWidgetC2EP7QWidget':<br>d:\Projects\OP5\build\openpilotgcs_debug\src\libs\gst_lib/../../../../../ground/openpilotgcs/src/libs/gst_lib/videowidget.cpp:72: undefined reference to `_imp___ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE'<br><snip><br><br>I don't understand that, while compiling with the Qt toolchain, the errors seem to target Qt code and not GStreamer code.<br>I also don't understand why I get these errors since I am only using "gst_ pure C" methods (mixed with Qt methods obviously...).<br>Are the the GStreamer libraries "shadowing" something?<br><br>I tried to use more recent versions of the GStreamer SDK from www.gstreamer.com and also with the SDKs recently made available on www.gstreamer.org to no avail.<br><br>A solution would be to recompile Qt or GStreamer with the appropriate toolchain.<br>Unfortunately, the open source project I contribute to does not have the man power or hardware resources to maintain a custom build of
 such big SDKs.<br><br>My hope is that there is possible workaround.<br>Or, and I know that this is a long shot, that alternative GStreamer SDK build for Windows would be made available.<br>This would allow developpers to choose the Windows SDK that works for them.<br><br>Regards,<br>Philippe.<br><br><br>For reference this is the g++ that comes with Qt 5.1.0:<br><br>$ /d/Projects/OpenPilotTools/qt-5.1.0/Tools/mingw48_32/bin/g++ -v<br>Using built-in specs.<br>COLLECT_GCC=d:\Projects\OpenPilotTools\qt-5.1.0\Tools\mingw48_32\bin\g++.exe<br>COLLECT_LTO_WRAPPER=d:/projects/openpilottools/qt-5.1.0/tools/mingw48_32/bin/../libexec/gcc/i686-w64-mingw32/4.8.0/lto-w<br>rapper.exe<br>Target: i686-w64-mingw32<br>Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-min<br>gw32 --prefix=/mingw32 --with-sysroot=/temp/x32-480-posix-dwarf-r2/mingw32 --enable-shared --enable-static --disable-mul<br>tilib
 --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-<br>lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --d<br>isable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch -<br>-disable-libstdcxx-debug --disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --d<br>isable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-host-libstdcxx='-static -lstdc++'<br> --with-libiconv --with-system-zlib --with-gmp=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq<br>/i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static --with-isl=/temp/mingw-prereq/i686-w64-mi<br>ngw32-static --with-cloog=/temp/mingw-prereq/i686-w64-mingw32-static --enable-cloog-backend=isl
 --with-pkgversion='rev2,<br> Built by MinGW-builds project' --with-bugurl=http://sourceforge.net/projects/mingwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32<br>-480-posix-dwarf-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/incl<br>ude' CXXFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include -I/temp/mingw<br>-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw-<br>prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32-480-posix-dwarf-r2/mingw32/opt/lib'<br>Thread model: posix<br>gcc version 4.8.0 (rev2, Built by MinGW-builds project)</span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div
 style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">De :</span></b> Andoni Morales <ylatuya@gmail.com><br> <b><span style="font-weight: bold;">À :</span></b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org> <br><b><span style="font-weight: bold;">Cc :</span></b> philippe renon <philippe_renon@yahoo.fr> <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi 6 février 2013 15h07<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: GStreamer SDK - link error since upgrading to latest version (2012.11Brahmaputra)<br> </font> </div> <div class="y_msg_container"><br>2013/2/5 Alexey Chernov <<a ymailto="mailto:4ernov@gmail.com" href="mailto:4ernov@gmail.com">4ernov@gmail.com</a>>:<br>> В письме от 05 фев 2013
 18:46:15 пользователь Andoni Morales написал:<br>>> 2013/2/5 Andoni Morales <<a ymailto="mailto:ylatuya@gmail.com" href="mailto:ylatuya@gmail.com">ylatuya@gmail.com</a>>:<br>>> > 2013/2/4 philippe renon <<a ymailto="mailto:philippe_renon@yahoo.fr" href="mailto:philippe_renon@yahoo.fr">philippe_renon@yahoo.fr</a>>:<br>>> >> Hi Kyrylo,<br>>> >><br>>> >> Thanks for helping.<br>>> >><br>>> >> I don't yet have the answer to which C++ runtimes are used.<br>>> >><br>>> >> But I can provide the details about the project's g++ :<br>>> >><br>>> >> $ which g++<br>>> >> /d/OPENPI~2/QtSDK/mingw/bin/g++<br>>> >><br>>> >> $ g++ -v<br>>> >> Using built-in specs.<br>>> >> Target: mingw32<br>>> >> Configured with: ../gcc-4.4.0/configure<br>>>
 >> --enable-languages=c,ada,c++,fortran,java,objc,obj-c++<br>>> >> --disable-sjlj-exceptions<br>>> >><br>>> >>  --enable-shared --enable-libgcj --enable-libgomp --with-dwarf2<br>>> >><br>>> >> --disable-win32-registry --enable-libstdcxx-debug --enab<br>>> >> le-version-specific-runtime-libs --prefix=/mingw<br>>> >> --with-gmp=/mingw/src/gmp/root --with-mpfr=/mingw/src/mpfr/root --build<br>>> >> =mingw32<br>>> >> Thread model: win32<br>>> >> gcc version 4.4.0 (GCC)<br>>> >><br>>> >> At this point, I would like to know if the only solution is too make sure<br>>> >> both projects are using the same toolchain.<br>>> >> I hope not as this is a bit out of my league.<br>>> >> Would it possible to "tweak" the project's toolchain or build process to<br>>> >>
 become compatible with the SDK?<br>>> >> If not, are there other alternatives? Is it in the SDK roadmap to support<br>>> >> alternate toolchains ?<br>>><br>>> I am not familiar with QT's SDK, but from the download area notes I<br>>> see that they provide a toolchain that's built using the sljl<br>>> exception handling model:<br>>> "The MinGW binary package includes a 32 bit MinGW-builds (gcc 4.7.2,<br>>> sjlj exception handing, posix threading) toolchain."<br>>><br>>> So you should use this toolchain  instead of MinGW default's one.<br>><br>>> This is an issue with the different exception handling used in GCC.<br>>> Our toolchain uses the old sljj exceptions while the one you are using<br>>> uses dwarf. But this shouldn't be an issue unless you are mixing c++<br>>> libraries.  Are you using QtGStreamer? How are you building it?<br>>> Can
 you please describe the steps to reproduce the issue such as which<br>>> project should we checkout and which branch, configure options, etc...<br>><br>> Yes, we have discussed this issue some time ago.<br>><br>> Andoni is right, there's a problem with exception handling. Another problem is<br>> that at least as of 2012.11 version, some GStreamer dependency requires _any_<br>> GStreamer-based program (I experimented on 'hello world' example) be linked<br>> with libstdc++6, which in turn leads to conflict in exception handling method.<br>> Even if you workaround this link error, you'll have a good chance to get an<br>> exception right after the program start in some strange place like strcpy()<br>> call.<br><br>This should be fixed ASAP as we shouldn't be pulling this dependency<br>at all to link against GStreamer.<br><br>Andoni<br><br><br>><br>> What's more, as I've read in several places during my experiments,
 there're<br>> some binary incompartibility in gcc-4.7.2 and previous versions, so I actually<br>> haven't managed to get it work 2012.11 SDK 32-bit and Qt4 build with MinGW<br>> 4.7.2.<br>><br>> What solved the problem for me is using MinGW package downloaded by cerbero<br>> during GStreamer SDK build process. I built Qt-4.8.4 with it and then built my<br>> application against GStreamer SDK 2012.11 and this custom Qt build. Everything<br>> worked fine after that.<br>><br>> Also, David Hoyt suggested me to use OSSBuild package which also seems to help<br>> but I still haven't tried it but it can fix the problem, too, I think.<br>><br>> Alexey Chernov<br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> <a ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>> <a
 href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br><br><br>-- <br>Andoni Morales Alastruey<br><br>LongoMatch:The Digital Coach<br><a href="http://www.longomatch.ylatuya.es/" target="_blank">http://www.longomatch.ylatuya.es</a><br><br></div> </div> </div> </blockquote></div>   </div></body></html>