Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Building Error] Failed to build USD - Arch Linux #1723

Closed
adro79 opened this issue Dec 18, 2021 · 4 comments
Closed

[Building Error] Failed to build USD - Arch Linux #1723

adro79 opened this issue Dec 18, 2021 · 4 comments

Comments

@adro79
Copy link

adro79 commented Dec 18, 2021

I'm failing to build USD in my Arch Linux system. My configuration is Python 3.9.9 and PySide2 5.15.2

Here's the last few lines before the error:

Consolidate compiler generated dependencies of target arch
[ 32%] Built target hdTiny_headerfiles
[ 32%] Built target usdRecursivePayloadsExample_headerfiles
[ 33%] Built target arch
Consolidate compiler generated dependencies of target tf
[ 39%] Built target tf
Consolidate compiler generated dependencies of target js
Consolidate compiler generated dependencies of target garch
[ 40%] Built target js
[ 41%] Built target garch
Consolidate compiler generated dependencies of target _garch
[ 41%] Built target _garch
Consolidate compiler generated dependencies of target gf
[ 44%] Built target gf
Consolidate compiler generated dependencies of target trace
Consolidate compiler generated dependencies of target cameraUtil
[ 45%] Built target trace
[ 45%] Built target cameraUtil
Consolidate compiler generated dependencies of target _tf
Consolidate compiler generated dependencies of target work
Consolidate compiler generated dependencies of target _trace
Consolidate compiler generated dependencies of target _cameraUtil
[ 45%] Building CXX object pxr/base/work/CMakeFiles/work.dir/singularTask.cpp.o
[ 45%] Built target _trace
[ 45%] Built target _cameraUtil
[ 46%] Built target _tf
Consolidate compiler generated dependencies of target vt
[ 46%] Built target vt
Consolidate compiler generated dependencies of target pxOsd
[ 47%] Built target pxOsd
[ 47%] Building CXX object pxr/imaging/pxOsd/CMakeFiles/_pxOsd.dir/wrapMeshTopology.cpp.o
[ 48%] Building CXX object pxr/imaging/pxOsd/CMakeFiles/_pxOsd.dir/module.cpp.o
[ 48%] Building CXX object pxr/imaging/pxOsd/CMakeFiles/_pxOsd.dir/wrapSubdivTags.cpp.o
[ 48%] Building CXX object pxr/imaging/pxOsd/CMakeFiles/_pxOsd.dir/wrapTokens.cpp.o
[ 48%] Building CXX object pxr/imaging/pxOsd/CMakeFiles/_pxOsd.dir/wrapMeshTopologyValidation.cpp.o
Consolidate compiler generated dependencies of target _vt
In file included from /home/adro/Applications/USD/pxr/base/work/singularTask.cpp:24:
/home/adro/Applications/USD/pxr/base/work/singularTask.h: In lambda function:
/home/adro/Applications/USD/pxr/base/work/singularTask.h:111:21: error: ‘size_t’ was not declared in this scope; did you mean ‘std::size_t’?
  111 |                     size_t old = count;
      |                     ^~~~~~
      |                     std::size_t
In file included from /usr/include/c++/11.1.0/bits/atomic_base.h:35,
                 from /usr/include/c++/11.1.0/atomic:41,
                 from /home/adro/Applications/USD/pxr/base/work/singularTask.h:31,
                 from /home/adro/Applications/USD/pxr/base/work/singularTask.cpp:24:
/usr/include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:280:33: note: ‘std::size_t’ declared here
  280 |   typedef __SIZE_TYPE__         size_t;
      |                                 ^~~~~~
In file included from /home/adro/Applications/USD/pxr/base/work/singularTask.cpp:24:
/home/adro/Applications/USD/pxr/base/work/singularTask.h:113:56: error: ‘old’ was not declared in this scope
  113 |                         !count.compare_exchange_strong(old, 0));
      |                                                        ^~~
make[2]: *** [pxr/base/work/CMakeFiles/work.dir/build.make:191: pxr/base/work/CMakeFiles/work.dir/singularTask.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2534: pxr/base/work/CMakeFiles/work.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 49%] Built target _vt
Consolidate compiler generated dependencies of target _gf
[ 50%] Built target _gf
[ 50%] Linking CXX shared library _pxOsd.so
[ 50%] Built target _pxOsd
make: *** [Makefile:136: all] Error 2

ERROR: Failed to run 'cmake --build . --config Release --target install -- -j16'
See /home/adro/Applications/USD/build/build/USD/log.txt for more details.

Here's the full log

I had some issues like this in Windows as well, related to setting the env vars incorrectly. I don't know if it's the same problem since I'm new to Linux.

Thanks in advance.

@meshula
Copy link
Member

meshula commented Dec 18, 2021

As a local workaround while awaiting a fix, you can add a using statement to the header to hoist size_t into the global namespace. Another workaround is to #include <stdint.h> since USD uses cstdint which has the std namespacing of this type.

@meshula
Copy link
Member

meshula commented Dec 18, 2021

PS, duplicate of #1721

@jilliene
Copy link

jilliene commented Jan 3, 2022

Filed as internal issue #USD-7094

@sunyab
Copy link
Contributor

sunyab commented Apr 22, 2022

Closing this out, this should be addressed in the latest 22.05 release.

@sunyab sunyab closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants