← Back to team overview

kicad-developers team mailing list archive

Re: Compiling fails on XML class on Apple OS X with wxWidgets 2.9-svn

 

On 8/11/2010 10:58 AM, Jerry Jacobs wrote:
> Dear all,
> 
> I tried compiling the latest revision of wxWidget and KiCad on my Macbook with
> Apple OS X and it failed on the XML library that Dick is using now. I
> recompiled again and the option to enable the XML library is the --enable-expat
> but still it fails. The weird thing is that there are some function symbols in
> the static monolithic library in the wxXmlDocument class. So that means it is
> enabled. Below there is my wxWidgets configuration of configure and the error I
> get during linking. Maybe some people have suggestions or ideas. The point is I
> want to test the latest stuff and need to compile it myself then.
> 
> Kind regards,
> Jerry Jacobs
> - http://www.xor-gate.org
> 
> ./configure --enable-unicode=yes --enable-shared=no --enable-monolithic
> --with-opengl   --enable-universal_binary --enable-aui --enable-debug
> --with-osx_cocoa   --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/
> --prefix=/opt/wxwidgets/rev-65251 --enable-expat

Jerry,

After you ran configure, what did configure report for the expat library "sys"
or "builtin"?  On both Linux (Debian testing) and Windows (MinGW/MSYS) I'm
using the system libraries without any issues.  I don't know that this makes
any difference but it could.  Also, it may be the version of wxWidgets you are
using.  I had to update from 2.8.10 to 2.8.11 because
wxXmlNode::GetAttributes() does not exist prior to 2.8.11.  This may also apply
between the 2.9.0 and the 2.9.1 branch.  You can verify this by grepping
<wx/xml/xml.h> for GetAttributes.

I've been toying with the idea of adding a version check to FindwxWidgets so
CMake will choke if the correct version of wxWidgets is not available (ala
autoconf) rather than having to figure that out after a build failure.  Library
version checking is one of the places most of the CMake find modules are a bit
weak.  If no one objects to this idea, I'll add it to my todo list and try to
knock it out in the not too distant future.

Note to all developers: the current minimum version of wxWidgets to build the
testing branch of Kicad is 2.8.11.

Wayne

> 
> Linking CXX executable eeschema.app/Contents/MacOS/eeschema
> Undefined symbols:
>   "_XML_SetCharacterDataHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetCommentHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetCdataSectionHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetUserData", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_ParserFree", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_ParserCreate", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetElementHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetUnknownEncodingHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_GetErrorCode", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_SetDefaultHandler", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_Parse", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_GetCurrentLineNumber", referenced from:
>       _StartCdataHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
>       _CommentHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)
>       _TextHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)
>       _StartElementHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)
>   "_XML_ErrorString", referenced from:
>       wxXmlDocument::Load(wxInputStream&, wxString const&, int)in
> libwx_osx_cocoau-2.9.a(monolib_xml.o)
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [eeschema/eeschema.app/Contents/MacOS/eeschema] Error 1
> make[1]: *** [eeschema/CMakeFiles/eeschema.dir/all] Error 2
> make: *** [all] Error 2
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References