google / usd_from_gltf

Apache License 2.0
550 stars 86 forks source link

Installation fails with undefined reference #66

Closed julienbfabre closed 4 years ago

julienbfabre commented 4 years ago

On Ubuntu 16.04, USD and all other dependencies installed successfully but i'm getting the following:

cmake /home/julien/usd_from_gltf -DCMAKE_INSTALL_PREFIX=/usr/local/usd_from_gltf -DCMAKE_PREFIX_PATH=/usr/local/usd_from_gltf -DUSD_DIR=/usr/local/USD
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/usd_from_gltf/build/usd_from_gltf

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/julien/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
[ 35%] Building CXX object common/CMakeFiles/common.dir/logging.cc.o
[ 38%] Building CXX object common/CMakeFiles/common.dir/platform.cc.o
[ 40%] Linking CXX static library libcommon.a
[ 40%] Built target common
Scanning dependencies of target process
[ 42%] Building CXX object process/CMakeFiles/process.dir/math.cc.o
[ 45%] Building CXX object process/CMakeFiles/process.dir/mesh.cc.o
[ 47%] Building CXX object process/CMakeFiles/process.dir/process_util.cc.o
[ 50%] Building CXX object process/CMakeFiles/process.dir/skin.cc.o
[ 52%] Building CXX object process/CMakeFiles/process.dir/animation.cc.o
[ 54%] Building CXX object process/CMakeFiles/process.dir/color.cc.o
[ 57%] Building CXX object process/CMakeFiles/process.dir/float_image.cc.o
[ 59%] Building CXX object process/CMakeFiles/process.dir/image.cc.o
[ 61%] Building CXX object process/CMakeFiles/process.dir/image_fallback.cc.o
[ 64%] Building CXX object process/CMakeFiles/process.dir/image_gif.cc.o
[ 66%] Building CXX object process/CMakeFiles/process.dir/image_jpg.cc.o
[ 69%] Building CXX object process/CMakeFiles/process.dir/image_png.cc.o
[ 71%] Linking CXX static library libprocess.a
[ 71%] Built target process
Scanning dependencies of target convert
[ 73%] Building CXX object convert/CMakeFiles/convert.dir/tokens.cc.o
[ 76%] Building CXX object convert/CMakeFiles/convert.dir/convert_util.cc.o
[ 78%] Building CXX object convert/CMakeFiles/convert.dir/converter.cc.o
[ 80%] Building CXX object convert/CMakeFiles/convert.dir/materializer.cc.o
[ 83%] Building CXX object convert/CMakeFiles/convert.dir/package.cc.o
[ 85%] Building CXX object convert/CMakeFiles/convert.dir/texturator.cc.o
[ 88%] Linking CXX static library libconvert.a
[ 88%] Built target convert
Scanning dependencies of target usd_from_gltf
[ 90%] Building CXX object usd_from_gltf/CMakeFiles/usd_from_gltf.dir/args.cc.o
[ 92%] Building CXX object usd_from_gltf/CMakeFiles/usd_from_gltf.dir/usd_from_gltf.cc.o
[ 95%] Linking CXX executable usd_from_gltf
/usr/local/USD/lib/libusdUtils.so: undefined reference to `pxrInternal_v0_20__pxrReserved__::Sdf_Children<pxrInternal_v0_20__pxrReserved__::Sdf_VariantSetChildPolicy>::FindKey[abi:$
collect2: error: ld returned 1 exit status
usd_from_gltf/CMakeFiles/usd_from_gltf.dir/build.make:127: recipe for target 'usd_from_gltf/usd_from_gltf' failed
make[2]: *** [usd_from_gltf/usd_from_gltf] Error 1
CMakeFiles/Makefile2:331: recipe for target 'usd_from_gltf/CMakeFiles/usd_from_gltf.dir/all' failed
make[1]: *** [usd_from_gltf/CMakeFiles/usd_from_gltf.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

cmake /home/julien/usd_from_gltf -DCMAKE_INSTALL_PREFIX=/usr/local/usd_from_gltf -DCMAKE_PREFIX_PATH=/usr/local/usd_from_gltf -DUSD_DIR=/usr/local/USD
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/usd_from_gltf/build/usd_from_gltf

cmake --build . --config Release --target install --
[ 30%] Built target gltf
[ 40%] Built target common
[ 71%] Built target process
[ 88%] Built target convert
[ 90%] Linking CXX executable usd_from_gltf
/usr/local/USD/lib/libusdUtils.so: undefined reference to `pxrInternal_v0_20__pxrReserved__::Sdf_Children<pxrInternal_v0_20__pxrReserved__::Sdf_VariantSetChildPolicy>::FindKey[abi:$
collect2: error: ld returned 1 exit status
usd_from_gltf/CMakeFiles/usd_from_gltf.dir/build.make:127: recipe for target 'usd_from_gltf/usd_from_gltf' failed
make[2]: *** [usd_from_gltf/usd_from_gltf] Error 1
CMakeFiles/Makefile2:331: recipe for target 'usd_from_gltf/CMakeFiles/usd_from_gltf.dir/all' failed
make[1]: *** [usd_from_gltf/CMakeFiles/usd_from_gltf.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

Any idea how to solve this?

julienbfabre commented 4 years ago

Re-installing USD from scratch fixed it