m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.49k stars 257 forks source link

libmusicbrainz: xmlParser fails building #2537

Closed LigH-de closed 4 months ago

LigH-de commented 9 months ago
[1/56] Building CXX object src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o
FAILED: src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o 
G:\MABS\msys64\mingw32\bin\ccache.exe  g++  -IG:/MABS/build/libmusicbrainz-git/build-32bit/src -IG:/MABS/build/libmusicbrainz-git/src -IG:/MABS/build/libmusicbrainz-git/src/.. -IG:/MABS/build/libmusicbrainz-git/src/../include -IG:/MABS/build/libmusicbrainz-git/build-32bit/src/../include -IG:/MABS/local32/include/neon -IG:/MABS/local32/include/libxml2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads -DLIBXML_STATIC -Wall -Wextra -pedantic-errors -Werror -O3 -DNDEBUG -MD -MT src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o -MF src\CMakeFiles\make-c-interface.dir\xmlParser.cc.o.d -o src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o -c G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc: In static member function 'static XMLNode* XMLRootNode::parseFile(const std::string&, XMLResults*)':
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:57:11: error: 'xmlParseFile' was not declared in this scope; did you mean 'xmlSaveFile'?
   57 |     doc = xmlParseFile(filename.c_str());
      |           ^~~~~~~~~~~~
      |           xmlSaveFile
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:59:9: error: 'xmlErrorPtr' was not declared in this scope; did you mean 'xmlDocPtr'?
   59 |         xmlErrorPtr error = xmlGetLastError();
      |         ^~~~~~~~~~~
      |         xmlDocPtr
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:60:28: error: 'error' was not declared in this scope; did you mean 'perror'?
   60 |         results->message = error->message;
      |                            ^~~~~
      |                            perror
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc: In static member function 'static XMLNode* XMLRootNode::parseString(const std::string&, XMLResults*)':
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:72:11: error: 'xmlParseMemory' was not declared in this scope
   72 |     doc = xmlParseMemory(xml.c_str(), xml.length());
      |           ^~~~~~~~~~~~~~
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:74:9: error: 'xmlErrorPtr' was not declared in this scope; did you mean 'xmlDocPtr'?
   74 |         xmlErrorPtr error = xmlGetLastError();
      |         ^~~~~~~~~~~
      |         xmlDocPtr
G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc:75:28: error: 'error' was not declared in this scope; did you mean 'perror'?
   75 |         results->message = error->message;
      |                            ^~~~~
      |                            perror
ninja: build stopped: subcommand failed.

Note: libmusicbrainz is rather old, the sources in @wiiaboo fork at least 3 years, the xmlParser even 9 years. So the reason must be external. Possibly a sudden incompatibility with the newest GCC?

logs.zip

LigH-de commented 9 months ago

BTW, the original repo has no "issues" page.

zhangran-cn commented 9 months ago

I have also encountered the same problem, and there is no better solution yet. I suspect that:

XmlErrorPtr is defined in libxml2, does it lack a search path?

zhangran-cn commented 9 months ago

G:\MABS\msys64\mingw32\bin\ccache.exe g++ -IG:/MABS/build/libmusicbrainz-git/build-32bit/src -IG:/MABS/build/libmusicbrainz-git/src -IG:/MABS/build/libmusicbrainz-git/src/.. -IG:/MABS/build/libmusicbrainz-git/src/../include -IG:/MABS/build/libmusicbrainz-git/build-32bit/src/../include -IG:/MABS/local32/include/neon -IG:/MABS/ local32/include/libxml2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads -DLIBXML_STATIC -Wall -Wextra -pedantic-errors -Werror -O3 -DNDEBUG -MD -MT src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o -MF src\CMakeFiles\make-c-interface.dir\xmlParser.cc.o.d -o src/CMakeFiles/make-c-interface.dir/xmlParser.cc.o -c G:/MABS/build/libmusicbrainz-git/src/xmlParser.cc

I don't have a path of local32/include/libxml2.

1480c1 commented 9 months ago

Can you try https://github.com/m-ab-s/media-autobuild_suite/commit/e9c402e7a0cc9ccd03def6479efdcec0a8b0642d ? It seems it's due to changes done in libxml2 with transitive includes.

zhangran-cn commented 9 months ago

Can you try e9c402e ? It seems it's due to changes done in libxml2 with transitive includes.

Success, thank you!

hydra3333 commented 9 months ago

I guess you build without vulkan ? any hints on how to get a working build would be much appreciated.

LigH-de commented 9 months ago

Today I was able to build everything, non-free license, almost every module enabled.

Before running the suite I removed all the subdirectories in build and local## to enforce a completely fresh download and build of all sources.

media-autobuild_suite.ini.txt ffmpeg_options.txt

The only patch which failed was the "cabac not inline" patch for ffmepg.

compile.stripped.log