LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 12-30-2002, 07:37 PM   #1
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
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.
 
Old 12-30-2002, 08:50 PM   #2
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
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.
 
Old 12-31-2002, 01:24 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 12-31-2002, 07:08 AM   #4
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
Or you can let someone else compile it for you.
 
Old 12-31-2002, 08:34 AM   #5
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
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?
 
Old 12-31-2002, 08:35 AM   #6
buddy
LQ Newbie
 
Registered: Dec 2002
Location: Montreal
Distribution: Mdk9
Posts: 20

Rep: Reputation: 0
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
 
Old 12-31-2002, 04:01 PM   #7
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
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.
 
Old 12-31-2002, 04:04 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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?)
 
Old 12-31-2002, 04:21 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 12-31-2002, 04:28 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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?
 
Old 12-31-2002, 04:38 PM   #11
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
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.
 
Old 12-31-2002, 04:50 PM   #12
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
-sorry, my fault

Last edited by bulliver; 12-31-2002 at 04:52 PM.
 
Old 12-31-2002, 05:22 PM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 12-31-2002, 06:32 PM   #14
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
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?
 
Old 12-31-2002, 07:38 PM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
I'm trying to compile ffmpeg using arm compiler Jeon, Chang-Min Linux - General 2 09-15-2005 05:31 AM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM
using gnu c compiler to compile objective c qanopus Linux - Software 1 10-20-2003 11:06 AM
How to compile the LAM by intel compiler infovore Linux - Software 0 05-21-2003 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration