From 1725b9d80229df4741d8089ba0011a8911e472d2 Mon Sep 17 00:00:00 2001 From: Evgenii Ilichev Date: Thu, 24 Apr 2025 14:53:24 +0000 Subject: [PATCH] [IJI-2420] compile on musl linking statically GitOrigin-RevId: bd3fd9b48e25bda95dae6719fa62cde553cf7968 --- native/fsNotifier/linux/make.sh | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/native/fsNotifier/linux/make.sh b/native/fsNotifier/linux/make.sh index 9934efe3d5fa..e31e7a5c5d73 100755 --- a/native/fsNotifier/linux/make.sh +++ b/native/fsNotifier/linux/make.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. set -euo pipefail VER="${1:-}" @@ -8,17 +8,5 @@ if [ -z "${VER:-}" ]; then fi rm -f fsnotifier -${CC:-clang} -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"$VER\"" -std=c11 main.c inotify.c util.c -o fsnotifier +${CC:-clang} -static -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"$VER\"" -std=c11 main.c inotify.c util.c -o fsnotifier chmod 755 fsnotifier - -# ensuring supported builds are compatible with RHEL/CentOS 7 -MAX_GLIBC_VERSION="2.17" -ARCH=$(uname -m) -if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ] || [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then - glibc_version="$(objdump -x fsnotifier | grep -o "GLIBC_.*" | sort | uniq | cut -d _ -f 2 | sort -V | tail -n 1)" - newest=$(printf "%s\n%s\n" "$MAX_GLIBC_VERSION" "$glibc_version" | sort -V | tail -n 1) - if [ "$newest" != "$MAX_GLIBC_VERSION" ]; then - echo "ERROR: fsnotifier uses glibc version $glibc_version which is newer than $MAX_GLIBC_VERSION" - exit 1 - fi -fi