Skip to content
New issue

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

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

Already on GitHub? # to your account

build error on ubuntu 22.04, gcc #1396

Closed
podd0 opened this issue Dec 6, 2022 · 3 comments · Fixed by #1398
Closed

build error on ubuntu 22.04, gcc #1396

podd0 opened this issue Dec 6, 2022 · 3 comments · Fixed by #1398

Comments

@podd0
Copy link
Contributor

podd0 commented Dec 6, 2022

I followed the instructions: "mkdir build; cd build; cmake ..; cmake --build ." and got this error.:

/home/andrea/yocto-gl/libs/yocto/yocto_sceneio.cpp: In lambda function:
/home/andrea/yocto-gl/libs/yocto/yocto_sceneio.cpp:228:25: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  228 |       std::this_thread::sleep_for(std::chrono::milliseconds(context.delay));
      |                         ^~~~~~~~~
gmake[2]: *** [libs/yocto/CMakeFiles/yocto.dir/build.make:174: libs/yocto/CMakeFiles/yocto.dir/yocto_sceneio.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:510: libs/yocto/CMakeFiles/yocto.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

I looked up the error online and tried putting #define _GLIBCXX_USE_NANOSLEEP at the start of yocto_sceneio.cpp, but still got the same error

@podd0 podd0 changed the title build error on ubuntu, gcc build error on ubuntu 22.04, gcc Dec 6, 2022
@Metgraph
Copy link
Contributor

Metgraph commented Dec 8, 2022

try to include thread library in yocto_sceneio.cpp

@podd0
Copy link
Contributor Author

podd0 commented Dec 8, 2022

it worked!

@xelatihy
Copy link
Owner

xelatihy commented Dec 8, 2022

Ok, thanks. I'll push the fix on my end too.

@xelatihy xelatihy closed this as completed Dec 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants