public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: alexandre schenberg via Libc-help <libc-help@sourceware.org>
Cc: alexandre schenberg <ale.schenberg@yandex.com>
Subject: Re: undefined references to `__libc_csu_fini/init when copying glibc files to /usr/lib32
Date: Tue, 30 May 2023 08:38:57 +0200	[thread overview]
Message-ID: <87leh6xr0e.fsf@oldenburg.str.redhat.com> (raw)
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")

* 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
  <https://sourceware.org/glibc/wiki/Testing/Builds#Build100PctNew>

Thanks,
Florian


      reply	other threads:[~2023-05-30  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29  0:25 alexandre schenberg
2023-05-30  6:38 ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leh6xr0e.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=ale.schenberg@yandex.com \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).