Skip to content

mxml4 support #239

@umlaeute

Description

@umlaeute

yoshimi currently supports mxml>=2.5

yoshimi/src/CMakeLists.txt

Lines 181 to 182 in f90b53f

# mxml
pkg_check_modules (MXML REQUIRED mxml>=2.5)

however, MXML-4.0 has been released more than a year ago, and - unfortunately - it is not API compatible.
it also uses a different pkg-config identifier (mxml4, instead of the old mxml).

in any case, as expected yoshimi-2.3.4.2 cannot be built against MXML-4 (even after fixing the CMakeLists).

distributions are likely to switch to MXML-4 (I don't know about others, but at least in Debian we have https://bugs.debian.org/1093689)

it seems that there's already some work in this direction (#236 (comment)), but nothing released yet.
anyhow, building current master (3be4b47) also fails to build with mxml4 related errors:

root@2ba86eea834c:/src/yoshimi/_build# make
[  1%] Building CXX object CMakeFiles/yoshimi.dir/Misc/XMLStore.cpp.o
/src/yoshimi/src/Misc/XMLStore.cpp: In static member function 'static mxml_node_t* {anonymous}::Policy::parse(const char*)':
/src/yoshimi/src/Misc/XMLStore.cpp:139:46: error: 'MXML_OPAQUE_CALLBACK' was not declared in this scope
  139 |             return mxmlLoadString(NULL, xml, MXML_OPAQUE_CALLBACK);  // treat all node content as »opaque« data, i.e. passed-through as-is
      |                                              ^~~~~~~~~~~~~~~~~~~~
/src/yoshimi/src/Misc/XMLStore.cpp: In member function 'char* {anonymous}::Policy::render()':
/src/yoshimi/src/Misc/XMLStore.cpp:144:13: error: 'mxmlSetWrapMargin' was not declared in this scope; did you mean 'mxmlOptionsSetWrapMargin'?
  144 |             mxmlSetWrapMargin(0);
      |             ^~~~~~~~~~~~~~~~~
      |             mxmlOptionsSetWrapMargin
/src/yoshimi/src/Misc/XMLStore.cpp:146:39: error: cannot convert 'const char* (*)(mxml_node_t*, int)' {aka 'const char* (*)(_mxml_node_s*, int)'} to 'mxml_options_t*' {aka '_mxml_options_s*'}
  146 |             return mxmlSaveAllocString(mxmlElm(), XMLStore_whitespace_callback);
      |                    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       const char* (*)(mxml_node_t*, int) {aka const char* (*)(_mxml_node_s*, int)}
In file included from /src/yoshimi/src/Misc/XMLStore.cpp:34:
/usr/include/libmxml4/mxml.h:218:81: note: initializing argument 2 of 'char* mxmlSaveAllocString(mxml_node_t*, mxml_options_t*)'
  218 | extern char             *mxmlSaveAllocString(mxml_node_t *node, mxml_options_t *options);
      |                                                                 ~~~~~~~~~~~~~~~~^~~~~~~
/src/yoshimi/src/Misc/XMLStore.cpp: In static member function 'static XMLtree::Node* XMLtree::Node::newTree()':
/src/yoshimi/src/Misc/XMLStore.cpp:228:42: error: 'MXML_NO_PARENT' was not declared in this scope; did you mean 'CLONE_PARENT'?
  228 |             return asNode(mxmlNewElement(MXML_NO_PARENT, XML_HEADER));
      |                                          ^~~~~~~~~~~~~~
      |                                          CLONE_PARENT
/src/yoshimi/src/Misc/XMLStore.cpp: In member function 'const char* XMLtree::Node::getText()':
/src/yoshimi/src/Misc/XMLStore.cpp:284:27: error: 'MXML_OPAQUE' was not declared in this scope; did you mean 'MXML_TYPE_OPAQUE'?
  284 |             if (child and MXML_OPAQUE == mxmlGetType(child))
      |                           ^~~~~~~~~~~
      |                           MXML_TYPE_OPAQUE
/src/yoshimi/src/Misc/XMLStore.cpp:283:51: warning: control reaches end of non-void function [-Wreturn-type]
  283 |             mxml_node_t* child = mxmlGetFirstChild(mxmlElm());
      |                                  ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
make[2]: *** [CMakeFiles/yoshimi.dir/build.make:471: CMakeFiles/yoshimi.dir/Misc/XMLStore.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/yoshimi.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

i'm opening this ticket merely so that I (hopefully) will get notified when yoshimi is able to bulid against MXML-4 (so I can adjust my packaging)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions