New Issue: [Bug]: Cannot build Chapel in default configuration on Alpine Linux

28018, "jabraham17", "[Bug]: Cannot build Chapel in default configuration on Alpine Linux", "2025-11-05T23:03:37Z"

While trying to build the default Chapel config to test another feature, I found a compatibility issue with Alpine

/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/cloud-user/chapel/third-party/jemalloc/install/host/linux64-x86_64-gnu/lib/libjemalloc.a(jemalloc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make[6]: *** [compiler/CMakeFiles/chpl.dir/build.make:2898: /home/cloud-user/chapel/bin/linux64-x86_64/chpl] Error 1
make[5]: *** [CMakeFiles/Makefile2:1027: compiler/CMakeFiles/chpl.dir/all] Error 2
make[4]: *** [CMakeFiles/Makefile2:1034: compiler/CMakeFiles/chpl.dir/rule] Error 2
make[3]: *** [Makefile:182: chpl] Error 2
make[2]: *** [Makefile:206: /home/cloud-user/chapel/bin/linux64-x86_64/chpl] Error 2
make[1]: *** [Makefile:97: compiler] Error 2
make: *** [Makefile:60: comprt] Error 2

I think the reason we don't hit this in our nightly portability testing is that we normally use the quickstart config, not the default config. This issue is with the bundled host jemalloc

CHPL_HOST_PLATFORM: linux64
CHPL_HOST_COMPILER: gnu
  CHPL_HOST_CC: gcc
  CHPL_HOST_CXX: g++
CHPL_HOST_ARCH: x86_64
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
  CHPL_TARGET_CC: /usr/lib/llvm20/bin/clang-20 --gcc-install-dir=/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0
  CHPL_TARGET_CXX: /usr/lib/llvm20/bin/clang++ --gcc-install-dir=/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0
  CHPL_TARGET_LD: /usr/lib/llvm20/bin/clang++ --gcc-install-dir=/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: system
CHPL_HOST_MEM: jemalloc
  CHPL_HOST_JEMALLOC: bundled
CHPL_TARGET_MEM: jemalloc
  CHPL_TARGET_JEMALLOC: bundled
CHPL_ATOMICS: cstdlib
CHPL_GMP: none
CHPL_HWLOC: bundled
  CHPL_HWLOC_PCI: disable
CHPL_RE2: none
CHPL_LLVM: system
  CHPL_LLVM_SUPPORT: system
  CHPL_LLVM_CONFIG: llvm-config-20
  CHPL_LLVM_VERSION: 20
CHPL_AUX_FILESYS: none
CHPL_LIB_PIC: none
CHPL_SANITIZE: none
CHPL_SANITIZE_EXE: none
> gcc --version
gcc (Alpine 14.2.0) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.