[opensuse-packaging] undefined reference to wxXmlNode::GetNodeContent() const

I am trying to package a program called maitreya using obs. https://build.opensuse.org/package/show?package=rpm&project=home%3Apelli... for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o The program builds correctly for fedora, as well as debian and ubuntu 10.10. Can anyone tell if this problem is caused by opensuse's distro or the upstream source? Is there perhaps an undocumented dependancy I need to add? The Program uses wxWidgets-devel. Could the readme refering to %wx_requires be the cause of this problem? -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

2011/2/22 Paul Elliott <pelliott@blackpatchpanel.com>:
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
When compiling you will never get "undefined reference" errors. It's a linking error. In this case the problem is the "-o maitreya_textclient" line. Specifically with YogaConfig.o, contained in libjyotish.a, and XmlWorker.o, contained in libmaitreya_base.a. Read: http://en.opensuse.org/openSUSE:Packaging_Perl#Linking_fails_with:_undefined... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

* Paul Elliott (pelliott@blackpatchpanel.com) [20110222 06:56]:
I am trying to package a program called maitreya using obs. https://build.opensuse.org/package/show?package=rpm&project=home%3Apelli...
So it's home:pelliot11/maitreya.
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
Looks like you're linking to the wrong wxWiwidgets library. wxWidgets offers various possibilities to configure the library and allthough these options change the ABI the external and internal names of the libraries stays the same. See http://lists.opensuse.org/opensuse-factory/2011-01/msg00213.html for the mail where the changes were announced along with the things you as a packager should do.
Can anyone tell if this problem is caused by opensuse's distro or the upstream source?
Yes and yes :) The problem is with the library ansd also seems to be with the maitreya code that only compiles with one flavour of the library. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

* Philipp Thomas (pth@suse.de) [20110222 12:41]:
So it's home:pelliott11/maitreya.
Looks like you're linking to the wrong wxWiwidgets library. wxWidgets offers various possibilities to configure the library and allthough these options change the ABI the external and internal names of the libraries stays the same.
And a look in the spec of home:arcticblaze/maitreya confirms it. It needs wxwidgets-wxcontainer-devel. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Paul Elliott wrote:
I am trying to package a program called maitreya using obs. https://build.opensuse.org/package/show?package=rpm&project=home%3Apelli...
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
It's strange, this symbol should be available in all instances of libwx_base*_xml*. I see it in the header, in the source code, in the shared library, in the linker command line, but for some reason it fails. I guess I need to ask an C++ expert.
The program builds correctly for fedora, as well as debian and ubuntu 10.10.
Can anyone tell if this problem is caused by opensuse's distro or the upstream source? Is there perhaps an undocumented dependancy I need to add? The Program uses wxWidgets-devel.
Could the readme refering to %wx_requires be the cause of this problem?
Linking against incompatible instance of wxWidgets causes type clash (e. g. declared as char*, expected wxString) or runtime crash. Missing %wx_requires in the spec may cause runtime linking problems. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +49 911 7405384547 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

* Stanislav Brabec (sbrabec@suse.cz) [20110222 16:33]:
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
It's strange, this symbol should be available in all instances of libwx_base*_xml*. I see it in the header, in the source code, in the shared library, in the linker command line, but for some reason it fails.
His problem must have been that we should have BuildRequired wxwidgets-wxcontainer-devel instead of wxwidgets-devel. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Philipp Thomas wrote:
- Stanislav Brabec (sbrabec@suse.cz) [20110222 16:33]:
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
It's strange, this symbol should be available in all instances of libwx_base*_xml*. I see it in the header, in the source code, in the shared library, in the linker command line, but for some reason it fails.
His problem must have been that we should have BuildRequired wxwidgets-wxcontainer-devel instead of wxwidgets-devel.
We should have wxWidgets-devel. Packages that are not ready for STL-enabled wxWidgets have to use wxWidgets-wxcontainer-devel. And packages that are not ready for Unicode strings have to use wxWidgets-ansi-devel. The package in question does not compile with any of them. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +49 911 7405384547 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

2011/2/22 Stanislav Brabec <sbrabec@suse.cz>:
Philipp Thomas wrote:
- Stanislav Brabec (sbrabec@suse.cz) [20110222 16:33]:
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
It's strange, this symbol should be available in all instances of libwx_base*_xml*. I see it in the header, in the source code, in the shared library, in the linker command line, but for some reason it fails.
His problem must have been that we should have BuildRequired wxwidgets-wxcontainer-devel instead of wxwidgets-devel.
We should have wxWidgets-devel. Packages that are not ready for STL-enabled wxWidgets have to use wxWidgets-wxcontainer-devel. And packages that are not ready for Unicode strings have to use wxWidgets-ansi-devel.
The package in question does not compile with any of them.
I'm feeling ignored :-( I suppose you are not subscribed to opensuse-packaging? This time I send this to everybody. The difference that makes the package from home:arcticblaze build and the one from home:pelliott11:maitreya fail is that the former has an "export SUSE_ASNEEDED=0" line in the %build section. The command that fails is g++ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables /usr/lib64/libfontconfig.so -o maitreya_textclient textclient.o -L/usr/lib64/wx-2.8-stl -pthread -Wl,-rpath,/usr/lib64/wx-2.8-stl -L/usr/lib64 -Wl,-rpath,/usr/lib64/wx-2.8-stl -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 libjyotish.a ../base/libmaitreya_base.a ../swe/libswe.a and fails because it should be g++ -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables /usr/lib64/libfontconfig.so -o maitreya_textclient textclient.o libjyotish.a ../base/libmaitreya_base.a ../swe/libswe.a -L/usr/lib64/wx-2.8-stl -pthread -Wl,-rpath,/usr/lib64/wx-2.8-stl -L/usr/lib64 -Wl,-rpath,/usr/lib64/wx-2.8-stl -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 libjyotish.a and libmaitreya_base.a contain code that used wxWidgets and the "-lwx*" entries are before them, when should be after. Not the best place but, again, it's explained at http://en.opensuse.org/openSUSE:Packaging_Perl#Linking_fails_with:_undefined... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

* Philipp Thomas (pth@suse.de) [20110222 17:22]:
His problem must have been that we should have BuildRequired ^^ s/we/he/ wxwidgets-wxcontainer-devel instead of wxwidgets-devel.
Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Thanks to all who helped me. For suse systems, export SUSE_ASNEEDED=0 was the solution as well as using using wxWidgets-wxcontainer-devel for opensuse 11.4 and above. However what is the solution for mandrivia distros? I presume export SUSE_ASNEEDED=0 won't work there. Perhaps I should patch the source to change the order of libraries linked against. However the libraries seem to be comming from 'wxconfig' and there seems to be no easy place to change the order! Any suggestions? On Monday, February 21, 2011 11:55:25 pm Paul Elliott wrote:
I am trying to package a program called maitreya using obs. https://build.opensuse.org/package/show?package=rpm&project=home%3Apelli... 11%3Amaitreya
for opensuse and mandrivia I am getting an undefined reference to wxXmlNode::GetNodeContent() const when compiling textclient.o
The program builds correctly for fedora, as well as debian and ubuntu 10.10.
Can anyone tell if this problem is caused by opensuse's distro or the upstream source? Is there perhaps an undocumented dependancy I need to add? The Program uses wxWidgets-devel.
Could the readme refering to %wx_requires be the cause of this problem?
-- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

On Tuesday, February 22, 2011 09:14:22 pm Paul Elliott wrote:
Thanks to all who helped me.
For suse systems, export SUSE_ASNEEDED=0
was the solution as well as using using wxWidgets-wxcontainer-devel for opensuse 11.4 and above.
However what is the solution for mandrivia distros? I presume export SUSE_ASNEEDED=0 won't work there.
Perhaps I should patch the source to change the order of libraries linked against. However the libraries seem to be comming from 'wxconfig' and there seems to be no easy place to change the order!
Any suggestions?
How about this? in the place in ./configure where it says: WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` make it say: WX_LIBS=WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` `$WX_CONFIG_WITH_ARGS --libs` that is make the list occur twice. That way if the reference is added by the first pass thru the list, it will be picked up in the second. That way I don't have to do any complicated list reordering! This idea is too simple minded to work, there has got to be something wrong with it! But what? I could even make the list repeat 3 times if needed! This is a kludge! Any ideas would help. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

On Wed, Feb 23, 2011 at 1:36 AM, Paul Elliott <pelliott@blackpatchpanel.com> wrote:
On Tuesday, February 22, 2011 09:14:22 pm Paul Elliott wrote:
Thanks to all who helped me.
For suse systems, export SUSE_ASNEEDED=0
was the solution as well as using using wxWidgets-wxcontainer-devel for opensuse 11.4 and above.
However what is the solution for mandrivia distros? I presume export SUSE_ASNEEDED=0 won't work there.
Perhaps I should patch the source to change the order of libraries linked against. However the libraries seem to be comming from 'wxconfig' and there seems to be no easy place to change the order!
Any suggestions?
Yeah, does this package provide pkgconfig scripts ? replace all calls of foobar-config scripts with pkgconfig and ensure the linking order is correct. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

* Paul Elliott (pelliott@blackpatchpanel.com) [20110223 05:41]:
Perhaps I should patch the source to change the order of libraries linked against. However the libraries seem to be comming from 'wxconfig' and there seems to be no easy place to change the order!
Yes, wxconfig supplies the libraries to link against but configure puts that list into a variable that is then used in the Makefiles. So the solution is to fix the respective Makefile.am. I've just submited sr #62645 which does just that. I've also done a few other changes like moving the changelog entries to a .changes file. Use 'osc vc' to add no changelog entries. BTW, I'll once again promote the use of quilt for handling patches to packages. See http://nordisch.org for a short howto. HTH Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (5)
-
Cristian Morales Vega
-
Cristian Rodríguez
-
Paul Elliott
-
Philipp Thomas
-
Stanislav Brabec