POV-Ray : Newsgroups : povray.off-topic : Compiling stuff Server Time
5 Nov 2024 11:17:36 EST (-0500)
  Compiling stuff (Message 14 to 23 of 283)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Eero Ahonen
Subject: Re: Compiling stuff
Date: 8 Dec 2008 13:57:43
Message: <493d6e27@news.povray.org>
Invisible wrote:
> 
> I still don't entirely "get" why you would ever recompile the OS kernel.
> I mean, all it does is memory allocation, interrupt scheduling, etc.
> What's to change?
> 

1) Upgrade.

2) Add support to stuff (eg. new devices)


-Aero


Post a reply to this message

From: Eero Ahonen
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:11:04
Message: <493d7148$1@news.povray.org>
Invisible wrote:
> 
> Indeed yes.
> 
> Since even quite "large" programs take only a few seconds to compile,
> the Linux kernel must be *huge*...

So POV-Ray is much more than large? The machine I compiled it earlier
with is equipped with AMD Athlon64 X2 4450e ie. 2,3GHz dual-core, 64-bit
Athlon and 8GiB of memory. It's not the fastest machine on Earth, but I
wouldn't call it a slow one either (yet, after a year or two I'll
probably do that).

>> OpenOffice takes couple of hours IIRC.
> 
> ...and OpenOffice must be absolutely gigantic. 

Yes, it is a mammoth.

grunka ~ # du -hs /var/tmp/portage/app-office/openoffice-3.0.0/work/ooo/
2.6G    /var/tmp/portage/app-office/openoffice-3.0.0/work/ooo/

> But then, it's a pretty
> complex bit of software, so you'd expect that. The Linux kernel's job
> seems quite a bit simpler by comparison.

Errrr... It's not that simple. Try and make similar thing yourself.

btw:
grunka src # du -hs linux-2.6.26-gentoo-r4/
316M    linux-2.6.26-gentoo-r4/

That is non-compiled, non-configured set, ie. just kernel sources
equipped with Gentoo's patchset. So yes, it is huge :).

>> Linux kernel inholds
>> drivers for most of the hardware you're using (possibly even all of
>> them), does memory allocating, process handling, networking,
>> firewalling, RAID-handling, even cryptographic thingies.
> 
> Ah yes, I'm forgetting: The Linux "kernel" isn't just the OS kernel. How
> silly of me...

Linux kernel is a monolithic kernel, not a microkernel.

http://en.wikipedia.org/wiki/Microkernel
http://en.wikipedia.org/wiki/Monolithic_kernel

> (It probably contains drivers for every piece of hardware known to
> mankind, even if you don't need it. And I'll bet even if you disable
> those parts, it still has to process that part of the source code to
> decide whether or not to compile it...)

No, it doesn't :(. That's one reason why Windows is still much more
widely used in workstations and especially in gaming computers.

I dunno exactly what the system checks from the source when I leave eg.
floppy disk driver out, but it does make the whole process faster.

-Aero


Post a reply to this message

From: Eero Ahonen
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:13:14
Message: <493d71ca$1@news.povray.org>
Mueen Nawaz wrote:

> 
> 	8-10 minutes is not that long. I've been running Gentoo for over 5
> years on the same machine, so I can tell you how long it took for any
> package I've ever compiled via Portage.

Ooh, I've clearly missed some information, where is that written?

-Aero


Post a reply to this message

From: Tom Austin
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:18:25
Message: <493d7301$1@news.povray.org>
Jim Henderson wrote:
> On Mon, 08 Dec 2008 14:00:24 +0000, Invisible wrote:
> 
>> Kyle wrote:
>>> That's funny.  Been there.
>> "...I'm too late." ;-)
>>
>>>> Do you have *any idea* how long it takes to compile the Linux kernel?
>>>> I mean, damn, how *big* is it?? I thought the final binary was only a
>>>> few KB in size...
>>> The wait is even more fun the second time around, after you realize you
>>> forgot to configure a necessary driver into your custom kernel. :D
>> I still don't entirely "get" why you would ever recompile the OS kernel.
>> I mean, all it does is memory allocation, interrupt scheduling, etc.
>> What's to change?
> 
> Driver support beyond what's in your shipping kernel.
> 
>> Also... Gentoo is the only Linux distro I've ever seen where compiling
>> the kernel was actually successful. Every other distro managed to either
>> spit cryptic error messages at me, or just leave me with a nonbootable
>> system.
> 
> Well, I've compiled on RedHat and on openSUSE, as well as having 
> installed Slackware and Linux From Scratch and compiled kernels for them.
> 
> Try LFS, that'll really teach you a lot about linux, even if you don't 
> get a bootable system.
> 
> Jim

It's not too hard to get a bootable LFS system - and if it is hard and 
you get it to boot, then you've learned a lot!

I must admit, I cheat and use the automated build now days.


Post a reply to this message

From: Tom Austin
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:22:31
Message: <493d73f7$1@news.povray.org>
Jim Henderson wrote:
> On Mon, 08 Dec 2008 13:31:27 +0000, Invisible wrote:
> 
>> http://xkcd.com/456/
>>
>> Mmm... I did this.
>>
>> Do you have *any idea* how long it takes to compile the Linux kernel? 
> 
> It depends.
> 
> On a lot of things, like how fast your system is, whether it's multi-core 
> (if made with -j that will do parallel compilation, speeding things up a 
> bit), how much memory you have, how fast your disk I/O channel is, memory 
> channel, etc.
> 
>> I
>> mean, damn, how *big* is it?? 
> 
> It depends.
> 
> On a lot of things, like which modules you compile into the kernel, 
> compile as kernel modules, or don't compile.  Also on which options you 
> actually enable.
> 
>> I thought the final binary was only a few
>> KB in size...
> 
> It depends.
> 
> On my 64-bit system, the kernel is about 2.1 MB in size, but that doesn't 
> include 108 MB of modules for this specific kernel.
> 
>> Oddly, X11 also takes forever.
> 
> It's a lot of code, video drivers for many different types of cards.
> 
>> (It's no surprise however that Firefox and OpenOffice are slow as hell.
>> Oh, and KDE... *very* slow!)
>>
>> Damn, I really don't know why the hell I did that...
> 
> Well, now you've learned something - LFS does take time. :-)
> 
> Jim


Hey Jim, sounds like you are into the LFS stuff as well.

I'm going through the book "Building Embedded Linux Systems" and they 
refer to CLFS quite a bit.  Seems like those guys made the earth move a 
bit -;)



Tom


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:31:20
Message: <493d7608@news.povray.org>
Jim Henderson wrote:
> Building GCC on Sun systems was fun - IIRC, it compiled itself three
> times, first time using the commercial compiler that came with the OS,
> and then two separate passes with GCC itself to optimize its own code.

Yep, the three-phase bootstrapping. I think the final step is building
itself with itself and comparing both executables, to make sure everything
worked.


Post a reply to this message

From: Orchid XP v8
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:39:57
Message: <493d780d$1@news.povray.org>
>> Building GCC on Sun systems was fun - IIRC, it compiled itself three
>> times, first time using the commercial compiler that came with the OS,
>> and then two separate passes with GCC itself to optimize its own code.
> 
> Yep, the three-phase bootstrapping. I think the final step is building
> itself with itself and comparing both executables, to make sure everything
> worked.

I understand the Haskell compiler (GHC) does something similar. First, 
you obtain a copy of GHC compiled into ANSI C. Then you use that to 
compile the original Haskell source code for GHC.

The fun part, of course, as that was well as a working Haskell compiler, 
you need a working Haskell runtime engine and a set of working Haskell 
base libraries (which hook directly into the runtime and are partly 
hard-wired into the compiler)... ;-)

Apparently building GHC is... nontrivial. And poorly-documented.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: nemesis
Subject: Re: Compiling stuff
Date: 8 Dec 2008 14:45:00
Message: <web.493d788b80411eecdaf6be9f0@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> >> Do you have *any idea* how long it takes to compile the Linux kernel? I
> >> mean, damn, how *big* is it?? I thought the final binary was only a few
> >> KB in size...
> >
> > Usually 8-10 minutes IME.
>
> Exactly. "Normal" programs take less than 4 *seconds* to compile! o_O

An OS kernel is not hello world where all the libs are already compiled.  A
kernel is pretty much a program and its own libs, plus any device drivers and
more.

Have you ever tried to compile a compiler, BTW?  Like GCC or GHC?  come back
when you do.

In the comics, I like it how the hair grows on the kid.  Indeed, it happened to
a friend.  I think he thought the point of Linux was to have fun compiling
everything by hand.  He gave up once he had already recompiled the kernel and
installed Microsoft fonts in X.  No more fun I guess... :P


Post a reply to this message

From: Darren New
Subject: Re: Compiling stuff
Date: 8 Dec 2008 15:04:58
Message: <493d7dea$1@news.povray.org>
Jim Henderson wrote:
> Driver support beyond what's in your shipping kernel.

I've added drivers that didn't need a kernel recompile. Admittedly, I don't 
think they showed up in the file system as such (i.e., they didn't show up 
in /dev), but I didn't need that.

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

From: Darren New
Subject: Re: Compiling stuff
Date: 8 Dec 2008 15:06:33
Message: <493d7e49$1@news.povray.org>
Invisible wrote:
> Since even quite "large" programs take only a few seconds to compile, 

You're making me nostalgic for the days of 45-minute link times *after* you 
compile to get a program that fit on a 360K floppy disk. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   The NFL should go international. I'd pay to
   see the Detroit Lions vs the Roman Catholics.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.