From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 800713858D20 for ; Tue, 30 May 2023 06:39:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 800713858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685428741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QyltSmkY177+aSO0c7ZtuovxWZ+NIdZDABTD700pA6w=; b=PbnbA+eErjNlKv8fOHoAx+qJjk0OXPvA9icrhYlRprwqE5yd9PJDT/0O3meKAktpTu2Ept IWIXebxLKPYVxFmM0CNgxYGixnkYdgPPjzXSR9kLiijAhPdHUsgEGLyB33fYU5ktEU2U3E QozmsdUACiknJNQxtR6aXDJOQ2LlvkM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-263-aZlQHE5GNeKjVkS8CtrbXg-1; Tue, 30 May 2023 02:39:00 -0400 X-MC-Unique: aZlQHE5GNeKjVkS8CtrbXg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0A8B73C025BC; Tue, 30 May 2023 06:39:00 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51E6C492B00; Tue, 30 May 2023 06:38:59 +0000 (UTC) From: Florian Weimer To: alexandre schenberg via Libc-help Cc: alexandre schenberg Subject: Re: undefined references to `__libc_csu_fini/init when copying glibc files to /usr/lib32 References: <1361191685319902@gavdw3jrkjwbxdg3.myt.yp-c.yandex.net> Date: Tue, 30 May 2023 08:38:57 +0200 In-Reply-To: <1361191685319902@gavdw3jrkjwbxdg3.myt.yp-c.yandex.net> (alexandre schenberg via Libc-help's message of "Sun, 28 May 2023 21:25:02 -0300") Message-ID: <87leh6xr0e.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: * alexandre schenberg via Libc-help: > 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 You need to create a complete sysroot with all the startup files. Using -L is not enough. You should use one of the ready-made cross-tools scripts. Without a proper sysroot, something like this will be required: Building with completely new files Thanks, Florian