[PR #133] [MERGED] Fix build error "lvalue required as unary '&' operand" #259

Closed
opened 2026-10-26 21:15:27 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/133
Author: @danthe3rd
Created: 7/24/2025
Status: ✅ Merged
Merged: 7/28/2025
Merged by: @LyricZhao

Base: main ← Head: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 csrc/utils/system.hpp (+2 -2)

📄 Description

My build was failing with this error - this change fixes it

 /home/XXXX/ENV/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/XXXX/ENV/include -fPIC -O2 -isystem /home/XXXX/ENV/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/XXXX/ENV/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/XXXX/ENV/include -fPIC -I/home/htouvron/cuda/cuda-12.9//include -Ideep_gemm/include -Ithird-party/cutlass/include -Ithird-party/fmt/include -I/home/XXXX/ENV/lib/python3.10/site-packages/torch/include -I/home/XXXX/ENV/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/XXXX/ENV/include/python3.10 -c csrc/python_api.cpp -o build/temp.linux-x86_64-cpython-310/csrc/python_api.o -std=c++20 -O3 -fPIC -Wno-psabi
  In file included from /home/XXXX/ENV/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:42,
                   from /home/XXXX/ENV/lib/gcc/x86_64-conda-linux-gnu/12.3.0/include/c++/cstdlib:75,
                   from /home/XXXX/ENV/lib/gcc/x86_64-conda-linux-gnu/12.3.0/include/c++/stdlib.h:36,
                   from /home/XXXX/ENV/include/python3.10/Python.h:34,
                   from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:274,
                   from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/attr.h:13,
                   from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/detail/class.h:12,
                   from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/pybind11.h:12,
                   from csrc/python_api.cpp:1:
  csrc/jit/../utils/system.hpp: In function 'std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > deep_gemm::call_external_command(std::string)':
  csrc/jit/../utils/system.hpp:41:46: error: lvalue required as unary '&' operand
     41 |     const auto exit_code = WEXITSTATUS(pclose(pipe.release()));
        |                                              ^
  In file included from csrc/jit/compiler.hpp:12,
                   from csrc/python_api.cpp:4:
  csrc/jit/../utils/system.hpp:42:30: error: could not convert '{exit_code, output}' from '<brace-enclosed initializer list>' to 'std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
     42 |     return {exit_code, output};
        |                              ^
        |                              |
        |                              <brace-enclosed initializer list>
  error: command '/home/XXXX/ENV/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/133 **Author:** [@danthe3rd](https://github.com/danthe3rd) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 7/28/2025 **Merged by:** [@LyricZhao](https://github.com/LyricZhao) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`12818fa`](https://github.com/deepseek-ai/DeepGEMM/commit/12818faa870be1c754bdc9b14a7a897112cf95b3) Update system.hpp ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `csrc/utils/system.hpp` (+2 -2) </details> ### 📄 Description My build was failing with this error - this change fixes it ``` /home/XXXX/ENV/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/XXXX/ENV/include -fPIC -O2 -isystem /home/XXXX/ENV/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/XXXX/ENV/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/XXXX/ENV/include -fPIC -I/home/htouvron/cuda/cuda-12.9//include -Ideep_gemm/include -Ithird-party/cutlass/include -Ithird-party/fmt/include -I/home/XXXX/ENV/lib/python3.10/site-packages/torch/include -I/home/XXXX/ENV/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/XXXX/ENV/include/python3.10 -c csrc/python_api.cpp -o build/temp.linux-x86_64-cpython-310/csrc/python_api.o -std=c++20 -O3 -fPIC -Wno-psabi In file included from /home/XXXX/ENV/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:42, from /home/XXXX/ENV/lib/gcc/x86_64-conda-linux-gnu/12.3.0/include/c++/cstdlib:75, from /home/XXXX/ENV/lib/gcc/x86_64-conda-linux-gnu/12.3.0/include/c++/stdlib.h:36, from /home/XXXX/ENV/include/python3.10/Python.h:34, from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:274, from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/attr.h:13, from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/detail/class.h:12, from /home/XXXX/ENV/lib/python3.10/site-packages/torch/include/pybind11/pybind11.h:12, from csrc/python_api.cpp:1: csrc/jit/../utils/system.hpp: In function 'std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > deep_gemm::call_external_command(std::string)': csrc/jit/../utils/system.hpp:41:46: error: lvalue required as unary '&' operand 41 | const auto exit_code = WEXITSTATUS(pclose(pipe.release())); | ^ In file included from csrc/jit/compiler.hpp:12, from csrc/python_api.cpp:4: csrc/jit/../utils/system.hpp:42:30: error: could not convert '{exit_code, output}' from '<brace-enclosed initializer list>' to 'std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >' 42 | return {exit_code, output}; | ^ | | | <brace-enclosed initializer list> error: command '/home/XXXX/ENV/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:15:27 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#259
No description provided.