LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Chapter 5 - Installing GCC... (https://www.linuxquestions.org/questions/linux-from-scratch-13/chapter-5-installing-gcc-39478/)

Grim Reaper 12-27-2002 12:11 AM

Chapter 5 - Installing GCC...
 
with the installation command we're meant to enter:

patch -Np1 -i ../gcc3.2.patch && patch -Np1 -i ../gcc3.2-nofixincludes-2.path && mkdir ../gcc-build && cd ../gcc-build && ../gcc-3.2/configure --prefix=/static

ill stop there...with this --prefix=/static, shouldn't this be --prefix=$lfs/static? otherwise gcc will try and install into the host distro's /static directory...wouldn't it?

just needing to know if i need to add $lfs or not, hopefully i can get a quick reply :)

MasterC 12-27-2002 12:39 AM

Quote:

--prefix=/static: This is NOT a typo. GCC hard codes some paths while compiling and so we need to pass /static as the prefix during ./configure. We pass the real install prefix during the make install command later.
;)

Read down the page a bit. That's straight off the Ch 5 GCC info/install page ;)

Cool

Grim Reaper 12-27-2002 12:46 AM

ROFL! thanks for that MasterC! :) From now on I'll read a little bit down the page..:D

MasterC 12-27-2002 12:47 AM

ha ha ha, ;) I've been there thinking that, otherwise I wouldn't have known :D

You're welcome, and have fun!

Cool

Grim Reaper 12-27-2002 06:07 AM

Hmmmm, I've run into another problem:

I'm in chapter 6, and copying the kernel headers...i issue the commands it says, and im in the root of the directory tree (/) in the chroot environment...

when i issue them i get the error:
make : *** No rule to make target 'mrproper'. Stop.

i get the feeling im meant to be in some source code directory, but the manual doesn't state where?

MasterC 12-27-2002 08:52 AM

The root of the kernel source is probably what it means. I'm not sure exactly where it's at so I can't take a peek to make sure. But yeah, it probably means the root of the kernel source, so:
/usr/src/sources/linux-2.4.20/
Is where you are meant to be.

That's my guess as this is sometimes referred to in some of the how-to's and is meant the kernel source's root

Cool

Grim Reaper 12-27-2002 06:43 PM

Thanks for that.

Bloody hell, I've been installing everything fine up until now!! :(

Another problem:
Chapter 6: Installing Man-Pages

It says to just issue make install...but how can you do this when there is no makefile?!!

I've tried ./configure but it tells me to use it with ./configure -ask...is that right?

if i do that then i get questions like Do you have the nroff source for man pages? [Yes]

idk!! So i just select yes.

troff command to use [troff -mandoc]: ACK!!! I don't know! i just hit enter

then it spits out at me straight after i hit enter:
./configure: /static/bin/awk: No such file or directory
./configure: /test: =:unary operator expected
./configure: /static/bin/awk: No such file or directory

Ok...i think i'll stop there, because that shouldn't be happening....
how am i _meant_ to compile Man files? :cry:

MasterC 12-27-2002 07:10 PM

Man files aren't compiled, they are simply text files copied over to a specific location.
So you change to the man-pages package:
make install

That's it. All make install does is copy the files to the directory necessary.

Cool

MasterC 12-27-2002 07:11 PM

btw, I'd unpack it again, just to make sure it's fresh and that you didn't mess anything up when you tried:
./configure

And other things.

Cool

Grim Reaper 12-27-2002 07:16 PM

But when i issue just: make install from the /usr/src/sources/man-1.5k directory it gives me this error:
make: *** No rule to make target 'install'. Stop.
:cry:

MasterC 12-28-2002 02:27 AM

Yeah, that's because you are in the wrong package ;)

It's man-pages-1.52

So:
/usr/src/sources/man-pages-1.52:
make install

;)

Unless of course you are here:
http://www.linuxfromscratch.org/view...ter06/man.html

Which of course would have the directions listed on that page ;)

Cool

Grim Reaper 12-28-2002 07:09 AM

ROFLMAO!

/me SLAPS SELF HARD!!!


Thank god your here to point out my stupid mistakes MasterC ::D

Thanks dude!

MasterC 12-28-2002 12:24 PM

Ha ha ha, :D you're welcome ;)

Grim Reaper 12-28-2002 04:01 PM

Lets see if this one can be worked out too :)

Chapter 6 - Installing Glibc

I've patched it fine, I've ran ./configure --with-these-options fine...but when i issue make i get these errors:

Code:

/sysdeps/unix/Subdirs > /usr/src/sources/glibc-build/sysd-dirs-tmp
/bin/sh: /static/bin/gawk: No such file or directory
make[1]: *** [/usr/src/sources/glibc-build/sysd/dirs] Error 127
make[1]: Leaving directory '/usrsrc/sources/glibc-2.2.5'
make: *** [all] Error 2


/static/bin/gawk? what is it? i don't remember installing anything called gawk...or even any stages to install something called gawk...


Edit: I remember now installing Gawk....I did a search and it turns out there is a file in /static/bin/gawk...idk what make is complaining about?!

MasterC 12-28-2002 05:10 PM

Ya got me! IDK either. Here's some tips though (glibc dorked me up too):

I think I went and installed GAWK at this point, it has no dependencies anyway.

Another, make sure you unpacked the linux-threads package in the glibc directory.

Also, see if you can poke around the mail-lists I think that's where I found my solution with my glibc problem(s).

Cool

Grim Reaper 12-29-2002 01:10 AM

Would it 'pollute' my LFS system if i installed GAWK now? like would libraries get scattered throughout the LFS installation?

MasterC 12-29-2002 04:53 AM

I wouldn't think so. You are going to be installing them anyway, it's not like they'd go somewhere they aren't supposed to and still work.

Cool

Grim Reaper 12-29-2002 05:30 AM

ROFL!
Nice theory :)...I'll try installing gawk again, lets see how it goes after that :)

Edit: I think there is something wrong with the compiler in my LFS system...when i go into the gawk source directory and issue the install commands, i get:

Checking whether the C compiler (gcc ) works....no
configure: error: installation or configuration problem: C compiler cannot create executables.


ummm, ACK!


I switched consoles and ive logged in under lfs and installing it with the compiler from slacky (the base distro)

MasterC 12-29-2002 07:59 AM

you mean you've logged in as user LFS? You need to be root once you chroot in Chapter 6.

I wouldn't use the compiler from your source distro, simply for the fact that it's not the one that is for LFS. Also, if the compiler isn't working, there's gotta be a reason, and this reason might be big enough to work on.

Just some thoughts, obviously if it works, and you are happy, then who cares ;)

Cool

Grim Reaper 12-30-2002 01:55 AM

what are the CFLAGS and CXXFLAGS meant to be...i optimised them, but then they said to clear them for the installation of this, so i just went export CFLAGS= and export CXXFLAGS= ....maybe they need to be something other than blank?

also, i installed gawk as the lfs user, non-chrooted...so just like i did before...then i switched back into the terminal that was logged in thru root and was chrooted into /mnt/lfs...then i tried to install glibc again...this time i didn't get that error about gawk not existing...instead i get a more evil looking one :(, heh

Code:

strtod.c: In function '____strold_l_internal':
strtod.c:1562: internal error: Segmentation fault
Please submit a full bug report,
with preproccessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.htm> for instructions.
make[2]: *** [/usr/src/sources/glibc-build/stdlib/strtold_l.o] Error 1
make[2]: Leaving directory '/usr/src/sources/glibc-2.2.5/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory '/usr/src/sources/glibc-2.2.5'
make: *** [all] Error 2

could this possible be to do with the CXXFLAGS and CFLAGS not being set to correct values? if so, what are _default_ values?

edit: fixed up code tags

MasterC 12-30-2002 04:22 AM

Whoa, that does look more evil. I am guessing it's not a gawk problem, but rather that's just where it faulted out at before. I'd re-unpack the source, re-apply the patches, re-unpack linuxthreads in the glibc directory, then try again.

Oh, and when I unset the values, I simply add 2 sets of double quotes:
CXXFLAGS=""

I don't know if that's correct, but it seems to work for me ;)

Cool

Grim Reaper 12-30-2002 06:53 PM

Ok, now I'm REALLY confused...

Before i tried the last installation (that gave me those evil errors) i had removed the source dir and the build dir and tried again, yet hit those errors.

the only thing that i did differently is removed the patch also, and re-unpacked that and tried again, so far i've gotten to "make localedata/install-locales" without any problems, LMFAO

This is one of those strange things that happen just coz it wants to, lolz ;)

MasterC 12-31-2002 12:58 AM

I think sometimes the source gets dorked. If you are using the same unpacked packages from CH5 in CH6, this might cause problems. It's suggested to re-unpack the packages once you get to CH6 to make sure they are clean again.

Sometimes, I have no idea why, but good things just happen ;)

Cool


All times are GMT -5. The time now is 04:44 AM.