brothermechanic / cg

Computer graphics ebuilds for gentoo
Other
24 stars 13 forks source link

media-libs/openusd-23.11 fails due to boost issue with multiple pythons #79

Open cwpenhale opened 2 weeks ago

cwpenhale commented 2 weeks ago

Hey friends,

I've been working on an ebuild for openmoonray, and have been building and rebuilding openusd as I've been cranking on getting that whole project working. Cleaning up portage on my system, I noticed that I upgraded to python3_13 from python3_12 for some packages, and that I now had multiple pythons on my system. When I went to re-emerge openusd again, it didn't build, as boost was finding python3_13. I added this to the cmake args on the ::cg ebuild and it went through as expected:

-DPython3_EXECUTABLE="${PYTHON}"

Hope this helps. Let me know if I can provide any additional information.

Thanks! Connor

brothermechanic commented 2 weeks ago

@cwpenhale Cool, Thank you for reply!

May be you can help with this problem? I can't start usdview (and blender compiled with usd) I try build with python 3-11 and 3.12 I try rebuild whole world

bm@TANK ~ 
$ usdview
Traceback (most recent call last):
  File "/usr/lib64/openusd/.bin/usdview", line 11, in <module>
    import pxr.Usdviewq as Usdviewq
  File "/usr/lib/python3.11/site-packages/pxr/Usdviewq/__init__.py", line 10, in <module>
    from pxr import Tf
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 161, in <module>
    PreparePythonModule()
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 86, in PreparePythonModule
    module = importlib.import_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: /usr/lib64/openusd/lib/libusd_ms.so: undefined symbol: _ZN16OpenColorIO_v2_317ROLE_SCENE_LINEARE
bm@TANK ~ 
$ usdview
Traceback (most recent call last):
  File "/usr/lib64/openusd/.bin/usdview", line 11, in <module>
    import pxr.Usdviewq as Usdviewq
  File "/usr/lib/python3.11/site-packages/pxr/Usdviewq/__init__.py", line 10, in <module>
    from pxr import Tf
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 161, in <module>
    PreparePythonModule()
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 86, in PreparePythonModule
    module = importlib.import_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: /usr/lib64/openusd/lib/libusd_ms.so: undefined symbol: _ZTVN16OpenImageIO_v2_510Filesystem11IOMemReaderE
bm@TANK ~ 
$ usdview
Traceback (most recent call last):
  File "/usr/lib64/openusd/.bin/usdview", line 11, in <module>
    import pxr.Usdviewq as Usdviewq
  File "/usr/lib/python3.11/site-packages/pxr/Usdviewq/__init__.py", line 10, in <module>
    from pxr import Tf
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 161, in <module>
    PreparePythonModule()
  File "/usr/lib/python3.11/site-packages/pxr/Tf/__init__.py", line 86, in PreparePythonModule
    module = importlib.import_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: /usr/lib64/openusd/lib/libusd_ms.so: undefined symbol: _ZTVN5draco4MeshE

Where is a bug?

cwpenhale commented 2 weeks ago

Maybe rebuild OCIO with the expected python as well? I see its asking about _ZTVN16OpenImageIO...

brothermechanic commented 2 weeks ago

Maybe rebuild OCIO with the expected python as well? I see its asking about _ZTVN16OpenImageIO...

Yes, i try did it -> not working

I try to build without ocio too (as can you see in log - it contain several attempts)

brothermechanic commented 2 weeks ago

@cwpenhale do you have working usdview?

cwpenhale commented 1 week ago

I think I need to recompile with "tools." Let me give it a shot.

cwpenhale commented 1 week ago

Been going down a rabbit hole with this one. I've got usdview to compile with PySide6, but uic -g python spits out PySide2 python files for some reason. Almost ready to test :)

cwpenhale commented 1 week ago

@brothermechanic opened a new issue to track the effort: https://github.com/brothermechanic/cg/issues/81 . Close this one and pick it up there?