google / usd_from_gltf

Apache License 2.0
550 stars 86 forks source link

Error installing USD from GLTF - fatal error: pxr/base/gf/bbox3d.h #49

Open maciejze opened 4 years ago

maciejze commented 4 years ago

Hello, I have issue during istalling UFG. I have completed all steps that are listed before (installing USD, NASM, PIL) successfully

-------- Installing USD_FROM_GLTF --------
  USD_FROM_GLTF: CWD: /home/maciejze/UFG/build/usd_from_gltf
  USD_FROM_GLTF: Run: cmake /home/maciejze/usd_from_gltf -DCMAKE_INSTALL_PREFIX=/home/maciejze/UFG -DCMAKE_PREFIX_PATH=/home/maciejze/UFG -DUSD_DIR=/home/maciejze/USD
  USD_FROM_GLTF: CWD: /home/maciejze/UFG/build/usd_from_gltf
  USD_FROM_GLTF: Run: cmake --build . --config Release --target install --
Scanning dependencies of target gltf
[  2%] Building CXX object gltf/CMakeFiles/gltf.dir/internal_util.cc.o
[  4%] Building CXX object gltf/CMakeFiles/gltf.dir/load.cc.o
[  7%] Building CXX object gltf/CMakeFiles/gltf.dir/memory_stream.cc.o
[  9%] Building CXX object gltf/CMakeFiles/gltf.dir/message.cc.o
[ 11%] Building CXX object gltf/CMakeFiles/gltf.dir/stream.cc.o
[ 14%] Building CXX object gltf/CMakeFiles/gltf.dir/validate.cc.o
[ 16%] Building CXX object gltf/CMakeFiles/gltf.dir/cache.cc.o
[ 19%] Building CXX object gltf/CMakeFiles/gltf.dir/disk_stream.cc.o
[ 21%] Building CXX object gltf/CMakeFiles/gltf.dir/disk_util.cc.o
[ 23%] Building CXX object gltf/CMakeFiles/gltf.dir/glb_stream.cc.o
[ 26%] Building CXX object gltf/CMakeFiles/gltf.dir/gltf.cc.o
[ 28%] Building CXX object gltf/CMakeFiles/gltf.dir/image_parsing.cc.o
/home/maciejze/usd_from_gltf/gltf/image_parsing.cc:313:23: warning: multi-character character constant [-Wmultichar]
     if (chunk.type != 'IHDR') {
                       ^~~~~~
[ 30%] Linking CXX static library libgltf.a
[ 30%] Built target gltf
Scanning dependencies of target common
[ 33%] Building CXX object common/CMakeFiles/common.dir/config.cc.o
In file included from /home/maciejze/usd_from_gltf/common/../common/config.h:20:0,
                 from /home/maciejze/usd_from_gltf/common/config.cc:17:
/home/maciejze/usd_from_gltf/common/../common/common.h:29:10: fatal error: pxr/base/gf/bbox3d.h: No such file or directory
 #include "pxr/base/gf/bbox3d.h"
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
common/CMakeFiles/common.dir/build.make:62: recipe for target 'common/CMakeFiles/common.dir/config.cc.o' failed
make[2]: *** [common/CMakeFiles/common.dir/config.cc.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'common/CMakeFiles/common.dir/all' failed
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

  USD_FROM_GLTF: ERROR: Command failed: cmake --build . --config Release --target install --
  USD_FROM_GLTF: See log at: /home/maciejze/UFG/build/usd_from_gltf/log.txt
serdartepeyurt commented 4 years ago

You need to add required USD directories to your PATH. It tells you which directories to add your PATH after USD build finishes.

germelo commented 4 years ago

Hi @serdartepeyurt! Can you explain how to add the required USD directory in my PATH please? I have it in .//usd

goyote commented 4 years ago

@germelo did you solve this? getting exact error. I've tried updating my path already as @serdartepeyurt said:

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/vagrant/USD:/home/vagrant/usd_from_gltf' >> ~/.bashrc
echo 'export PATH=$PATH:/home/vagrant/USD:/home/vagrant/usd_from_gltf' >> ~/.bashrc
omerts commented 4 years ago

So after some playing around I found that the {USD} path you need to give to the ufginstall.py script: python {UFG_SRC}/tools/ufginstall/ufginstall.py {UFG_BUILD} {USD} --testdata Is not the USD directory where you download the code, rather the directory where USD is installed.

It is outputted after USD is successfully installed: image

So in the my case {USD} = /usr/local/USD

sprengerst commented 3 years ago

Hmm... I have it in my path, still getting the same error.

root@vXXX:/var/www/html/vr# echo $PATH
/srv/USD_Install/bin:/root/.nvm/versions/node/v12.18.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Can you tell me what's wrong with my call?

python /srv/UFG_SRC/tools/ufginstall/ufginstall.py /srv/UFG_BUILD/ /srv/USD_INSTALL --testdata

sprengerst commented 3 years ago

Oh my god, I accidently confused:

USD_INSTALL with USD_Install, it was the capitalization.