0

I've trying to build https://github.com/google/usd_from_gltf. Since I am not experienced with CMake and Visual Studio I followed the instructions and managed to work after some fixes.

Now I am stuck in an issue that does not look like a problem related to the package. I got this error in my log.txt:

cmake H:\usd_from_gltf-master -DCMAKE_INSTALL_PREFIX=H:\UFG-CP37 -DCMAKE_PREFIX_PATH=H:\UFG-CP37 -DUSD_DIR=H:\USD-CP27 -DCMAKE_GENERATOR_PLATFORM=x64
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19041.
-- Configuring done
-- Generating done
-- Build files have been written to: H:/usd_from_gltf-master
cmake --build . --config Release --target install -- /m
Error: could not load cache

I wonder if this problem is related to the package versions. Feels like a problem related to my computer itself. Maybe someone can clear this a bit for me. I have seen some SO questions and some related to the build tree, but I am unsure about this.

Windows 10 x64 | USD 21.02 built using Python2.7 | usd_from_gltf using Python3.7 | Visual Studio 2017

My command was:

H:\usd_from_gltf-master>python ./tools/ufginstall/ufginstall.py H:/UFG-CP37 H:/USD-CP27 --testdata

Where as H:/UFG-CP37 I want it to be built and USD-CP27 is my USD Build.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
  • Please, learn how to format your posts on Stack Overflow. E.g. formatting as a code is easy: 1. Select the code you want to format. 2. Press `Ctrl+K` or `{}` button. – Tsyvarev Feb 24 '21 at 14:13
  • OK! Sorry about that and thanks! – Felipe de Abreu Prazeres Feb 24 '21 at 14:52
  • It looks like the working dir (.) is not a valid build directory because it does not contain a CMakeCache.txt file. Maybe the script changes the working directory underneath. What happens if you take the instructions literally and run the program with a full path to the `usd_from_gltf` dir, i.e. `python H:/usd_from_gltf-master/tools/ufginstall/ufginstall.py H:/UFG-CP37 H:/USD-CP27 --testdata`? – vre Feb 24 '21 at 17:14
  • If `cmake H:\usd_from_gltf-master -DCMAKE_INSTALL_PREFIX=H:\UFG-CP37 -DCMAKE_PREFIX_PATH=H:\UFG-CP37 -DUSD_DIR=H:\USD-CP27 -DCMAKE_GENERATOR_PLATFORM=x64` is the command that's run it's definetly missing something. There should at least be a source dir listed, even if it's just `.` Maybe cmake behaves different to the behavior described in the docs and tries to reconfigure the current working directory. Are you sure you're passing all necessary parameters to the script? – fabian Feb 24 '21 at 19:25
  • 1
    After checking the `usd_from_gltf` project I suppose you see the errors because you are doing an in source build. I saw a `delete_directory_content(build_dir)` in the script you are calling, so at present your combined source/build directory is wiped after CMake configuration just before you build. Create a separate build directory `mkdir build` and change to that directory `cd build` and run the command `python H:/usd_from_gltf-master/tools/ufginstall/ufginstall.py H:/UFG-CP37 H:/USD-CP27 --testdata` from there. – vre Feb 24 '21 at 20:41
  • OK! @fabian I am pretty sure I passed all the parameters, following guides as stands like this: python {UFG_SRC}/tools/ufginstall/ufginstall.py {UFG_BUILD} {USD} --testdata – Felipe de Abreu Prazeres Feb 25 '21 at 00:57
  • Hello, @vre! Thanks for going further and checking the source. I did it exactly as you asked. Tried changing to build directory and running from there. The problem persisted. I will try building using Python 2.7 and post here the results. – Felipe de Abreu Prazeres Feb 28 '21 at 15:09

0 Answers0