public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: bkohlen@intrinsyc.com
To: gcc-help@gcc.gnu.org
Subject: crt1.o not found
Date: Thu, 22 Mar 2001 12:06:00 -0000	[thread overview]
Message-ID: <3ABA5D6E.881CCB23@intrinsyc.com> (raw)

I am using a gcc, glibc, and ld which were compiled on i686, for an arm
host, with an arm target.  I packaged them by using

$ ./configure --prefix=$install_prefix (and a whole bunch of cross
compile flags)
$ make install prefix=/some/isolated/location"$install_prefix"

I noticed that libc.so still included the "/some/isolated/location" part
of the path, so I manually fixed that, because I intended to install
everything at it's respective "$install_prefix".

gcc works to compile a simple program, as long as I use the -c flag.  If
it tries to link, it gives the error:

$ gcc test.c
/usr/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status

if I manually try to link with crt1.o I get some undefined references

$ ld -o test /lib/crt1.o test.o -lc
/lib/crt1.o: In function `_start':
/lib/crt1.o(.text+0x28): undefined reference to `_fini'
/lib/crt1.o(.text+0x30): undefined reference to `_init'

I grepped the entire binutils package, looking for some reference to
"/some/isolated/location", thinking that maybe ld was playing the same
trick on me that libc.so had, but there were no hits.

ld --verbose revealed SEARCH_DIR's of (/lib) (/usr/lib) (/usr/local/lib)
and (/usr/arm-linux/lib). crt1.o is found in /lib on my system.  out of
desperation i copied it to /usr/lib, but it didn't improve things.

I would appreciate any help, and I realize this is a FAQ, but I can't
resolve the problem with any of the archive searching I have done.

Thanks,
Ben

             reply	other threads:[~2001-03-22 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-22 12:06 bkohlen [this message]
2008-08-08 20:57 Nate879
2008-08-08 22:23 ` Brian Dessent

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=3ABA5D6E.881CCB23@intrinsyc.com \
    --to=bkohlen@intrinsyc.com \
    --cc=gcc-help@gcc.gnu.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).