Re: [OE-core] Linker error while cross compiling, (Qt issue?)
On (22/02/12 16:53), Samuel Stirtzel wrote: Hi, although building libdbusmenu-qt [1] for kdelibs succeeds, linking the library will fail with undefined reference to DBusMenuExporter::~DBusMenuExporter and similar errors. The library is there and nothing in the configure / compile log of both recipes seems to state any sort misconfiguration for this case. For libdbusmenu-qt the settings were double checked, according to the configuration it should export the symbols, however for some very odd reasons it doesn't export any useful symbols at all. See http://pastebin.com/z9QfsCTc for the list of exported symbols (U=required symbols, T=provided symbols, for others see man nm). This error really puzzles me, usually I would assume that a library has no problems to export symbols. (Posted this to the core list as chances are good that it might be Qt related) It seems to only occur when cross compiling. Anyone has an idea if this is gcc ld / Qt related, or how to resolve it? Help would be appreciated. keep in mind when you use g++ in OE the default is to use hidden visibility like below meta/conf/distro/include/tclibc-eglibc.inc:CXXFLAGS += -fvisibility-inlines-hidden and my guess is thats whats causing this So you need to nullify that effect. ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
On Thu, Feb 23, 2012 at 05:27, Samuel Stirtzel s.stirt...@googlemail.com wrote: It is still odd that this only occurs while cross compiling. More odd seems that the same error happens to Soprano, it also uses Q_DECL_EXPORT [1]. http://developer.qt.nokia.com/doc/qt-4.8/sharedlibrary.html You need to play with Q_DECL_EXPORT / Q_DECL_IMPORT so most probably code is doing it wrong. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
2012/2/23 Otavio Salvador ota...@ossystems.com.br: On Thu, Feb 23, 2012 at 05:27, Samuel Stirtzel s.stirt...@googlemail.com wrote: It is still odd that this only occurs while cross compiling. More odd seems that the same error happens to Soprano, it also uses Q_DECL_EXPORT [1]. http://developer.qt.nokia.com/doc/qt-4.8/sharedlibrary.html You need to play with Q_DECL_EXPORT / Q_DECL_IMPORT so most probably code is doing it wrong. Coudln't it be possible that Qt (or something else) does it wrong? The same code without the workaround is working fine when compiling native.. IMHO I can't imagine how this would be no problem native (and on the meego cross compiling toolchains) but here on OE. -- Regards Samuel ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
On Wed, Feb 22, 2012 at 13:53, Samuel Stirtzel s.stirt...@googlemail.com wrote: This error really puzzles me, usually I would assume that a library has no problems to export symbols. It puzzles me as well; I have many applications and libraries linking against Qt without problem is my first advice is to check the build system of libdbusmenu-qt and check if it has any linking blackmagic or something like that. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
2012/2/22 Otavio Salvador ota...@ossystems.com.br: On Wed, Feb 22, 2012 at 13:53, Samuel Stirtzel s.stirt...@googlemail.com wrote: This error really puzzles me, usually I would assume that a library has no problems to export symbols. It puzzles me as well; I have many applications and libraries linking against Qt without problem is my first advice is to check the build system of libdbusmenu-qt and check if it has any linking blackmagic or something like that. It looks like the usual linking magic: http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/dbusmenu_export.h dbusmenu_qt_EXPORTS is defined at compile time and classes are exported e.g. class DBUSMENU_EXPORT DBusMenuExporter : public QObject. -- Regards Samuel ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
On Wed, Feb 22, 2012 at 14:06, Samuel Stirtzel s.stirt...@googlemail.com wrote: 2012/2/22 Otavio Salvador ota...@ossystems.com.br: On Wed, Feb 22, 2012 at 13:53, Samuel Stirtzel s.stirt...@googlemail.com wrote: This error really puzzles me, usually I would assume that a library has no problems to export symbols. It puzzles me as well; I have many applications and libraries linking against Qt without problem is my first advice is to check the build system of libdbusmenu-qt and check if it has any linking blackmagic or something like that. It looks like the usual linking magic: http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/dbusmenu_export.h dbusmenu_qt_EXPORTS is defined at compile time and classes are exported e.g. class DBUSMENU_EXPORT DBusMenuExporter : public QObject. http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/CMakeLists.txt#line7 This might be related. I didn't try but might be a failure in the way of the code is exporting it. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [OE-core] Linker error while cross compiling, (Qt issue?)
2012/2/22 Otavio Salvador ota...@ossystems.com.br: On Wed, Feb 22, 2012 at 14:06, Samuel Stirtzel s.stirt...@googlemail.com wrote: 2012/2/22 Otavio Salvador ota...@ossystems.com.br: On Wed, Feb 22, 2012 at 13:53, Samuel Stirtzel s.stirt...@googlemail.com wrote: This error really puzzles me, usually I would assume that a library has no problems to export symbols. It puzzles me as well; I have many applications and libraries linking against Qt without problem is my first advice is to check the build system of libdbusmenu-qt and check if it has any linking blackmagic or something like that. It looks like the usual linking magic: http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/dbusmenu_export.h dbusmenu_qt_EXPORTS is defined at compile time and classes are exported e.g. class DBUSMENU_EXPORT DBusMenuExporter : public QObject. http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/CMakeLists.txt#line7 This might be related. I didn't try but might be a failure in the way of the code is exporting it. Yes that helped me, I've seen the visibility=hidden before, but didn't thought about that the code _could_ export it wrong. So adding __attribute__((visibility(default))) to the dbusmenu_export.h solves this issue. It is still odd that this only occurs while cross compiling. More odd seems that the same error happens to Soprano, it also uses Q_DECL_EXPORT [1]. [1] http://quickgit.kde.org/index.php?p=soprano.gita=blob_plainh=7496feb29efea05cca47d919ce6060670634df32f=soprano%2Fsoprano_export.h -- Regards Samuel ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core