From unknown Sun Aug 10 16:47:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20364 <20364@debbugs.gnu.org> To: bug#20364 <20364@debbugs.gnu.org> Subject: Status: libtool always outputs "libxml2.la seems to be moved" when making a C++ library Reply-To: bug#20364 <20364@debbugs.gnu.org> Date: Sun, 10 Aug 2025 23:47:24 +0000 retitle 20364 libtool always outputs "libxml2.la seems to be moved" when ma= king a C++ library reassign 20364 libtool submitter 20364 Jan Engelhardt severity 20364 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 18 05:48:38 2015 Received: (at submit) by debbugs.gnu.org; 18 Apr 2015 09:48:38 +0000 Received: from localhost ([127.0.0.1]:59589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjPMb-0004xb-7C for submit@debbugs.gnu.org; Sat, 18 Apr 2015 05:48:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41521) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjPMY-0004xN-DT for submit@debbugs.gnu.org; Sat, 18 Apr 2015 05:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjPMM-0006sL-NC for submit@debbugs.gnu.org; Sat, 18 Apr 2015 05:48:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjPMM-0006s5-Gf for submit@debbugs.gnu.org; Sat, 18 Apr 2015 05:48:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjPMH-0001Gb-CP for bug-libtool@gnu.org; Sat, 18 Apr 2015 05:48:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjPME-0006qx-6o for bug-libtool@gnu.org; Sat, 18 Apr 2015 05:48:17 -0400 Received: from ares41.inai.de ([46.4.122.207]:41446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjPME-0006qm-0Q for bug-libtool@gnu.org; Sat, 18 Apr 2015 05:48:14 -0400 Received: by ares41.inai.de (Postfix, from userid 25121) id 8DBB17D73B9D; Sat, 18 Apr 2015 11:48:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ares41.inai.de (Postfix) with ESMTP id 78D9D82A9712 for ; Sat, 18 Apr 2015 11:48:10 +0200 (CEST) Date: Sat, 18 Apr 2015 11:48:10 +0200 (CEST) From: Jan Engelhardt To: bug-libtool@gnu.org Subject: libtool always outputs "libxml2.la seems to be moved" when making a C++ library Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Observed in libtool-2.4.2: libtool warns about moved paths, yet, libtool was the one that added the compiler-specific /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 into the command line in the first place. /bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -o libx.la -rpath /usr/local/lib x.lo -lxml2 libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbeginS.o .libs/x.o -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 /usr/lib64/libxml2.so -ldl -lz -llzma -L/usr/lib64/gcc/x86_64-suse-linux/4.8 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.8/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib64/gcc/x86_64-suse-linux/4.8/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crtn.o -O2 -Wl,-soname -Wl,libx.so.0 -o .libs/libx.so.0.0.0 libtool: link: (cd ".libs" && rm -f "libx.so.0" && ln -s "libx.so.0.0.0" "libx.so.0") libtool: link: (cd ".libs" && rm -f "libx.so" && ln -s "libx.so.0.0.0" "libx.so") libtool: link: ( cd ".libs" && rm -f "libx.la" && ln -s "../libx.la" "libx.la" ) /bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -o liby.la -rpath /usr/local/lib x.lo libx.la libtool: link: warning: `/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libxml2.la' seems to be moved What was expected instead: Perhaps not use -nostdlib -L/usr/lib64/... and just let CXXLD do that itself internally. --- configure.ac AC_INIT([f],[0]) AM_INIT_AUTOMAKE([foreign]) LT_INIT AC_PROG_CXX AC_OUTPUT([Makefile]) --- --- Makefile.am lib_LTLIBRARIES = libx.la liby.la libx_la_SOURCES = x.cpp libx_la_LIBADD = -lxml2 liby_la_SOURCES = x.cpp liby_la_LIBADD = libx.la --- --- x.cpp // empty --- --- /usr/lib64/libxml2.la # libxml2.la - a libtool library file # Generated by libtool (GNU libtool) 2.4.2 # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='libxml2.so.2' # Names of this library. library_names='libxml2.so.2.9.1 libxml2.so.2 libxml2.so' # The name of the static archive. old_library='' # Linker flags that can not go in dependency_libs. inherited_linker_flags='' # Libraries that this one depends upon. dependency_libs=' -ldl -lz -llzma -lm' # Names of additional weak libraries provided by this library weak_library_names='' # Version information for libxml2. current=11 age=9 revision=1 # Is this an already installed library? installed=yes # Should we warn about portability when linking against -modules? shouldnotlink=no # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/usr/lib64' ---