LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-30-2009, 02:40 PM   #1
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Rep: Reputation: 17
Post What do I need to do to get gcc binaries working on a similar system?


Ok, here's the situation:

I have ttylinux installed to my HD, and I have a LiveCD on hand. Currently, ttylinux has no ability to compile/make anything. I have gotten it to the point where when I run a configure script for any unbuilt program, it will stop with an error saying the C compiler cannot create executables. Searching the web, (almost endlessly,) reveals that simply using a package manager to download gcc would work.

The problem:

Well, I don't have a package manager. However, this LiveCD has working binarys of gcc installed, so what do I need to copy over and configure in order to get it working on the other system? Will it work as a C compiler as well?

Thank you in advanced.
 
Old 11-30-2009, 02:55 PM   #2
JohnGraham
Member
 
Registered: Oct 2009
Posts: 401

Rep: Reputation: 113Reputation: 113
That could be long, and painful, dealing with dependencies and all - a (probably) less painful option would be to download the gcc .deb archive from packages.debian.org:

http://packages.debian.org/lenny/gcc

It lists dependencies, so make sure you have them, and their dependencies, and so on...

A .deb archive is just an ar archive - one site with details is here:

http://www.g-loaded.eu/2008/01/28/ho...-deb-packages/

Hope this helps.
 
Old 11-30-2009, 03:05 PM   #3
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
It lists the dependancies? Awesome! Will check it out, thank you.

And you know, I was just thinking, perhaps I could install dpkg+apt-get onto the livecd session, then somehow get it to install the actual packages to the ttylinux installation on the hd, but I wouldn't know how to do that. The configuring part would be tricky too, since I wouldn't know what to configure.
 
Old 11-30-2009, 07:25 PM   #4
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
It's great by the way that you happened to mention Debian, since I was aiming at building up the minimal system into debian. So after extracting the .deb files and copying over the folders that come out of those, am I all set? No configuring required? I would have to think that at least some environment variables would need setting...
 
Old 12-01-2009, 03:58 AM   #5
JohnGraham
Member
 
Registered: Oct 2009
Posts: 401

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by tgp1994 View Post
It's great by the way that you happened to mention Debian, since I was aiming at building up the minimal system into debian. So after extracting the .deb files and copying over the folders that come out of those, am I all set? No configuring required? I would have to think that at least some environment variables would need setting...
I don't think any environment variables would need setting, except maybe for larger programs like X or Gnome, etc.

As for what to do with the .deb file, I'm really not sure - it depends how minimal your system is. If you have dpkg installed, you can just run `dpkg -i package-name.deb'. If not, you could download the dpkg .deb file, work out how to install it (there'll be something on the web... somewhere...) and then just use that to install gcc et al.

John G
 
Old 12-01-2009, 02:28 PM   #6
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
Ya, that's basically what I did.

For anyone else who is browsing this and looking for an answer, here is what I did:

I went to debian's package archive, started at the apt package, and went backwards, following all of the dependencies, downloading each and every required one. I now have apt working completely, but I realized after that, trying to boot up the minimal system after this, that it seems like everything had been mounted as read only, or for some reason it wasn't allowed to access the bin directory. I'll be working on that.
 
Old 12-02-2009, 08:45 PM   #7
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
Ok, here's the current problem. I've installed lots and lots of debian packages, and so far, I can pretty much chroot into the os from the live cd and do whatever I want. Now, I want to be independent from the live cd. When I try to boot up into the os, this is what I get:

http://i351.photobucket.com/albums/q...2-20-17-07.png

Notice that it was loading my inittab file before this, and here is what my inittab file looks like at the moment:

Quote:
Originally Posted by /etc/inittab
#sysinit:/etc/rc.d/rc.sysinit

id:5:initdefault:

si::sysinit:/etc/init.d/rcS

~~:S:wait:/sbin/sulogin
tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
#tty3::respawn:/sbin/getty 38400 tty3
#tty4::respawn:/sbin/getty 38400 tty4
#tty5::respawn:/sbin/getty 38400 tty5
#tty6::respawn:/sbin/getty 38400 tty6

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

#Emergency:

z6:6:respawn:/sbin/sulogin

#::shutdown:/etc/rc.d/rc.sysdone halt
#::ctrlaltdel:/sbin/reboot

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

#1:2345:respawn:/sbin/mingetty --noclear --autologin root tty1
#2:23:respawn:/sbin/mingetty tty2
#3:23:respawn:/sbin/mingetty tty3
#4:23:respawn:/sbin/mingetty tty4
#5:23:respawn:/sbin/mingetty tty5
#6:23:respawn:/sbin/mingetty tty6
If anyone needs any more info or can help me, please respond.

Thank you.
 
Old 12-03-2009, 02:33 PM   #8
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
Bump :S
 
Old 12-04-2009, 12:15 PM   #9
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
Well, I seem to notice that after installing the "linux-image-2.6.26-2-686" package or the "libc6-i686", I would receive errors in apt saying "E: method http has died suddenly", and when I tried the ping command on a domain like google.com or apache.org, it would say: Segmentation fault.

If anyone can help me any more on this, that would be great.

P.S. chroot doesn't work anymore either, it will sit there with the prompt coming back.
 
Old 12-04-2009, 01:22 PM   #10
JohnGraham
Member
 
Registered: Oct 2009
Posts: 401

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by tgp1994 View Post
Well, I seem to notice that after installing the "linux-image-2.6.26-2-686" package or the "libc6-i686", I would receive errors in apt saying "E: method http has died suddenly", and when I tried the ping command on a domain like google.com or apache.org, it would say: Segmentation fault.

If anyone can help me any more on this, that would be great.

P.S. chroot doesn't work anymore either, it will sit there with the prompt coming back.
Hmmm... I'm not experienced in such matters (by a long shot!) but getting seg-faults sounds like it's the result of ld-linux "going wrong". Have you installed the libgcc4 dependency listed on the libc6 package page? (http://packages.debian.org/lenny/libc6)

Next, I'd run ldd on any command (like chroot or ping) that's failing and see if it finds everything it needs at run-time.

Maybe you could have a look at the man page for ld-linux. There's a useful section on environment variables that can change the behaviour of the dynamic linker - maybe set LD_BIND_NOW to force ld-linux to resolve all symbols at program startup, which might show you if there's a problem with that...?
 
Old 12-04-2009, 01:56 PM   #11
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
Ya, it was working before, so I would assume that libgcc was installed and working. But see, the problem is, I can't chroot into it any more. So, I can't really run any of those commands. I can, however, boot part of the way into it. I will get to a user prompt, exactly like the picture I posted above, but it will give the usual error. Any ideas on how to get around that?
 
Old 12-04-2009, 04:50 PM   #12
JohnGraham
Member
 
Registered: Oct 2009
Posts: 401

Rep: Reputation: 113Reputation: 113
You could manually replace the new libc packages with the old ones - find out which files the .deb package has stomped on and get the old ones from the original source?

I'm afraid I don't know the intricacies of updating libc on a system, so I can't help you with how to update it or what might go wrong when you do, but maybe opening a new thread just about this would provide some answers.
 
Old 12-04-2009, 05:12 PM   #13
tgp1994
Member
 
Registered: Nov 2009
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77

Original Poster
Rep: Reputation: 17
That actually seemed to work, extracting the libc packages manually then trying again. I don't understand why it starts to go haywire though, the only thing I do is try to download+install some packages in apt. And this has happened to me twice, both times installing different packages. The second package set had something to do with xen.
 
  


Reply

Tags
help, still


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
installing gcc 4.0.1(binaries) naveenu Fedora - Installation 3 09-28-2005 09:37 AM
Installing GCC Binaries Coookie Monster Linux - Newbie 4 07-23-2005 07:25 PM
No GCC, No Intel binaries... Spotted Cheetah Linux - Software 5 06-10-2005 06:40 PM
Using gcc to make windows Binaries exvor Programming 5 01-10-2005 05:24 PM
gcc or similar compiler needed. robmcw Linux - Newbie 6 07-07-2003 05:53 AM


All times are GMT -5. The time now is 09:46 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration