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

Error building #1627

Open
johnnynunez opened this issue Feb 4, 2025 · 3 comments
Open

Error building #1627

johnnynunez opened this issue Feb 4, 2025 · 3 comments

Comments

@johnnynunez
Copy link

home/runner/work/CoACD/CoACD/build-linux/_deps/tbb-src/src/tbb/concurrent_monitor.h:456:24,
inlined from ‘void tbb::detail::r1::clear_address_waiter_table()’ at /home/runner/work/CoACD/CoACD/build-linux/_deps/tbb-src/src/tbb/address_waiter.cpp:60:40:
/usr/include/c++/13/bits/atomic_base.h:481:25: error: ‘void __atomic_store_1(volatile void*, unsigned char, int)’ writing 1 byte into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
481 | __atomic_store_n(&_M_i, __i, int(__m));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
gmake[3]: *** [_deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/build.make:79: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:5030: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:3654: CMakeFiles/main.dir/rule] Error 2

https://github.com/johnnynunez/CoACD/actions/runs/13141832579/job/36670636171

@dnmokhov
Copy link
Contributor

dnmokhov commented Feb 4, 2025

Thank you for reporting this, @johnnynunez.

I have been able to reproduce this error when compiling static release version of oneTBB with GCC 12-14:

cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release

@happikin
Copy link

As of today I made latest clone of the repo and checked the latest commit id hash
b21eebe
ran the following commands to double check
git rev-parse HEAD
git ls-remote https://github.com/uxlfoundation/oneTBB | grep HEAD

After running the command suggested by @dnmokhov I could successfully build the static lib with GCC 11.4.0 on ubuntu 22.04 kernel 6.8.0-51-generic.
This might mean the problem has been fixed but I still get the following warning message while running cmake

CMake Warning at CMakeLists.txt:145 (message):
  You are building oneTBB as a static library.  This is highly discouraged
  and such configuration is not supported.  Consider building a dynamic
  library to avoid unforeseen issues.

@isaevil
Copy link
Contributor

isaevil commented Feb 17, 2025

As of today I made latest clone of the repo and checked the latest commit id hash b21eebe ran the following commands to double check git rev-parse HEAD git ls-remote https://github.com/uxlfoundation/oneTBB | grep HEAD

After running the command suggested by @dnmokhov I could successfully build the static lib with GCC 11.4.0 on ubuntu 22.04 kernel 6.8.0-51-generic. This might mean the problem has been fixed but I still get the following warning message while running cmake

CMake Warning at CMakeLists.txt:145 (message):
  You are building oneTBB as a static library.  This is highly discouraged
  and such configuration is not supported.  Consider building a dynamic
  library to avoid unforeseen issues.

@happikin The warning is correct. We don't encourage people to use TBB as a static library since one of the key features of oneTBB (single shared thread-pool in the application) won't work as expected anymore.

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