dreamworksanimation / openmoonray

MoonRay is DreamWorks’ open-source, award-winning, state-of-the-art production MCRT renderer.
https://openmoonray.org/
Apache License 2.0
4.32k stars 254 forks source link

Building Moonray for Houdini 20 (GCC11.2) #136

Open adro79 opened 11 months ago

adro79 commented 11 months ago

Hi there!

I'm spending this vacations to try build Moonray for Houdini 20. There's an error I previously reported when trying to build for Arch Linux but it was suggested to use gcc9 instead.

I would need some hint for this since I'm not used to code.

Here's the error log:

[  0%] Building CXX object arras/arras4_core/arras4_message_api/lib/message_api/CMakeFiles/message_api.dir/messageapi_names.cc.o
In file included from /mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/memory:76,
                 from /mnt/proj/Moonray/DCC/Houdini20-1.4/src/openmoonray/arras/arras4_core/arras4_log/lib/arras4_log/Logger.cc:11:
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h: In instantiation of ‘constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with _Del = std::default_delete<std::__cxx11::basic_string<char> >; <template-parameter-2-2> = void; _Tp = std::__cxx11::basic_string<char>; _Dp = std::default_delete<std::__cxx11::basic_string<char> >]’:
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/openmoonray/arras/arras4_core/arras4_log/lib/arras4_log/Logger.cc:28:55:   required from here
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:270:11: error: no matching function for call to ‘std::__uniq_ptr_data<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> >, true, true>::__uniq_ptr_data()’
  270 |         : _M_t()
      |           ^~~~~~
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:210:40: note: candidate: ‘template<class _Del> std::__uniq_ptr_data<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> >, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >::pointer, _Del&&) [inherited from std::__uniq_ptr_impl<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >]’
  210 |       using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
      |                                        ^~~~~~~~~~~~~~~
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:210:40: note:   template argument deduction/substitution failed:
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:270:11: note:   candidate expects 2 arguments, 0 provided
  270 |         : _M_t()
      |           ^~~~~~
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:210:40: note: candidate: ‘std::__uniq_ptr_data<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> >, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >::pointer) [inherited from std::__uniq_ptr_impl<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >]’
  210 |       using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
      |                                        ^~~~~~~~~~~~~~~
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:210:40: note:   candidate expects 1 argument, 0 provided
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:211:7: note: candidate: ‘std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >::__uniq_ptr_data(std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >&&) [with _Tp = std::__cxx11::basic_string<char>; _Dp = std::default_delete<std::__cxx11::basic_string<char> >; bool <anonymous> = true; bool <anonymous> = true]’
  211 |       __uniq_ptr_data(__uniq_ptr_data&&) = default;
      |       ^~~~~~~~~~~~~~~
/mnt/proj/Moonray/DCC/Houdini20-1.4/src/deps/include/c++/11.2.0/bits/unique_ptr.h:211:7: note:   candidate expects 1 argument, 0 provided

There's two more errors similar to this one. I'll upload the full log in a txt since it's a little bit large -> moonray-gcc11-errorlog.txt

Thanks in advance!!

adro79 commented 11 months ago

Was able to surpass this error with ABI_VERSION=0 as the Rocky Linux 9 Guide menitons.

adro79 commented 10 months ago

Hi, I finally got Moonray running on Houdini 20 by building it on a Rocky Linux 9 Docker Container! image

At this moment, it crashes quite a lot and shader nodes appear empty when created. I'll create a guide once I get a decent build.

If you need some houdini logs let me know.

adro79 commented 10 months ago

Got this log in houdini, I don't know why this happens.

Traceback (most recent call last):
  File "/opt/hfs20.0.547/python/lib/python3.10/site-packages-forced/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'pxr.MoonrayShaderParser'
Traceback (most recent call last):
  File "/opt/hfs20.0.547/python/lib/python3.10/site-packages-forced/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'pxr.MoonrayShaderDiscovery'

These are my environment variables:

LD_LIBRARY_PATH: /mnt/proj/deps/moonrayHoudini/lib
MOONRAY_ROOT: /mnt/proj/deps/moonrayHoudini
PATH: /mnt/proj/deps/moonrayHoudini/bin:$PATH
ARRAS_SESSION_PATH: $MOONRAY_ROOT/sessions
MOONRAY_CLASS_PATH: $MOONRAY_ROOT/shader_json
PXR_PLUGINPATH_NAME: $MOONRAY_ROOT/plugin/usd:$PXR_PLUGINPATH_NAME
RDL2_DSO_PATH: $MOONRAY_ROOT/rdl2dso.proxy:$MOONRAY_ROOT/rdl2dso
rgwilson68 commented 10 months ago

No Python module is found for pxr.MoonrayShaderParser or pxr.MoonrayShaderDiscovery because these plugins don't have Python modules : not sure why USD/Hydra always reports this as an error, since in this case Python modules are not needed, but it does. The error shouldn't impact functionality, so it probably isn't the cause of the other problems you are seeing.

adro79 commented 10 months ago

Thanks for the reply, I got the materials working by reverting the HDAs from the otls folder to the initial commit version. Seems like this commit broke the HDAs or aren't compatible with my environment.

I think everything's working now, feel free to close this out.

I'll write a detailed guide soon, just like Brian did.

adro79 commented 9 months ago

Hi, sorry for the delay.

The guide is available now! You can check it here: https://github.com/adro79/openmoonray/discussions/2