Skip to content

Commit

Permalink
ci: disable __thread support for Windows msys2 build
Browse files Browse the repository at this point in the history
Our Windows msys2 build is now broken after AppVeyor's recent image
update from clang/lld 15.0.7-3 to 16.0.0-1.

Here is the error:

    CC unittests/oslib/strcasestr.o
    CC unittests/oslib/strsep.o
  LINK fio
ld.lld: error: undefined symbol: static_tv_valid
>>> referenced by gettime.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Rishabh Shukla investigated and found that clang + ld builds
successfully. So the problem seems to be with lld 16.0.0-1.

Until we find the root cause let's just disable __thread support on
msys2 builds.

Link: axboe#1559
Suggested-by: Rishabh Shukla <rishabh.sh@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
  • Loading branch information
vincentkfu committed Apr 19, 2023
1 parent 7624d58 commit 9bee508
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
matrix:
- ARCHITECTURE: x64
CC: clang
CONFIGURE_OPTIONS: --enable-pdb
CONFIGURE_OPTIONS: --enable-pdb --disable-tls
DISTRO: msys2
# Skip 32 bit clang build
# - ARCHITECTURE: x86
Expand Down
7 changes: 6 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ for opt do
;;
--seed-buckets=*) seed_buckets="$optarg"
;;
--disable-tls) tls_check="no"
;;
--help)
show_help="yes"
;;
Expand Down Expand Up @@ -313,6 +315,7 @@ if test "$show_help" = "yes" ; then
echo "--disable-dfs Disable DAOS File System support even if found"
echo "--enable-asan Enable address sanitizer"
echo "--seed-buckets= Number of seed buckets for the refill-buffer"
echo "--disable-tls Disable __thread local storage"
exit $exit_val
fi

Expand Down Expand Up @@ -1549,7 +1552,8 @@ print_config "socklen_t" "$socklen_t"
if test "$tls_thread" != "yes" ; then
tls_thread="no"
fi
cat > $TMPC << EOF
if test "$tls_check" != "no"; then
cat > $TMPC << EOF
#include <stdio.h>
static __thread int ret;
int main(int argc, char **argv)
Expand All @@ -1560,6 +1564,7 @@ EOF
if compile_prog "" "" "__thread"; then
tls_thread="yes"
fi
fi
print_config "__thread" "$tls_thread"

##########################################
Expand Down

0 comments on commit 9bee508

Please sign in to comment.