From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward102c.mail.yandex.net (forward102c.mail.yandex.net [178.154.239.213]) by sourceware.org (Postfix) with ESMTPS id DC7B33858D38 for ; Mon, 29 May 2023 00:25:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC7B33858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.com Received: from mail-nwsmtp-mxback-production-main-87.myt.yp-c.yandex.net (mail-nwsmtp-mxback-production-main-87.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:3705:0:640:a399:0]) by forward102c.mail.yandex.net (Yandex) with ESMTP id 9419A6001F for ; Mon, 29 May 2023 03:25:02 +0300 (MSK) Received: from mail.yandex.com (2a02:6b8:c12:4912:0:640:ba80:0 [2a02:6b8:c12:4912:0:640:ba80:0]) by mail-nwsmtp-mxback-production-main-87.myt.yp-c.yandex.net (mxback/Yandex) with HTTP id fO89TY0WASw0-g1HusZNF; Mon, 29 May 2023 03:25:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1685319902; bh=R1X1wTYPXBhLTPPK4q9zc5iGLScOL86sesVXqpAi0n8=; h=Message-Id:Date:Subject:To:From; b=A8Ijj/gj+CyNdqDg6pF6/aVHDRYFPo7J1Y2th4M4Hjw6xbOOUXOTx6uKfvrBPxbph UCZZlSYix9f9KLzQ36M3nkHK8VvTQ/4wh8kunsMDgePZFY8n6EnCEJ20NQ1jN7L37M Oq01/pCuH7Qsf00w4a3+u5yIvzFb9VF7yM2RmaTE= Authentication-Results: mail-nwsmtp-mxback-production-main-87.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.com Received: by gavdw3jrkjwbxdg3.myt.yp-c.yandex.net with HTTP; Mon, 29 May 2023 03:25:02 +0300 From: alexandre schenberg Envelope-From: ale-schenberg@yandex.com To: libc-help@sourceware.org Subject: undefined references to `__libc_csu_fini/init when copying glibc files to /usr/lib32 MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sun, 28 May 2023 21:25:02 -0300 Message-Id: <1361191685319902@gavdw3jrkjwbxdg3.myt.yp-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi. I installed Glibc using the prefix=/usr and DESTDIR=/media/34GB/Arquivos-de-Programas-Linux-32bit/Glibc-2.17/. Then I proceeded to create symbolic links to some of its files in /usr/lib32. They are: crt1.o, crti.o, crtn.o, ld-linux.so.2, libc.a, libc.so, libm.a and libc.so. After that, I tried to cross compile a simple test program with: g++ -m32 -o test-32bit test-32bit.cpp that returned: /usr/lib/../lib32/crt1.o: In function `_start': /media/34GB/Arquivos-de-Programas-Linux-32bit/glibc-2.17/csu/../sysdeps/i386/start.S:107: undefined reference to `__libc_csu_fini' /media/34GB/Arquivos-de-Programas-Linux-32bit/glibc-2.17/csu/../sysdeps/i386/start.S:108: undefined reference to `__libc_csu_init' collect2: error: ld returned 1 exit status I then created another symbolic link in /usr/lib32 to libc_nonshared.a However, it didn't solve the problem. I then did a test, tried to compile the test program passing the dir where libc_nonshared.a is located with: g++ -m32 -o test-32bit test-32bit.cpp -L/media/34GB/Arquivos-de-Programas-Linux-32bit/Glibc-2.17/usr/lib/ and it returned: /usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 /usr/bin/ld: cannot find /lib/libc.so.6 collect2: error: ld returned 1 exit status I found very weird that it is looking for libc.so.6 in a directory different than the ones mentioned in prefix and DESTDIR. Anyway, I am not sure if this is related to the __libc_csu_fini/init error messages and I am open to suggestions about how to make these symbols to be located during compilation.