[MacPorts] #65501: py-pytorch @1.12.0: builds failing for big sur and monterey: error: unknown warning option '-Wno-unused-but-set-variable'
MacPorts
noreply at macports.org
Sun Jul 17 21:02:03 UTC 2022
#65501: py-pytorch @1.12.0: builds failing for big sur and monterey: error: unknown
warning option '-Wno-unused-but-set-variable'
-------------------------+-----------------------------
Reporter: mascguy | Owner: mascguy
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords: bigsur monterey
Port: py-pytorch |
-------------------------+-----------------------------
Changes (by mascguy):
* status: new => assigned
* owner: (none) => mascguy
Comment:
Tracked by upstream issue:
[https://github.com/pytorch/pytorch/issues/74805 74805 - Failure to build
with clang because of unknown warning option error]
Apparently Clang 13 did recognize this warning originally, but it was
ultimately reverted:
https://reviews.llvm.org/rG6d8d1338629ceeaf6f56dc9eabc72e1a63f05169
In any case, the reporter suggested the following patch. Assuming it works
locally for Big Sur and Monterey, I'll commit the fix.
{{{
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index ba2e71211f..f68cec720d 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -818,7 +818,7 @@ if(USE_FBGEMM)
set_property(TARGET fbgemm PROPERTY POSITION_INDEPENDENT_CODE ON)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0.0)
# See https://github.com/pytorch/pytorch/issues/74352
- target_compile_options(asmjit PRIVATE -Wno-deprecated-copy -Wno-
unused-but-set-variable)
+ target_compile_options(asmjit PRIVATE -Wno-deprecated-copy)
endif()
endif()
}}}
--
Ticket URL: <https://trac.macports.org/ticket/65501#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list