[gettext-libintl] Build error on x64-linux-musl
Dafyh opened this issue · comments
Package: gettext-libintl:x64-linux@0.22.5#1
Host Environment
- Host: x64-linux
- Compiler: GNU 13.2.1
- vcpkg-tool version: 2024-06-10-02590c430e4ed9215d27870138c2e579cc338772
vcpkg-scripts version: 101cc9a 2024-06-30 (3 hours ago)
To Reproduce
vcpkg install gettext-libintl:x64-linux
Failure logs
CMake Error at ports/gettext-libintl/portfile.cmake:4 (message):
When targeting Linux, `libintl.h` is expected to come from the C Runtime
Library (glibc). Please use "sudo apt-get install libc-dev" or the
equivalent to install development files.
Call Stack (most recent call first):
scripts/ports.cmake:192 (include)
error: building gettext-libintl:x64-linux failed with: BUILD_FAILED
Additionnal context
Hello 👋,
I am trying to compile libheif
in a Docker container using the node:lts-alpine
image, but I am encountering an issue during the installation of gettext
. To reproduce the bug, you can use the following Dockerfile
:
FROM node:lts-alpine
ENV VCPKG_FORCE_SYSTEM_BINARIES 1
RUN apk --no-cache add \
g++ \
gcc \
git \
zip \
tar \
wget \
nasm \
cmake \
make \
unzip \
ninja \
bison \
libgcc \
python3 \
libstdc++ \
libc-dev \
linux-headers \
build-base \
curl && \
ln -sf python3 /usr/bin/python
RUN git clone https://github.com/microsoft/vcpkg.git && \
./vcpkg/bootstrap-vcpkg.sh && \
./vcpkg/vcpkg install gettext-libintl:x64-linux
Thanks.
Please install libc
as below:
Please use "sudo apt-get install libc-dev" or the
equivalent to install development files.
Hello @LilyWangLL,
Thank you for the feedback, but I cannot use apt-get
because I am using an Alpine Linux
container. In my Dockerfile, I have already included an apk add libc-dev
.
I am using an
Alpine Linux
IIRC Alpine uses musl libc, not glibc, and that libc doesn't include intl capabilities. There should be separate packages providing gettext libintl.
Hello, I resolved the issue by indeed adding additional packages. I'm sharing my Dockerfile here in case it helps.
Thank you.
FROM node:16-alpine
ENV VCPKG_FORCE_SYSTEM_BINARIES 1
RUN apk --no-cache add \
g++ \
gcc \
git \
zip \
tar \
wget \
nasm \
cmake \
make \
unzip \
bison \
libgcc \
libstdc++ \
gettext-dev \
glib-dev \
bash \
py3-setuptools \
linux-headers \
build-base \
curl && \
ln -sf python3 /usr/bin/python
RUN git clone https://github.com/ninja-build/ninja.git /tmp/ninja \
&& cd /tmp/ninja \
&& git checkout v1.10.2 \
&& cmake -Bbuild-cmake -H. \
&& cmake --build build-cmake \
&& cp build-cmake/ninja /usr/local/bin/ninja \
&& rm -rf /tmp/ninja
RUN git clone https://github.com/microsoft/vcpkg.git && \
./vcpkg/bootstrap-vcpkg.sh && \
./vcpkg/vcpkg install libheif
So the Alpine package name is: gettext-dev
.