[CMake] Re: XML/expat link error

Doug Henry develop at brilligent.com
Sat May 27 11:50:13 EDT 2006


Same result with that change.  I did notice that it builds fine, even with
my system expat-dev package installed, so the system expat isn't the issue.
I have my own toolchain, which also has expat in it, if I remove expat from
my toolchain cmake will build.  Not sure exactly what this means yet, but it
does seem that cmake is picking up on my expat somehow.  I'm going to play
around with setting some stuff in the init file I pass during bootstrap and
see if I can override this expat issue, I'll let you know if any of my
experiments work out.


On 5/26/06, Brad King <brad.king at kitware.com> wrote:

> Doug Henry wrote:
> > actually, I have found if I change the following entry (add expat to the
> > linker flags) in cmxmlrpc/CMakeLists.txt this problem goes away:
> >
> > TARGET_LINK_LIBRARIES(xrtest cmXMLRPC cmexpat expat ${CMAKE_DL_LIBS})
>
> From where is that other "expat" library coming?  I bet the build of
> cmXMLRPC is accidentally using system expat headers instead of cmexpat
> headers.  The include directory order in Utilities/cmxmlrpc may need
> fixing.  In that directory's CMakeLists.txt file change the lines
>
> INCLUDE_DIRECTORIES(
>    "${CMAKE_CURRENT_SOURCE_DIR}"
>    "${CMAKE_CURRENT_BINARY_DIR}"
>    ${CMAKE_EXPAT_INCLUDES}
>    ${CMAKE_CURL_INCLUDES}
>    )
>
> to
>
> INCLUDE_DIRECTORIES(BEFORE
>    ${CMAKE_CURL_INCLUDES}
>    ${CMAKE_EXPAT_INCLUDES}
>    "${CMAKE_CURRENT_SOURCE_DIR}"
>    "${CMAKE_CURRENT_BINARY_DIR}"
>    )
>
> and try bootstrapping again with a fresh tree.
>
> -Brad
>
> > On 5/26/06, *Doug Henry* <develop at brilligent.com
> > <mailto:develop at brilligent.com>> wrote:
> >
> >     I receive the errors below when building versions 2.2.3 and 2.4.2.
> >     It looks like the cmexpat library is not linking in when cmXMLRPC
> >     library is used.  I have ./Utilities/cmexpat/libcmexpat.a so it did
> >     build, not sure what would cause this.
> >
> >     [TOOLS cmake-2.4.2]$ make
> >     Linking C executable ../../bin/xrtest
> >     /mnt/tools/RPM/TMP/cmake-2.4.2
> /Utilities/cmxmlrpc/libcmXMLRPC.a(xmlrpc_expat.o):
> >     In function `xml_parse':
> >     xmlrpc_expat.c:(.text+0x848): undefined reference to
> `XML_ParserCreate'
> >     xmlrpc_expat.c:(.text+0x862): undefined reference to
> `XML_SetUserData'
> >     xmlrpc_expat.c:(.text+0x87c): undefined reference to
> >     `XML_SetElementHandler'
> >     xmlrpc_expat.c:(.text+0x88d): undefined reference to
> >     `XML_SetCharacterDataHandler'
> >     xmlrpc_expat.c:(.text+0x8a6): undefined reference to `XML_Parse'
> >     xmlrpc_expat.c:(.text+0x8d8): undefined reference to
> `XML_ParserFree'
> >     xmlrpc_expat.c:(.text+0x947): undefined reference to
> `XML_GetErrorCode'
> >     xmlrpc_expat.c:(.text+0x94f): undefined reference to
> `XML_ErrorString'
> >     xmlrpc_expat.c:(.text+0x96c): undefined reference to
> `XML_GetErrorCode'
> >     xmlrpc_expat.c:(.text+0x974): undefined reference to
> `XML_ErrorString'
> >     collect2: ld returned 1 exit status
> >     make[2]: *** [bin/xrtest] Error 1
> >     make[1]: *** [Utilities/cmxmlrpc/CMakeFiles/xrtest.dir/all] Error 2
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060527/fd3ea455/attachment.html


More information about the CMake mailing list