Jump to content

libxml file not found bug when building Fcollada on Mac OSX


1dabred
 Share

Recommended Posts

Hi,

I tried building 0 AD on Mac OSX per the build instructions, and I'm getting an error in the "Building FCollada" step when building the game:
 

Quote

 

Building FCollada...
~/coding/0ad/libraries/source/fcollada/src ~/coding/0ad/libraries/source/fcollada ~/coding/0ad/libraries/osx
FCollada/FCollada.cpp
FCollada/FColladaPlugin.cpp
FCollada/FCDocument/FCDAnimated.cpp
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
In file included from In file included from FCollada/FCDocument/FCDAnimated.cppIn file included from FCollada/FColladaPlugin.cpp:FCollada/FCollada.cpp:15:9:
:
In file included from 9In file included from FCollada/StdAfx.h:
:FCollada/StdAfx.hIn file included from 13:FCollada/StdAfx.h:
13:In file included from :
13FCollada/FCollada.hIn file included from :
:FCollada/FCollada.hIn file included from 49:FCollada/FCollada.h:
49::
49:
FCollada/FUtils/FUtils.h:FCollada/FUtils/FUtils.h91FCollada/FUtils/FUtils.h:::911091:::10 10::  fatal error: fatal errorfatal error: : 'libxml/tree.h''libxml/tree.h''libxml/tree.h'  file file file not not not found foundfound


#include <libxml/tree.h>#include <libxml/tree.h>#include <libxml/tree.h>


         ^~~~~~~~~~~~~~~         ^~~~~~~~~~~~~~~         ^~~~~~~~~~~~~~~

 

I see some other forum topics reference this error - some of which I will link below - but they are quite old and I imagine parts of the build have changed, so i figured I would ask here before trying some of the fixes - any ideas how to fix this?

 

 

Thanks in advanced! I'm not very used to addressing these types of bugs, so im not sure what system info is relevant but I'm on Mac OS 10.15.6

Link to comment
Share on other sites

9 minutes ago, wraitii said:

Hell @1dabred ,

Can you confirm that you ran:


cd libraries/osx
./build-osx-libs.sh -j3

and that you had no errors?

I ran build-osx-libs and then got the error at 'Building FCollada...', which caused the process to exit with one error.

I don't have the original log but believe the other shell tasks before this did not have errors, because when I run build-osx-libs again, I get this:
 

Quote

Building zlib...
Skipping - already built (use --force-rebuild to override)
Building libcurl...
Skipping - already built (use --force-rebuild to override)
Building libiconv...
Skipping - already built (use --force-rebuild to override)
Building libxml2...
Skipping - already built (use --force-rebuild to override)
Building SDL2...
Skipping - already built (use --force-rebuild to override)
Building Boost...
Skipping - already built (use --force-rebuild to override)
Building wxWidgets...
Skipping - already built (use --force-rebuild to override)
Building libpng...
Skipping - already built (use --force-rebuild to override)
Building libogg...
Skipping - already built (use --force-rebuild to override)
Building libvorbis...
Skipping - already built (use --force-rebuild to override)
Building GMP...
Skipping - already built (use --force-rebuild to override)
Building Nettle...
Skipping - already built (use --force-rebuild to override)
Building GnuTLS...
Skipping - already built (use --force-rebuild to override)
Building gloox...
Skipping - already built (use --force-rebuild to override)
Building ICU...
Skipping - already built (use --force-rebuild to override)
Building ENet...
Skipping - already built (use --force-rebuild to override)
Building MiniUPnPc...
Skipping - already built (use --force-rebuild to override)
Building libsodium...
Skipping - already built (use --force-rebuild to override)
Building SpiderMonkey...
Skipping - already built (use --force-rebuild to override)
Building NVTT...
Skipping - already built (use --force-rebuild to override)
 

and then i get the above error when we get to 'Building FCollada'

Edited by 1dabred
Link to comment
Share on other sites

9 hours ago, Stan` said:

Try deleting the libxml folder in libraries/osx and trying again something might have failed.

deleted libxml2 folder and built again - i didn't see any obvious errors when building libxml2 again, but I get the same FCollada error shortly after.

Link to comment
Share on other sites

1 minute ago, 1dabred said:

deleted libxml2 folder and built again - i didn't see any obvious errors when building libxml2 again, but I get the same FCollada error shortly after.

Mmmh would you mind joining us on irc #0ad-dev ?

How did you get the source code ? Git, SVN, release ?

Link to comment
Share on other sites

Fixed it! For posterity:

I followed the suggestion from this comment from 10 years ago -



1) Install MacPorts
2) sudo port install libxml2
3) build libraries again

I believe the project is probably missing a dependency in the build process for mac osx - as it seems the team has made an effort to not depend on macports and include all dependencies in either the build instructions or build scripts. I will attempt to reproduce this on another mac, and if it happens again I will file a ticket to track it.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...