Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ld doesn't find crt1.o
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
DonHora
n00b
n00b


Joined: 04 Sep 2003
Posts: 60
Location: Lyon, France

PostPosted: Thu Feb 03, 2005 10:26 pm    Post subject: ld doesn't find crt1.o Reply with quote

Hi

I use profile 2005.0.

When I try to compile a C file, I can produce an object file but the linker doesn't find the crt1.o file. As a result, I can't emerge anything that needs C compiling & linking. Here is the error I get :
Code:
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status


... the output of "locate crt1.o"
Code:
/usr/lib32/crt1.o
/usr/lib32/gcrt1.o
/usr/lib32/Scrt1.o
/usr/lib32/Mcrt1.o
/usr/lib64/crt1.o
/usr/lib64/gcrt1.o
/usr/lib64/Scrt1.o
/usr/lib64/Mcrt1.o


and here is emerge info :
Code:
Portage 2.0.51-r15 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r12 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r12 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec 28 2004, 20:19:18)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/"
LANG="fr_FR@euro"
LC_ALL="fr_FR@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bonobo cdr crypt cups dvd dvdr emacs encode esd f77 fam flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml imagemagick imap imlib ipv6 java jp2 jpeg kde libwww lzw lzw-tiff mad matroska motif mozilla mpeg multislot mysql ncurses nls nptl oggvorbis opengl oss pam perl png python qt readline samba sdl spell ssl svg tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales xml xml2 xmms xpm xrandr xv xvid zlib linguas_fr"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS


Does anyone know how I can solve this problem ?
Back to top
View user's profile Send private message
DonHora
n00b
n00b


Joined: 04 Sep 2003
Posts: 60
Location: Lyon, France

PostPosted: Mon Feb 07, 2005 5:58 pm    Post subject: Reply with quote

I found a workaround :
I created some symbolic links in the /usr/lib directory :
Code:
cd /usr/lib
ln -s ../lib64/crt1.o crt1.o
ln -s ../lib64/crti.o crti.o
ln -s ../lib64/crtn.o crtn.o
Now you can compile things, so I emerged binutils gcc and glibc (only glibc is necessary). Remove the links when the emerge process has finished.

Hope this will help someone.
Back to top
View user's profile Send private message
SPY_jmr1
n00b
n00b


Joined: 02 Jan 2004
Posts: 62

PostPosted: Wed Feb 23, 2005 9:32 pm    Post subject: Reply with quote

Excellent! Same error, same fix...

Am going to attempt leaving the workaround in place, does anyone see any issue with that?
Back to top
View user's profile Send private message
matthew2k
n00b
n00b


Joined: 14 Mar 2003
Posts: 27
Location: Germany

PostPosted: Thu Feb 24, 2005 12:25 pm    Post subject: Reply with quote

What 2005.0 profile are you guys using? For now, /usr/lib should be a symlink to lib64, just like /lib to /lib64. There is a subprofile if you don't want to have the symlinks and stuff around. But you shouldn't expect most of things to work just yet. As 2005.0 is still not released and most ebuilds are far away from proper multilib support, it will take some time. So having /lib and /usr/lib as a real directory besides lib32 and lib64 is basically asking for trouble as far as I understand it. I, too, am running 2005.0 system with lib being a symlink to lib64 and things run just fine.

With 2005.1 or .2, lib will contain all 32bit libs, lib32 will vanish and lib64 will stay 64bit. That's the main goal.

Maybe that will be of some help too.
Back to top
View user's profile Send private message
DonHora
n00b
n00b


Joined: 04 Sep 2003
Posts: 60
Location: Lyon, France

PostPosted: Thu Feb 24, 2005 5:35 pm    Post subject: Reply with quote

matthew2k wrote:
For now, /usr/lib should be a symlink to lib64, just like /lib to /lib64.
That's very interesting. I have /usr/lib and /usr/lib64 as separate directories and I wondered why it wasn't like /lib and /lib64.
In the "AMD64 2005.0 Upgrade Guide" I didn't find any reference to these directories so I didn't do the symlink. I think the problem is that I first used the scripted way and it didn't work. Then I made everything by hand.

I will try to merge everything in the /usr/lib directory and make the symlink to see if it solves some problems.
Back to top
View user's profile Send private message
matthew2k
n00b
n00b


Joined: 14 Mar 2003
Posts: 27
Location: Germany

PostPosted: Fri Feb 25, 2005 9:18 am    Post subject: Reply with quote

Quote:
I will try to merge everything in the /usr/lib directory and make the symlink to see if it solves some problems.


Be careful. IMHO you should boot up a livecd, and do everything from there just in case something goes wrong (e.g. libs are not found and commands not working).

Some time in the last few weeks, I believe eradictor posted a detailed msg on the amd64 mailing list, explaining how things should look like once everything is in place.

Have a look at those two posts, they are quite informative. The second link refers to the xorg breakage but the second half of the post contains some more details on how things should be with the 2005.0 profile.

http://www.mail-archive.com/gentoo-amd64@gentoo.org/msg00232.html
http://article.gmane.org/gmane.linux.gentoo.amd64/2654

Hope everything turns out fine with your system. And have a nice weekend,
- matt
Back to top
View user's profile Send private message
SPY_jmr1
n00b
n00b


Joined: 02 Jan 2004
Posts: 62

PostPosted: Sun Feb 27, 2005 6:58 am    Post subject: Reply with quote

matthew2k wrote:
What 2005.0 profile are you guys using? For now, /usr/lib should be a symlink to lib64, just like /lib to /lib64. There is a subprofile if you don't want to have the symlinks and stuff around. But you shouldn't expect most of things to work just yet. As 2005.0 is still not released and most ebuilds are far away from proper multilib support, it will take some time. So having /lib and /usr/lib as a real directory besides lib32 and lib64 is basically asking for trouble as far as I understand it. I, too, am running 2005.0 system with lib being a symlink to lib64 and things run just fine.

With 2005.1 or .2, lib will contain all 32bit libs, lib32 will vanish and lib64 will stay 64bit. That's the main goal.

Maybe that will be of some help too.


interestingly, my / has it the other way round, with lib64 linked to lib... :?

*goes to experiment* :)
Back to top
View user's profile Send private message
SPY_jmr1
n00b
n00b


Joined: 02 Jan 2004
Posts: 62

PostPosted: Sun Feb 27, 2005 7:02 am    Post subject: Reply with quote

matthew2k wrote:
Quote:
I will try to merge everything in the /usr/lib directory and make the symlink to see if it solves some problems.


Be careful. IMHO you should boot up a livecd, and do everything from there just in case something goes wrong (e.g. libs are not found and commands not working).



*SNORT*

ohh great, now I find out...

Well, having not known this, I have been merrily moving mine around.. and luckily, it seems mv and cp don't use anything in there, (AT LEAST ON MINE, *DISCLAIMER!!!!!!!DINGDINGDING!!!!*)

I guess for every beta, someone has to walk through the flames a bit, eh? :)
Back to top
View user's profile Send private message
matthew2k
n00b
n00b


Joined: 14 Mar 2003
Posts: 27
Location: Germany

PostPosted: Sun Feb 27, 2005 9:35 am    Post subject: Reply with quote

Quote:
interestingly, my / has it the other way round, with lib64 linked to lib... :?


Well... you not gonna linke this :) but that would have been okay too... as long as lib64 and lib are not two seperate directories for now it should work. Somewhere on the road to the full multilib standard there will be migration scripts that move everything in the proper place. So you shouldn't have to worry.

Have a nice sunday,
matt.
Back to top
View user's profile Send private message
gonEH
n00b
n00b


Joined: 16 Jan 2005
Posts: 15
Location: Incheon Korea

PostPosted: Mon Feb 28, 2005 2:27 pm    Post subject: Reply with quote

Ok.. Keep in mind.
You must not upgrade 2004.3 to 2005.0 in livecd.
I re-install gentoo because of this problem..

ps. Sorry.. I don't speak english well..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum