<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree in FBX Forum</title>
    <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9565015#M826</link>
    <description>&lt;P&gt;I installed centos 8 and built the FBX Python bindings, and it worked fine! -lxml2 does come before libfbxsdk.a.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't know but it seems Autodesk's linux support is more like CentOS support. So from now on, I'll use CentOS for developing fbx. Thank you.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 02:26:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-06-07T02:26:32Z</dc:date>
    <item>
      <title>FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9538320#M823</link>
      <description>&lt;P&gt;As the title says, FBX Python Bindings fails on Ubuntu.&lt;/P&gt;&lt;P&gt;More precisely, FBX Python Bindings generates FbxCommon.py and fbx.so without any errors, but when I import FbxCommon.py from Python interpreter it fails because of the following exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;gt;&amp;gt;&amp;gt; import FbxCommon

Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "/(my_workspace)/PythonBindings/build/Distrib/site-packages/fbx/FbxCommon.py", line 1, in &amp;lt;module&amp;gt;
    from fbx import *
ImportError: /(my_workspace)/PythonBindings/build/Distrib/site-packages/fbx/fbx.so: undefined symbol: xmlFree&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My build environment is as follow:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;OS: ubuntu 18.04.4 LTS&lt;/LI&gt;&lt;LI&gt;Python: Python 3.8.3 (conda environment)&lt;/LI&gt;&lt;LI&gt;SIP version: 4.19.3 (not the latest one because &lt;SPAN&gt;it is known that it correctly supports the '--sip-module';&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/fbx-forum/cannot-manage-to-compile-python-fbx-2020-0-1-vs2017-with-python/td-p/9270853" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/fbx-forum/cannot-manage-to-compile-python-fbx-2020-0-1-vs2017-with-python/td-p/9270853&lt;/A&gt;&amp;nbsp;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;g++ version: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I debugged this issue, I've found that this issue is strongly related to this topic.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://bugs.launchpad.net/ubuntu/+source/libxml2/+bug/1032639" target="_blank" rel="noopener"&gt;can not link against libxml2&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The Makefile of Python bindings (PythonBindings/build/Python38_x64/Makefile) generated by sip has the following code in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;LIBS = -L/(my_workspace)/sdk/lib/gcc/x64/release -lz -lxml2 /(my_workspace)/sdk/lib/gcc/x64/release/libfbxsdk.a &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it leads to the following command on build&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;.... ipfbxFbxDouble3.o sipfbxFbxDouble2.o sipfbxFbxDateTime.o sipfbxFbxDistance.o sipfbxFbxBlob.o -L/(my_workspace)/sdk/lib/gcc/x64/release -lz -lxml2 /(my_workspace)/sdk/lib/gcc/x64/release/libfbxsdk.a&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it seems libfbxsdk.a has to reference xml2, so it should be specified before -lxml2 argument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I solved this problem by editing SIP module script to generate Makefile like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;LIBS = -L/(my_workspace)/sdk/lib/gcc/x64/release /(my_workspace)/sdk/lib/gcc/x64/release/libfbxsdk.a -lz -lxml2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but is there any better solution? It's a bit weird to do this every time I use FBX Python Bindings on ubuntu.&lt;/P&gt;&lt;P&gt;I tried to use SIP 4.19.22 but it didn't work.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 14:30:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9538320#M823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T14:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9546359#M824</link>
      <description>&lt;P&gt;Hi, I can't say for sure because I don't have access to an Ubuntu machine, but I can see two possible causes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a) are you sure you have libxml2 properly installed on your machine? On Linux/MacOS, the FBX SDK relies on the fact that both the libxml2 and libz are part of the system libraries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b) there may be an issue with the sipconfig on Ubuntu.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to build the FBX Python Bindings on Centos 7.7 and, while I do have the same sequence: &lt;EM&gt;-L{fbxsdk_path} -lz -lxml2 {fbxsdk_path}/libfbxsdk.a, &lt;/EM&gt;the fbx.so did properly compile. Then, when I do &lt;EM&gt;import FbxCommon &lt;/EM&gt;I don't get any unresolved symbols.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/bin/Python2.7 (which is a 2.7.5)&lt;/P&gt;
&lt;P&gt;sipconfig.py&amp;nbsp; located in: /usr/lib64/python2.7/site-packages&lt;/P&gt;
&lt;P&gt;/bin/sip version 4.14.6&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 16:03:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9546359#M824</guid>
      <dc:creator>regalir</dc:creator>
      <dc:date>2020-05-28T16:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9554461#M825</link>
      <description>&lt;P&gt;Thank you for your advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;a) are you sure you have libxml2 properly installed on your machine? On Linux/MacOS, the FBX SDK relies on the fact that both the libxml2 and libz are part of the system libraries.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Yes, libxml2 comes with ubuntu, but it is libxml2-dev that is required to build FBX SDK. I installed it by &lt;STRONG&gt;sudo apt install libxml2-dev&lt;/STRONG&gt; and I think this will properly install the library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;b) there may be an issue with the sipconfig on Ubuntu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to build the FBX Python Bindings on Centos 7.7 and, while I do have the same sequence: &lt;EM&gt;-L{fbxsdk_path} -lz -lxml2 {fbxsdk_path}/libfbxsdk.a, &lt;/EM&gt;the fbx.so did properly compile. Then, when I do &lt;EM&gt;import FbxCommon &lt;/EM&gt;I don't get any unresolved symbols.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/bin/Python2.7 (which is a 2.7.5)&lt;/P&gt;&lt;P&gt;sipconfig.py&amp;nbsp; located in: /usr/lib64/python2.7/site-packages&lt;/P&gt;&lt;P&gt;/bin/sip version 4.14.6&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to build FBX SDK with Python2.7, and sip-4.14.6, but it didn't work, either. I cannot figure out why your environment can generate the sequence where &lt;STRONG&gt;-lxml2&lt;/STRONG&gt; comes before &lt;STRONG&gt;libfbxsdk.a&lt;/STRONG&gt;, but maybe it is because of the difference between ubuntu and centos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone knows this cause, please let us know!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 10:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9554461#M825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-02T10:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9565015#M826</link>
      <description>&lt;P&gt;I installed centos 8 and built the FBX Python bindings, and it worked fine! -lxml2 does come before libfbxsdk.a.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't know but it seems Autodesk's linux support is more like CentOS support. So from now on, I'll use CentOS for developing fbx. Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 02:26:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9565015#M826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-07T02:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953500#M827</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I solved this problem by editing SIP module script to generate Makefile like this.&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could you be a little more specific? I see 124 different files in /sip, and no such line in `fbx_module.sip`. Thank&amp;nbsp; you!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:51:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953500#M827</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-21T09:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953504#M828</link>
      <description>&lt;P&gt;Ah nevermind, found it! Within the `sipconfig.py` file...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:53:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953504#M828</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-21T09:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953513#M829</link>
      <description>&lt;P&gt;Yes, that's what I edited. More specifically, I edited line 534 of sipconfig.py like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# the original code&lt;/P&gt;&lt;P&gt;libs.extend(self.optional_list("LIBS"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# I changed to this&lt;/P&gt;&lt;P&gt;libs = self.optional_list("LIBS").extend(libs)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:59:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/9953513#M829</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-21T09:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: FBX Python Bindings fails on Ubuntu because of undefined symbol xmlFree</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/10897021#M830</link>
      <description>&lt;P&gt;Where is the file that you modified&amp;nbsp;by editing SIP module script to generate Makefile like this. Did you only change "&lt;SPAN&gt;sipconfig.py"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I change the sipconfig.py doesn't create the LIBS line correctly of&amp;nbsp;&lt;SPAN&gt;Python bindings (PythonBindings/build/Python38_x64/Makefile) as your.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;LIBS = -L/(my_workspace)/sdk/lib/gcc/x64/release /(my_workspace)/sdk/lib/gcc/x64/release/libfbxsdk.a -lz -lxml2&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Can you please help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Know it works in CentOs, but I'm using Ubuntu 20.04 and I have the same problem as you. G++ 9.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:51:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/fbx-python-bindings-fails-on-ubuntu-because-of-undefined-symbol/m-p/10897021#M830</guid>
      <dc:creator>andreaa6EP2A</dc:creator>
      <dc:date>2022-01-21T18:51:21Z</dc:date>
    </item>
  </channel>
</rss>

