|
From: | Christian Frisson |
Subject: | Re: [Mingw-cross-env-list] [PATCH] Openscenegraph updated again. (Tony Theodore) |
Date: | Thu, 25 Apr 2013 02:03:54 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
Re-; address@hidden, 24/04/13 18:00:
------------------------------ Message: 7 Date: Wed, 24 Apr 2013 14:57:12 +1000 From: Tony Theodore <address@hidden> To: Christian Frisson <address@hidden> Cc: address@hidden Subject: Re: [Mingw-cross-env-list] [PATCH] Openscenegraph updated again. Message-ID: <address@hidden> Content-Type: text/plain; charset=iso-8859-1 On 23/04/2013, at 2:16 AM, Christian Frisson <address@hidden> wrote:Dear Niels and Tony and all, Last week, I made a CMake patch for OpenSceneGraph that generates openscenegraph-osgPlugin-*.pc files for each plugin, plus an openscenegraph-osgPlugin-all.pc for all, accompanied with osgPlugin/* headers that containt the right USE_OSGPLUGIN(*) call. Note that it can't always be guessed from the plugin dir name, for instance src/osgPlugins/svg/ReaderWriterSVG.cpp states REGISTER_OSGPLUGIN(SVG, ReaderWriterSVG), thus requiring USE_OSGPLUGIN(SVG) not (svg) in your statically-linked app. My patch thus parses all factories to check that. Plus a shell script to compile each/all.Sounds great! This is has been an issue for a long time and a fix would be very welcome. Is it something that could also be submitted upstream?I would like to do a proper git pull request for that, but to do so I'd require that OpenSceneGraph won't get updated so fast. Would it be possible? Why not just stick to developper releases by the way. I've been using osg for 4 years now, I usually prefered to fork any new/updated plugins instead of recompiling the whole.I've switched to the developer release: https://github.com/mxe/mxe/commit/12b1744b63d18a92eff3858a1ac45e055147e032 The main reason to follow the trunk was to prepare for the stable release (in the hope that it would fix these issues). Cheers, Tony
Here's a first attempt, not yet ready for pull requesting: <https://github.com/ChristianFrisson/mxe/commit/821ab189cacd3f62d8444c7978bd286ba34106d3>By "attempt" I mean that the generation of pkg-config files per osg plugins works flawlessly, but, if, at the end of the openscenegraph installation, we test if all plugins link correctly from the .mk file, there are high odds the package installation will fail.
For instance, here's the end of the log, with today's mxe master recompiled, and my soon-to-be pull request linked above:
-- Installing: .../mxe/usr/i686-pc-mingw32/lib/libosgQt.a -- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/Export -- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/GraphicsWindowQt -- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/QFontImplementation-- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/QGraphicsViewAdapter
-- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/QWidgetImage -- Up-to-date: .../mxe/usr/i686-pc-mingw32/include/osgQt/QWebViewImage # Test that all plugins link'i686-pc-mingw32-g++' -W -Wall './src/openscenegraph-test.cpp' -o '.../mxe/usr/i686-pc-mingw32/bin/test-openscenegraph.exe' `i686-pc-mingw32-pkg-config --cflags openscenegraph-osgPlugin-all` `i686-pc-mingw32-pkg-config --libs openscenegraph-osgPlugin-all` -lglu32 -lopengl32 .../mxe/usr/i686-pc-mingw32/lib/libpoppler-glib.a(CairoOutputDev.o): In function `ZN10CairoImageD2Ev': .../mxe/tmp-poppler/poppler-0.22.3/poppler/CairoOutputDev.cc:100: multiple definition of `CairoImage::~CairoImage()' .../mxe/usr/i686-pc-mingw32/lib/osgPlugins-3.1.5/libosgdb_pdf.a(ReaderWriterPDF.cpp.obj):ReaderWriterPDF.cpp:(.text$_ZN10CairoImageD1Ev[__ZN10CairoImageD1Ev]+0x0): first defined here .../mxe/usr/i686-pc-mingw32/lib/libglib-2.0.a(gutf8.o):gutf8.c:(.rdata+0x198): multiple definition of `g_utf8_skip' .../mxe/usr/i686-pc-mingw32/lib/libidn.a(nfkc.o):nfkc.c:(.rdata+0x14900): first defined here .../mxe/usr/i686-pc-mingw32/lib/osgPlugins-3.1.5/libosgdb_zip.a(unzip.cpp.obj):unzip.cpp:(.rdata+0x1e40): multiple definition of `inflate_copyright' .../mxe/usr/i686-pc-mingw32/lib/libz.a(inftrees.o):inftrees.c:(.rdata+0x100): first defined here .../mxe/usr/i686-pc-mingw32/lib/libpoppler.a(GfxState.o): In function `ZN13GfxColorSpace18setupColorProfilesEv': .../mxe/tmp-poppler/poppler-0.22.3/poppler/GfxState.cc:398: undefined reference to `cmsSetLogErrorHandler' .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o):qfilesystemengine_win.cpp:(.text+0x46): undefined reference to address@hidden' .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o):qfilesystemengine_win.cpp:(.text+0x74): undefined reference to `IID_IPersistFile' .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o):qfilesystemengine_win.cpp:(.text+0x141): undefined reference to address@hidden' .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o):qfilesystemengine_win.cpp:(.text+0x1af): undefined reference to address@hidden' .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o):qfilesystemengine_win.cpp:(.text+0x1da): undefined reference to address@hidden' .../mxe/usr/bin/../lib/gcc/i686-pc-mingw32/4.8.0/../../../../i686-pc-mingw32/bin/ld: .../mxe/usr/i686-pc-mingw32/qt/lib//libQtCore.a(qfilesystemengine_win.o): bad reloc address 0x27 in section `.text$_ZN15QVarLengthArrayIwLi64EE7reallocEii[__ZN15QVarLengthArrayIwLi64EE7reallocEii]'
collect2: error: ld returned 1 exit status make[1]: *** [build-only-openscenegraph] Error 1Here osgdb_pdf (poppler) requires lcms and osgdb_qtfont (QtCore) ole32 and uuid, but what about the "multiple definitions" errors?
Note that I had to disable gdal temporarily as dependency of osg because hdf4 and netcdf wouldn't build out of the (OSX 10.8) box.
So should I remove the linking test from the build, since not everybody is interested in all osg plugins (for instance in my case, not gdal :) ? But people are better be warned before building their project, at the end of the osg installation, if something won't link.
Best, Christian
[Prev in Thread] | Current Thread | [Next in Thread] |