public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* cannot find crti.o: No such file or directory
@ 2013-02-06 18:09 Mahmood Naderan
  2013-02-06 18:38 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Mahmood Naderan @ 2013-02-06 18:09 UTC (permalink / raw)
  To: gcc

Hi, 

When I want to make gcc 4.1.2 on my ubuntu 12.04 (x86_64), I get this error
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status 

Searching the web it seems that there is a problem with the location of crti. These files are available on the system
# find /usr/ -name crti*
/usr/lib32/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
/usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o 

Also the libc6-dev package is installed

# dpkg -l | grep libc6
ii  libc6                                  2.15-0ubuntu10.3                        Embedded GNU C Library: Shared libraries
ii  libc6-dbg                              2.15-0ubuntu10.3                        Embedded GNU C Library: detached debugging symbols
ii  libc6-dev                              2.15-0ubuntu10.3                        Embedded GNU C Library: Development Libraries and Header Files
ii  libc6-dev-i386                         2.15-0ubuntu10.3                        Embedded GNU C Library: 32-bit development libraries for AMD64
ii  libc6-i386                             2.15-0ubuntu10.3                        Embedded GNU C Library: 32-bit shared libraries for AMD64
ii  libc6-pic                              2.15-0ubuntu10.3                        Embedded GNU C Library: PIC archive library


How can I fix that?


Regards,
Mahmood

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cannot find crti.o: No such file or directory
  2013-02-06 18:09 cannot find crti.o: No such file or directory Mahmood Naderan
@ 2013-02-06 18:38 ` Florian Weimer
  2013-02-06 19:21   ` Mahmood Naderan
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2013-02-06 18:38 UTC (permalink / raw)
  To: Mahmood Naderan; +Cc: gcc

On 02/06/2013 07:09 PM, Mahmood Naderan wrote:

> When I want to make gcc 4.1.2 on my ubuntu 12.04 (x86_64), I get this error
> /usr/bin/ld: cannot find crti.o: No such file or directory
> collect2: ld returned 1 exit status

Ubuntu's multi-arch is not backwards-compatible.  You have to get a 
patched version of GCC 4.1 (not sure if this is available), or you can 
try to play with environment variables, as explained here:

   <http://gcc.gnu.org/ml/gcc/2012-02/msg00314.html>

Hope this helps.

-- 
Florian Weimer / Red Hat Product Security Team

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cannot find crti.o: No such file or directory
  2013-02-06 18:38 ` Florian Weimer
@ 2013-02-06 19:21   ` Mahmood Naderan
  2013-02-06 19:26     ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Mahmood Naderan @ 2013-02-06 19:21 UTC (permalink / raw)
  To: gcc; +Cc: Florian Weimer

That solution didn't work. However adding 

export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

partially solved the problem. Now I get:



/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file
`/usr/lib/../lib/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file
`/usr/lib/../lib/crtn.o' is incompatible with i386 output



According to http://gcc.gnu.org/ml/gcc-help/2009-05/msg00236.html
I ran "./configure --disable-multilib" and "make" again. However still get the same error.
 

Regards,
Mahmood



----- Original Message -----
From: Florian Weimer <fweimer@redhat.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: gcc <gcc-help@gcc.gnu.org>
Sent: Wednesday, February 6, 2013 10:08 PM
Subject: Re: cannot find crti.o: No such file or directory

On 02/06/2013 07:09 PM, Mahmood Naderan wrote:

> When I want to make gcc 4.1.2 on my ubuntu 12.04 (x86_64), I get this error
> /usr/bin/ld: cannot find crti.o: No such file or directory
> collect2: ld returned 1 exit status

Ubuntu's
 multi-arch is not backwards-compatible.  You have to get a patched 
version of GCC 4.1 (not sure if this is available), or you can try to 
play with environment variables, as explained here:

  <http://gcc.gnu.org/ml/gcc/2012-02/msg00314.html>

Hope this helps.

-- Florian Weimer / Red Hat Product Security Team

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cannot find crti.o: No such file or directory
  2013-02-06 19:21   ` Mahmood Naderan
@ 2013-02-06 19:26     ` Florian Weimer
  2013-02-06 19:45       ` Mahmood Naderan
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2013-02-06 19:26 UTC (permalink / raw)
  To: Mahmood Naderan; +Cc: gcc

On 02/06/2013 08:21 PM, Mahmood Naderan wrote:

> According to http://gcc.gnu.org/ml/gcc-help/2009-05/msg00236.html
> I ran "./configure --disable-multilib" and "make" again. However still get the same error.

Clean up the source tree and start again from an empty (separate) build 
tree.  I don;t think re-configuring with different flags always works 
reliably.

-- 
Florian Weimer / Red Hat Product Security Team

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cannot find crti.o: No such file or directory
  2013-02-06 19:26     ` Florian Weimer
@ 2013-02-06 19:45       ` Mahmood Naderan
  0 siblings, 0 replies; 5+ messages in thread
From: Mahmood Naderan @ 2013-02-06 19:45 UTC (permalink / raw)
  To: gcc; +Cc: Florian Weimer

Yes thank you very much. I removed the folder and did everything from scratch.

 
Regards,
Mahmood



----- Original Message -----
From: Florian Weimer <fweimer@redhat.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: gcc <gcc-help@gcc.gnu.org>
Sent: Wednesday, February 6, 2013 10:55 PM
Subject: Re: cannot find crti.o: No such file or directory

On 02/06/2013 08:21 PM, Mahmood Naderan wrote:

> According to http://gcc.gnu.org/ml/gcc-help/2009-05/msg00236.html
> I ran "./configure --disable-multilib" and "make" again. However still get the same error.

Clean up the source tree and start again from an empty (separate) build tree.  I don;t think re-configuring with different flags always works reliably.

-- Florian Weimer / Red Hat Product Security Team

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-06 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 18:09 cannot find crti.o: No such file or directory Mahmood Naderan
2013-02-06 18:38 ` Florian Weimer
2013-02-06 19:21   ` Mahmood Naderan
2013-02-06 19:26     ` Florian Weimer
2013-02-06 19:45       ` Mahmood Naderan

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).