-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ada_language_server: /lib64/libc.so.6: version `GLIBC_2.28' not found" on CentOS 7 #1176
Comments
we build extension and ada_language_server on ubuntu 20.04 (the oldest provided by github action) that has glibc 2.31. That's why it doesn't work on glibc 2.17. As a workaround, I can suggest you to build ALS from sources, if you has gcc 13.2 for your OS. |
Compiling from source seems non-trivial as it requires quite a few dependencies and there is no automated way to get them (or I missed it). Previous version of the VSCode Ada extension, v23.0.3 worked on CentOS 7. It seems that only this one function from glibc is breaking it
|
Building from sources is not so hard, if you use my custom alire index. With the community alire index you can build ada_language_server 23.0.0 which is more than a year old. What Ada compiler do you have on CentOS 7? I've found gcc-gnat-4.8.5 which too old. GNAT 13.2 from Alire doesn't work on CentOS 7. We use GitHub Action runners to build vscode extension releases. We switched to ubuntu-20.024 in Nov 2022, as GitHub deprecated ubuntu-18.04. |
We are a paid customer, we use GNAT PRO 24.0 (GCC 12.3.0). For now rolling back to Ada extension version 23.0.21 "solved" the issue. Just as a suggestion... GitHub Actions supports building in Docker and there is a |
GNAT Pro 24.0 should build ALS. Please open an issue at AdaCore customer support, if you are interested in further investigation. GitHub Actions doesn't have access to GNAT Pro compiler. Without working compiler I can't build ALS even in Docker. I've tried to build GCC 13, GCC 12 with the Alire provided script, but it fails. |
I tried the Alire way with both GNAT Pro 24.0 and a manually-built GNAT/GCC 12.3.0 and in both cases I run into all kinds of issues. The farthest I got was with this FROM centos:7
RUN sed -i 's/^tsflags=/#tsflags=/' /etc/yum.conf
RUN yum install -y epel-release && yum install -y man-db && yum update -y && yum install -y \
apr-devel \
autoconf \
autogen \
automake \
bison \
bzip2-devel \
doxygen \
expat-devel \
flex \
getopt \
gettext-devel \
git \
glibc-devel \
gmp-devel \
help2man \
libcurl-devel \
libffi-devel \
libmpc-devel \
libnl3-devel \
libnsl \
libnsl2-devel \
libpcap-devel \
libtool \
libusb-devel \
libxml2-devel \
libzstd-devel \
lz4-devel \
make \
minizip-devel \
mpfr-devel \
ncurses-devel \
openssl-devel \
patch \
pcre2-devel \
perl-CPAN \
perl-IPC-Cmd \
pkgconfig \
python2 \
python3-devel \
qt5-qtbase-devel \
qt5-qtmultimedia-devel \
qt5-qttools-devel \
readline-devel \
sqlite-devel \
texinfo \
tigervnc \
tigervnc-server \
transfig \
unzip \
wget \
which
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/sbin:/usr/bin:/sbin:/bin
RUN wget -O gnat-bin --progress=dot:mega "https://community.download.adacore.com/v1/f3a99d283f7b3d07293b2e1d07de00e31e332325?filename=gnat-2021-20210519-x86_64-linux-bin"
RUN wget "https://raw.githubusercontent.com/AdaCore/gnat_community_install_script/master/install_script.qs"
RUN vncserver :9 -SecurityTypes None -autokill
RUN chmod +x gnat-bin && DISPLAY=:9 ./gnat-bin --script install_script.qs --platform minimal InstallPrefix="/opt/gnat"
RUN wget -O- --progress=dot:mega "https://ftp.gnu.org/gnu/gcc/gcc-12.3.0/gcc-12.3.0.tar.gz" | tar xz
RUN export PATH=/opt/gnat/bin:$PATH && \
cd gcc-* && mkdir build && cd build && \
../configure --enable-languages=c,c++,ada,lto --disable-multilib && \
make -j$(nproc) && make install
RUN rm -rf /opt/gnat && echo -e "/usr/local/lib64\n/usr/local/lib" >/etc/ld.so.conf.d/local.conf && ldconfig
RUN wget -O- --progress=dot:mega "https://github.com/AdaCore/gprbuild/archive/refs/tags/v24.0.0.tar.gz" | tar xz
RUN wget -O- --progress=dot:mega "https://github.com/AdaCore/xmlada/archive/refs/tags/v24.0.0.tar.gz" | tar xz
RUN wget -O- --progress=dot:mega "https://github.com/AdaCore/gprconfig_kb/archive/refs/tags/v24.0.0.tar.gz" | tar xz
RUN mv gprbuild-* gprbuild && mv xmlada-* xmlada && mv gprconfig_kb-* gprconfig_kb && \
cd gprbuild && ./bootstrap.sh --with-xmlada=../xmlada --with-kb=../gprconfig_kb --prefix=./bootstrap && \
export PATH=$PWD/bootstrap/bin:$PATH && \
cd ../xmlada && ./configure && make -j$(nproc) && make install && \
cd ../gprbuild && make prefix=/usr/local setup && make -j$(nproc) && make install
RUN wget -O- --progress=dot:mega "https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.gz" | tar xz
RUN cd /binutils-* && ./configure && make -j$(nproc) && make install
RUN wget -O- --progress=dot:mega "https://ftp.gnu.org/gnu/gdb/gdb-14.1.tar.gz" | tar xz
RUN cd /gdb-* && ./configure && make -j$(nproc) && make install
RUN wget -O- "https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz" | tar xJ
RUN cd /gmp-* && ./configure --prefix=/usr --libdir=/usr/lib64 && make -j$(nproc) && make install
RUN echo $'prefix=/usr\n\
exec_prefix=${prefix}\n\
libdir=${prefix}/lib64\n\
includedir=${prefix}/include\n\
Name: gmp \n\
Description: gmp\n\
Version: 6.3.0\n\
Libs: -L${libdir} -lgmp\n\
Cflags: -I${includedir}\n\
' > /usr/share/pkgconfig/gmp.pc
RUN wget -O- --progress=dot:mega "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.4.tar.gz" | tar xz
RUN cd openssl-openssl-* && ./config shared --prefix=/usr/local/ && make -j$(nproc) && make install_sw
RUN echo -e "/usr/local/lib64\n/usr/local/lib\n" >/etc/ld.so.conf.d/local.conf && ldconfig
ENV LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
RUN wget -O- --progress=dot:mega "https://github.com/python/cpython/archive/refs/tags/v3.11.7.tar.gz"| tar xz
RUN cd cpython-* && ./configure && make -j$(nproc) && make install && pip3 install --upgrade pip virtualenv
RUN wget -Oalr.zip "https://github.com/alire-project/alire/releases/download/v1.2.2/alr-1.2.2-bin-x86_64-linux.zip" && \
unzip -d /usr/local/ alr.zip && rm -f alr.zip
RUN alr index --reset-community
RUN alr index --add git+https://github.com/reznikmm/als-alire-index.git --name als
RUN alr toolchain --select gnat_external gprbuild
RUN LIBRARY_TYPE=static STANDALONE=no alr -f -n get --build ada_language_server It fails on the last line:
Also, running |
Extension isn't starting on CentOS 7:
Any way to work around this issue?
I have to build my project for CentOS 7
Note: CentOS 7 has glibc 2.17
The text was updated successfully, but these errors were encountered: