#1033031 Bug with Unixodbc-dev Install missing/relocated lib files when installing with sqlsrv

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
SLADE, MARK
Date:
2023-03-16 01:03:06 UTC
Severity:
normal
#1033031#5
Date:
2023-03-15 16:13:11 UTC
From:
To:
I am running a Dockerfile which installs MS SQL Server.
This Dockerfile build has been working since Feb 9th, however, all other attempts afterwards fails at building when it gets to RUN pecl install sqlsrv.
------------------------------------------------------------------------------------------
FROM php:8.0.17-apache

RUN apt-get update
RUN apt-get install -y gnupg2
RUN curl -s -N https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl -s -N https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list

RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql18
RUN ACCEPT_EULA=Y apt-get install -y mssql-tools18
RUN echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
RUN . ~/.bashrc
RUN apt-get install -y unixodbc-dev
RUN apt-get install -y libgssapi-krb5-2

RUN apt-get update
RUN apt-get -y install sudo

RUN pecl install sqlsrv
RUN pecl install pdo_sqlsrv
RUN docker-php-ext-enable sqlsrv pdo_sqlsrv

RUN mkdir -p /var/log/PHP

COPY src/ /var/www/html/
RUN chmod -R 777 /var/www/html/
RUN chmod -R 777 /var/log/PHP/
EXPOSE 80
EXPOSE 443
------------------------------------------------------------------------------------------

The error that comes back talks about missing lib files (libodbc.la and libltdl.la).

2023-02-23T15:50:59.8005402Z #24 19.49 libtool: link: warning: library `/usr/lib/x86_64-linux-gnu/libodbc.la' was moved.
2023-02-23T15:50:59.8005964Z #24 19.50 grep: /usr/lib/x86_64-linux-gnu/libltdl.la: No such file or directory
2023-02-23T15:50:59.8006347Z #24 19.50 /bin/sed: can't read /usr/lib/x86_64-linux-gnu/libltdl.la: No such file or directory
2023-02-23T15:50:59.8006751Z #24 19.50 libtool: link: `/usr/lib/x86_64-linux-gnu/libltdl.la' is not a valid libtool archive
2023-02-23T15:50:59.8007019Z #24 19.50 make: *** [Makefile:238: sqlsrv.la] Error 1
2023-02-23T15:50:59.8007268Z #24 19.50 ERROR: `make' failed
2023-02-23T15:51:00.6950174Z #24 ERROR: process "/bin/sh -c pecl install sqlsrv" did not complete successfully: exit code: 1

I've attached the full logs to this email.

This build had no issue until after Feb 9th.

The current unixodbc-dev version used is 2.3.11-1.

Need fix/patch for these missing files (libodbc.la and libltdl.la) in order to build successfully.