icu4c 78.1: attribute 'dllexport' cannot be applied to a deleted function

27 views
Skip to first unread message

Benjamin Gilbert

unread,
Dec 5, 2025, 11:11:04 PM (6 days ago) Dec 5
to icu-s...@unicode.org
Hi,

icu4c 78.1 fails to build on clang-cl with the error:

../subprojects/icu/source/common\umutex.h(210,18): error: attribute
'dllexport' cannot be applied to a deleted function

I've pasted more logs below. icu4c 77.1 builds without issue. I'm
building with the Meson wrap
(https://github.com/mesonbuild/wrapdb/pull/2546), so this is
potentially an issue with compiler flags, but it seems likely that
commit 5c95e37c6a is buggy.

I tried reporting an issue but Jira says I'm not authorized to do that.

Best,
--Benjamin Gilbert


"clang-cl" "-Isubprojects\icu\source\common\icuuc-78.dll.p"
"-Isubprojects\icu\source\common" "-I..\subprojects\icu\source\common"
"/MDd" "/nologo" "/showIncludes" "/utf-8" "/W2" "/EHsc" "/std:c++17"
"/permissive-" "/Od" "/Z7" "-DU_PLATFORM_USES_ONLY_WIN32_API"
"-DWIN32" "-DWIN64" "-D_MBCS" "-D_CRT_SECURE_NO_WARNINGS"
"-DWINVER=0x0601" "-D_WIN32_WINNT=0x0601" "-DU_ATTRIBUTE_DEPRECATED="
"-DU_COMMON_IMPLEMENTATION"
"/Fdsubprojects\icu\source\common\icuuc-78.dll.p\brkiter.cpp.pdb"
/Fosubprojects/icu/source/common/icuuc-78.dll.p/brkiter.cpp.obj "/c"
../subprojects/icu/source/common/brkiter.cpp
In file included from ../subprojects/icu/source/common/brkiter.cpp:37:
../subprojects/icu/source/common\umutex.h(210,18): error: attribute
'dllexport' cannot be applied to a deleted function
210 | U_COMMON_API UMutex(const UMutex& other) = delete;
../subprojects/icu/source/common\umutex.h(211,26): error: attribute
'dllexport' cannot be applied to a deleted function
211 | U_COMMON_API UMutex& operator=(const UMutex& other) = delete;
../subprojects/icu/source/common\umutex.h(212,24): error: attribute
'dllexport' cannot be applied to a deleted function
212 | U_COMMON_API void* operator new(size_t) = delete;
3 errors generated.

Fredrik Roubert

unread,
Dec 10, 2025, 4:13:53 AM (2 days ago) Dec 10
to Benjamin Gilbert, icu-s...@unicode.org
On Sat, Dec 6, 2025 at 5:11 AM Benjamin Gilbert <bgil...@backtick.net> wrote:

> icu4c 78.1 fails to build on clang-cl with the error:
>
> ../subprojects/icu/source/common\umutex.h(210,18): error: attribute
> 'dllexport' cannot be applied to a deleted function

None of the compilers currently run on the ICU GitHub CI report
anything at all about this, but I don't find it unreasonable to not
allow such an attribute on a deleted function so I have no reason to
doubt that clang-cl is right in treating this as an error and none of
the compilers that are being run on the CI have any problem with
removing the attribute, so I've now sent this PR for review to do
that:

https://github.com/unicode-org/icu/pull/3794

--
Fredrik Roubert
rou...@google.com
Reply all
Reply to author
Forward
0 new messages