Hello all! I am trying to build OpenUSD inside a docker container on a linux machine, and I have been getting many errors. I’m pretty sure I shouldn’t have had to fix anything so I probably did something wrong in setup, but I managed to fix most errors up until this one.
collect2: error: ld returned 1 exit status
gmake[2]: *** [pxr/usd/bin/sdffilter/CMakeFiles/sdffilter.dir/build.make:115: pxr/usd/bin/sdffilter/sdffilter] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:8444: pxr/usd/bin/sdffilter/CMakeFiles/sdffilter.dir/all] Error 2
[ 64%] Built target _ndr
[ 64%] Linking CXX shared library libusd_pcp.so
[ 65%] Built target pcp
[ 65%] Linking CXX shared library _sdf.so
[ 65%] Built target _sdf
gmake: *** [Makefile:136: all] Error 2
ERROR: Failed to run 'cmake --build . --config Release --target install -- -j32' in /usr/local/OpenUSD/build/build/OpenUSD.
I honestly have no idea what to do here. Regarding those gmake errors, in pxr/usd/bin/sdffilter/, there is no CMakeFiles directory. There are only CmakeLists.txt and sdfilter.cpp.
I’m pretty sure the build should work without my intervention, right? Any ideas why it’s giving me so many problems?
Okay. I’ll try using that container and comparing.
Help me understand though, I thought the build_script first installs MaterialX and OpenSubdiv and any other dependencies OpenUSD has. Did I need to preinstall them, as I’m seeing in this repo, or is it supposed to work even without it all preinstalled.
And how do I use ci-usd to build usd? Do I need to clone the OpenUSD repo inside the running container from that image, and will that automatically make OpenUSD detect the preinstalled packages?
Yes, the build script installs any dependencies required, however, I’m not aware that people have tried to use it within a docker container, so it’s possible that additional configuration or corrections might be needed to allow build_usd.py to function in a docker container.
The container script I pointed to is the equivalent of build_usd.py but instead of using that build script, it explictly maps out the requirements. If you want to use that script directly, I suggest asking the authors of it on the ASWF slack, in the wg-ci channel, there’s a lot of expertise there. This invite link will get you in, if you are not already a member: Slack
Thanks for that extra info.
I wonder if its because its compiling as PIE? warning: creating DT_TEXTREL in a PIE
I’m not super familiar with GCC these days on Linux to comment. @asluk I wonder if anyone on your end has more familiarity here?
Looking at this SO assembly - Understanding a DT_TEXTREL warning - Stack Overflow it seems like one suggestion is adding --no-pie to the compiler flags, but I can’t imagine that would be required either since your Ubuntu version is ~3years old, so would have been caught by now as well.