LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Preparing for Glibc installation (http://www.linuxquestions.org/questions/slackware-14/preparing-for-glibc-installation-388288/)

yougene 12-01-2005 10:28 AM

Preparing for Glibc installation
 
So after figuring out Kernel compiling and backing up, I've decided to move on to something a little more complicated and risky.

http://www.tldp.org/HOWTO/Glibc-Inst...eed-to-do.html

The instructions seem relatively simple but there is one thing I'm not getting. It wants to me compile a couple programs statically. Will this over ride the previous installations? If it doesn't how do I know which version I'm using?

keefaz 12-01-2005 10:39 AM

You can use file command, like
Code:

file /bin/ls
if you have in output 'statically linked', then it is statically linked :)

Don't install your new binaries at the same location of the original ones,
if you don't want to overwrite them

yougene 12-01-2005 11:17 AM

Quote:

Originally posted by keefaz

Don't install your new binaries at the same location of the original ones,
if you don't want to overwrite them

How do I make sure that doesnt happen :newbie:

keefaz 12-01-2005 12:06 PM

Preparing for total system destruction...
 
Dont run make install, copy the compiled binaries by hand in a safe directory,
and eventually add this directory to your PATH

yougene 12-01-2005 02:01 PM

How do I figure out where the binaries were compiled to?




Trying to make binutils-2.9.1 I get the following error

make[1]: *** [dummy.o] Error 1
make[1]: Leaving directory `/root/glibc_files/binutils-2.9.1/libiberty'
make: *** [all-libiberty] Error 2



On the website I provided above, it wants me to untar using "tar xIvf" but tar doesn't recognize "I", could this have anything to do with the error?

yougene 12-01-2005 02:24 PM

Also I have a pentium II, I don't know if this will have any effect but it seems like it was compiling for a certain x86 architecture.

keefaz 12-01-2005 02:47 PM

There is an error on the site, the I should be a j ...

The glibc compilation is for advanced users, you know.
I would even say that if you success to compile and install
glibc from scratch like this, you are not too far from create
your own Linux distribution :)

If you want to compile and install successfully glibc in Slackware,
I recommend to take the slackbuild script for glibc and gcc in any
Slackware source mirror and study it deeply.

egag 12-01-2005 04:01 PM

you might also take a look at LFS ( linux from scratch )

http://www.linuxfromscratch.org/

if you follow that " course " you'll get a good idea of how things hang together.
it's very educational.
( you could build a " Slack-from-scratch " )

but on a pentium II it will take a lot of time...

egag

rkelsen 12-01-2005 06:03 PM

Re: Preparing for Glibc installation
 
Quote:

Originally posted by yougene
So after figuring out Kernel compiling and backing up, I've decided to move on to something a little more complicated and risky.
Why do you need to do this?

A Glibc upgrade isn't something I would do. Even after 7 years of using Linux.

Why not? I hear you ask...

Well, here's my reasoning:

1. There's a lot more to it than you'd believe.

2. There's every possibility that I'd be no better off than I am now.

3. Pat does a brilliant job in packaging glibc and all its associated components - don't forget that its the environment he uses to compile Slackware.

4. I've NEVER had any glibc related problems compiling software under Slackware, and I've been using Slack since version 7.0.

5. The version of glibc shipped with Slackware 10.2 has the NPTL enabled if you use it with a 2.6 kernel. Pat put a lot of work into making it easy to switch between 2.4 and 2.6 without losing any of that functionality. I don't know if I'd be able to replicate that.

6. There are a million other things one can do to improve the funtionality of a Slack box. Work on one of those instead.

Don't get me wrong, your system is your to do with as you see fit, but I don't believe that this exercise will help a self-confessed :newbie: learn about Linux. If anything, it'll send you crying and screaming back to M$ a broken shell of your former self.

yougene 12-01-2005 06:11 PM

Hehe, well the reason I want to learn how to do this is because I've run into a couple programs in the past that required that some particular version of Glibc(sorry I can't remember which ones) be installed so it seemed like a useful thing to know how to do.


I was under the impression that building Glibc maybe an intermediate level activity. You learn something new everyday.



Looks like it's about time for me to give LFS a go.

rkelsen 12-01-2005 06:24 PM

Quote:

Originally posted by yougene
I've run into a couple programs in the past that required that some particular version of Glibc(sorry I can't remember which ones) be installed so it seemed like a useful thing to know how to do.
Well in 7 years, I've yet to see one. Anyhow, what would stop you from downloading source code and compiling a custom binary of the program in question for your system?

Swapping between glibc versions is not something that should be done where stability is a requirement.

yougene 12-01-2005 07:58 PM

Lack of know how.


I wasn't aware of the existance of "static" binaries, up until I started messing with glibc. Good point.

rkelsen 12-01-2005 10:51 PM

Quote:

Originally posted by yougene
Lack of know how.
So let's get this straight.

You don't know how to compile software, but you want to re-compile glibc???

[Foghorn]You've got to learn to crawl before you can walk, son.[/Foghorn]

I don't mean to sound patronising, but you're trying to bite off more than you can chew.

While LFS may sound attractive, I can think of nothing more boring than watching weeks of source code being compiled for practically no benefit over the pre-compiled packages that come with Slackware. That said, LFS would be a good way of learning Linux. Just make sure you read the documentation thoroughly. This isn't Windows. Things won't "just work" without some personal investment on your part.

In my opinion, you should stick with Slackware, leave glibc alone and learn how to compile the stuff you need rather than trying to change the system to suit some binaries. Heck, you might even be able to find pre-compiled Slackware packages of the software you need at linuxpackages.net or elsewhere on the internet.

But as I said before: Your system, your rules. :D

yougene 12-02-2005 12:40 PM

What are some good docs or books on compiling? Beyond the basic ./configure, make, make install I mean.

simcox1 12-02-2005 03:54 PM

I'm vaguely considering doing the same thing as you yougene. A good source is probably the lfs book, just for some background, and also the site you refered to above. Plus gnu.org.


All times are GMT -5. The time now is 05:43 AM.