What do I need to do to get gcc binaries working on a similar system?
Linux - SoftwareThis 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
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.
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Rep:
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?
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:
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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.
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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...
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.
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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.
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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:
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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.
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...?
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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?
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.
Distribution: Used to use: Ubuntu. Still use: Debian, Other small distros
Posts: 77
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.