diff --git a/10/Dockerfile b/10/Dockerfile index 99db003e8ca..ecf3b925645 100644 --- a/10/Dockerfile +++ b/10/Dockerfile @@ -141,9 +141,10 @@ RUN set -ex; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -# gcc installs .so files in /usr/local/lib64... +# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)... RUN set -ex; \ - echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \ +# this filename needs to sort higher than all the architecture filenames ("aarch64-...", "armeabi...", etc) + { echo '/usr/local/lib64'; echo '/usr/local/lib'; } > /etc/ld.so.conf.d/000-local-lib.conf; \ ldconfig -v # ensure that alternatives are pointing to the new compiler and that old one is no longer used diff --git a/11/Dockerfile b/11/Dockerfile index d77bce40e27..03492ac62ff 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -141,9 +141,10 @@ RUN set -ex; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -# gcc installs .so files in /usr/local/lib64... +# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)... RUN set -ex; \ - echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \ +# this filename needs to sort higher than all the architecture filenames ("aarch64-...", "armeabi...", etc) + { echo '/usr/local/lib64'; echo '/usr/local/lib'; } > /etc/ld.so.conf.d/000-local-lib.conf; \ ldconfig -v # ensure that alternatives are pointing to the new compiler and that old one is no longer used diff --git a/8/Dockerfile b/8/Dockerfile index b34d208403d..d4b8ff2ac28 100644 --- a/8/Dockerfile +++ b/8/Dockerfile @@ -141,9 +141,10 @@ RUN set -ex; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -# gcc installs .so files in /usr/local/lib64... +# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)... RUN set -ex; \ - echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \ +# this filename needs to sort higher than all the architecture filenames ("aarch64-...", "armeabi...", etc) + { echo '/usr/local/lib64'; echo '/usr/local/lib'; } > /etc/ld.so.conf.d/000-local-lib.conf; \ ldconfig -v # ensure that alternatives are pointing to the new compiler and that old one is no longer used diff --git a/9/Dockerfile b/9/Dockerfile index eb68a6ad35a..f059ac66dc5 100644 --- a/9/Dockerfile +++ b/9/Dockerfile @@ -141,9 +141,10 @@ RUN set -ex; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -# gcc installs .so files in /usr/local/lib64... +# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)... RUN set -ex; \ - echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \ +# this filename needs to sort higher than all the architecture filenames ("aarch64-...", "armeabi...", etc) + { echo '/usr/local/lib64'; echo '/usr/local/lib'; } > /etc/ld.so.conf.d/000-local-lib.conf; \ ldconfig -v # ensure that alternatives are pointing to the new compiler and that old one is no longer used diff --git a/Dockerfile.template b/Dockerfile.template index fd5a3c4d022..b6d943b14a3 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -135,9 +135,10 @@ RUN set -ex; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -# gcc installs .so files in /usr/local/lib64... +# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)... RUN set -ex; \ - echo '/usr/local/lib64' > /etc/ld.so.conf.d/local-lib64.conf; \ +# this filename needs to sort higher than all the architecture filenames ("aarch64-...", "armeabi...", etc) + { echo '/usr/local/lib64'; echo '/usr/local/lib'; } > /etc/ld.so.conf.d/000-local-lib.conf; \ ldconfig -v # ensure that alternatives are pointing to the new compiler and that old one is no longer used