-
Notifications
You must be signed in to change notification settings - Fork 131
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
[Issue]: Tests fail to build #1455
Comments
Hi @IMbackK. Internal ticket has been created to investigate your issue. Thanks! |
Hi @IMbackK , which build method you use? Manual build or docker? |
hi @huanrwan-amd i did a manual build. Possibly this builds for you on other systems as iomanip is indirectly included by some system header, this however can not be relied on. |
Hi @IMbackK , thank you for your message. Since the "iomanip" header is part of the C++ Standard Library(https://en.cppreference.com/w/cpp/standard_library) . This is usually linked by development environment. Highly suggests using docker to build rccl. You can refer: |
In c++ you must #include the header where the declaration of the function you want to use resides. Yes the iomanip header is part of the stl and you do link against libstdc++ so an implementation of std::setfill is available to the linker, however that dose not absolve you of the responsibility of #includeing the header. pageing @nileshnegi @wenkaidu as code owners. |
Hi @IMbackK can you provide a detailed instruction on your manual build steps and error logs? I tried both manual and docker methods. It works OK on my side. Thanks. |
@huanrwan-amd look this problem is trivial to understand from static analysis. using gcc's -H option you can have gcc spit out all the headers that are directly and indriectly included So for for my system this looks like this:
as you can see there is no iomanip in the docker image it looks like this
As you can see iomanip is included because The reason for this works for you but not for me is that between gtest 1.12 and gtest 1.15 the iomanip include was removed from gtest-internal.h.But this allways was a bug you cant rely on some internal header of some libary includeing iomanip for you |
Hi, we encountered the same issue (compilation works with gtest 1.14, fails with gtest 1.15.2) and indeed proposed fix solved the issue: --- a/test/common/TestBed.cpp
+++ b/test/common/TestBed.cpp
@@ -4,6 +4,7 @@
* See LICENSE.txt for license information
************************************************************************/
#include <unistd.h>
+#include <iomanip>
#include "TestBed.hpp"
#include <rccl/rccl.h>
|
Problem Description
This projects test fail to build as https://github.com/ROCm/rccl/blob/develop/test/common/TestBed.cpp uses std::setfill and std::setw Which are part of iomanip but iomanip is neither directly nor indirectly included.
gcc (GCC) 14.2.1 20240910
Operating System
any
CPU
any build issue
GPU
any build issue
ROCm Version
ROCm 6.3.0, ROCm 6.2.4
ROCm Component
rccl
Steps to Reproduce
build with -DBUILD_TESTS=ON
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: