Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-30-2002, 07:37 PM
|
#1
|
Member
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488
Rep:
|
compile a compiler without a compiler?
I need to re-install my version of gcc (I think that will solve the problem I had in http://www.linuxquestions.org/questi...threadid=39706).
But how is one supposed to compile gcc without a working copy of gcc? To be fair, I have the older version, but I cannot seem to get it working (it has the same problem). Help is greatly appreciated.
|
|
|
12-30-2002, 08:50 PM
|
#2
|
Member
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399
Rep:
|
Yeah I've always wondered the very same thing...how do you install a compiler without a compiler? I thought (a long time ago, before i started LFS) that by going thru the steps of a LFS system would answer it for me...but i found out you have to use a base distro...bugger, that didn't answer it, heh.
|
|
|
12-31-2002, 01:24 AM
|
#3
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
You could use something like knoppix to do that. No it's not compiling a compiler without a compiler, but it would work without having to reveal the mystery of compiling the compiler.
Cool
|
|
|
12-31-2002, 07:08 AM
|
#4
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
Or you can let someone else compile it for you.
|
|
|
12-31-2002, 08:34 AM
|
#5
|
Member
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488
Original Poster
Rep:
|
I found all the gcc I need in a tgz on ftp.slackware.com. It installed, but didn't help me any .... thanks anyways
btw, what is this knoppix you speak of MasterC?
|
|
|
12-31-2002, 08:35 AM
|
#6
|
LQ Newbie
Registered: Dec 2002
Location: Montreal
Distribution: Mdk9
Posts: 20
Rep:
|
which came first; the chicken or the egg?
make some friends... thats what the community is for - get one off someone as said by schatoor
Cheers
|
|
|
12-31-2002, 04:01 PM
|
#7
|
Member
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488
Original Poster
Rep:
|
Quote:
Originally posted by buddy
which came first; the chicken or the egg?
make some friends... thats what the community is for - get one off someone as said by schatoor
Cheers
|
Well I installed the package and it didn't help, I'm pretty sure the problem is not with my compiler, but with my libs. By the way, the rooster came first; the chicken was downright pissed.
|
|
|
12-31-2002, 04:04 PM
|
#8
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
Why not install a binary gcc, then compile gcc with your binary gcc, then remove your binary gcc, then use your compiled gcc (you with me?)
|
|
|
12-31-2002, 04:21 PM
|
#9
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Yeah, but isn't that pretty much what he did with installing the Slackware tgz?
Knoppix is one of those CD based distros. It runs without the need of an HD, and this is usually used by me as a rescue CD, or for demoing the power of linux to non-believers
http://freshmeat.net/redir/knoppix/2.../index-en.html
Cool
|
|
|
12-31-2002, 04:28 PM
|
#10
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
Hmm, wasn't too clear on whether the tgz was binary or source. Shouldn't we troubleshoot (or at least find out) why binary gcc "didn't help me any"
Am I missing something?
|
|
|
12-31-2002, 04:38 PM
|
#11
|
Member
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488
Original Poster
Rep:
|
Quote:
Originally posted by bulliver
Hmm, wasn't too clear on whether the tgz was binary or source. Shouldn't we troubleshoot (or at least find out) why binary gcc "didn't help me any"
Am I missing something?
|
Sorry ... what I meant to say is that I installed a BINARY tgz of gcc (I thought that was clear ... oh well) but I still get :
Code:
/usr/local/lib/libc.so.6: undefined reference to `_dl_lazy@GLIBC_2.1.1'
/usr/local/lib/libc.so.6: undefined reference to `_dl_dst_substitute@GLIBC_2.1.1
'
/usr/local/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_2.2'
# and so forth #
collect2: ld returned 1 exit status
when I try to compile anything with gcc. Thus, I am led to believe the problem is not with gcc (I guessed that, but am scraping the bottom of the barrel here).
_dl_ prefix leads me to believe that /usr/local/lib/ld-linux.so.2 has something to do with it, but what?? Thanks for the replies.
|
|
|
12-31-2002, 04:50 PM
|
#12
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
-sorry, my fault
Last edited by bulliver; 12-31-2002 at 04:52 PM.
|
|
|
12-31-2002, 05:22 PM
|
#13
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
 I was just guessing, luck must be on my side today, how odd?
I think bulliver is right though, I am not too sure what is goin on? I glanced over the thread linked at the top, but still have no idea.
Since I know absolutely nothing above the basics, I turned to my trusty friend www.linuxfromscratch.org
Although I still have no idea, I at least can give suggestions...
Did you remove your old glibc? Is your new GCC symlinked properly, and also pointing to cc?
How did you compile glibc? With what options et al?
Cool
|
|
|
12-31-2002, 06:32 PM
|
#14
|
Member
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488
Original Poster
Rep:
|
I configured glibc2.3 using
--prefix=/usr/local/glib2 and --enable-add-ons
I did not remove the old glibc as the INSTALL file instructed me not to.
I don't know if gcc is linked properly where & what should the links be?
|
|
|
12-31-2002, 07:38 PM
|
#15
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Again, I am but an idiot when it comes to anything but how to start the X gui
But over at LFS:
http://www.linuxfromscratch.org/view...ter06/gcc.html
Looks like you need to link some libs as well?
I am just shooting in the dark, so if you've already done this, or it doesn't help, sorry.
Cool
|
|
|
All times are GMT -5. The time now is 05:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|