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

Compilation error (Werror) due to ignoring return value. #10449

Open
xkszltl opened this issue Jan 25, 2025 · 2 comments · May be fixed by #10450
Open

Compilation error (Werror) due to ignoring return value. #10449

xkszltl opened this issue Jan 25, 2025 · 2 comments · May be fixed by #10450
Labels

Comments

@xkszltl
Copy link

xkszltl commented Jan 25, 2025

Describe the bug

Issue released in 1.18.0 tag introduced by:

#33 157.6 ucs/arch/test_x86_64.cc: In member function ‘void test_arch::nt_buffer_transfer_test(ucs_arch_memcpy_hint_t)’:
#33 157.6 ucs/arch/test_x86_64.cc:85:23: error: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
#33 157.6    85 |         posix_memalign((void **)&test_window_src, align, total_size);
#33 157.6       |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#33 157.6 ucs/arch/test_x86_64.cc:86:23: error: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
#33 157.6    86 |         posix_memalign((void **)&test_window_dst, align, total_size);
#33 157.6       |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#33 157.6 ucs/arch/test_x86_64.cc:87:23: error: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
#33 157.6    87 |         posix_memalign((void **)&dup, align, total_size);
#33 157.6       |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#33 157.6 cc1plus: all warnings being treated as errors

posix_memalign((void **)&test_window_src, align, total_size);
posix_memalign((void **)&test_window_dst, align, total_size);
posix_memalign((void **)&dup, align, total_size);

Steps to Reproduce

  • Command line
    • https://github.com/xkszltl/Roaster/blob/2ef538860fb3a12719ee149b03054af9041b6e9e/pkgs/ucx.sh#L37-L59
    •   ./autogen.sh
        ./configure                     \
            --disable-assertions        \
            --disable-logging           \
            --disable-params-check      \
            --enable-backtrace-detail   \
            --enable-compiler-opt=3     \
            --enable-devel-headers      \
            --enable-doxygen-doc=no     \
            --enable-doxygen-dot=no     \
            --enable-doxygen-man=no     \
            --enable-examples           \
            --enable-gtest              \
            --enable-mt                 \
            --enable-ucg=no             \
            --prefix="$INSTALL_ABS"     \
            --with-avx                  \
            "$(sed 's/\(..*\)/--with-cuda=\1/' <<< "$cuda_root")"   \
            --with-gdrcopy=no           \
            "$(javac -version > /dev/null && echo '--with-java')"
      
        make all docs -j$(nproc)
        make install -j
  • UCX version used (from github branch XX or release YY) + UCX configure flags (can be checked by ucx_info -v)
    • v1.18.0
    • See configuration in commands.

Setup and versions

  • OS version (e.g Linux distro) + CPU architecture (x86_64/aarch64/ppc64le/...)
    • Ubuntu 22.04, x86_64.
@xkszltl xkszltl added the Bug label Jan 25, 2025
xkszltl added a commit to xkszltl/ucx that referenced this issue Jan 25, 2025
@xkszltl xkszltl linked a pull request Jan 25, 2025 that will close this issue
@yosefe
Copy link
Contributor

yosefe commented Jan 25, 2025

@edgargabriel @arun-chandran-edarath can you pls take a look? Ideally we'd like to add a test that reproduces the issue to builds.sh and backport the fix to v1.18.x

@arun-chandran-edarath
Copy link
Contributor

@yosefe I will take a look. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants