LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Is Perl absolutely necessary to compile the kernel? (http://www.linuxquestions.org/questions/linux-kernel-70/is-perl-absolutely-necessary-to-compile-the-kernel-918244/)

rivercat 12-11-2011 07:23 PM

Is Perl absolutely necessary to compile the kernel?
 
I was hoping it was only used for a test suite, "make check", or another optional step.

I heard that perl had an absolutely crappy syntax, and would prefer to avoid it.

davemguru 12-11-2011 08:06 PM

short answer - no.
"gcc" and make are used.

There are a bunch of "make utilities" things like "autoconf" and others. But, whenever you find some software that you need to compile - it should have a README in it that will tell you about the tools required to make/build/compile it.

Dave

Telengard 12-11-2011 09:09 PM

Quote:

Originally Posted by rivercat (Post 4547513)
I heard that perl had an absolutely crappy syntax, and would prefer to avoid it.

Decide for yourself. Can you guess what this does?

Code:

perl -pae '{%s=();$_=join " ",(grep{!$s{$_}++}@F)."\n"}' input_file
No?
http://www.linuxquestions.org/questi...4/#post4545233

Sorry for being OT :p

syg00 12-11-2011 09:51 PM

This must rank amongst the most bizarre threads (in this forum - there are plenty more in General) ...

sundialsvcs 12-12-2011 09:06 AM

... and completely off-topic. "When in Rome, do as the Romans do." You want "to build a Linux kernel (from this-or-that distro)," i.e. this is not http://www.linuxfromscratch.org, and so your true objective is: get 'er done. Watch the friendly neighborhood Centurions as they walk by, and try to imitate them. (Watch out for those swords... they're sharp.)

theNbomr 12-13-2011 06:45 PM

Quote:

Originally Posted by rivercat (Post 4547513)
I heard that perl had an absolutely crappy syntax, and would prefer to avoid it.

To be clear, it may require a Perl interpreter to build a kernel, and I've built lots of kernels but never written a single line of Perl code to do so. Whether the tools are written in Perl, C, C++ or Pascal shouldn't matter as long as they end up generating a functional kernel and related bits. I really have no idea what all of the kernel building tools are created with, and I don't see why anyone would care.

--- rod.

Cedrik 12-13-2011 07:12 PM

Quote:

Originally Posted by Telengard (Post 4547567)
Decide for yourself. Can you guess what this does?

Code:

perl -pae '{%s=();$_=join " ",(grep{!$s{$_}++}@F)."\n"}' input_file
No?
http://www.linuxquestions.org/questi...4/#post4545233

Sorry for being OT :p

It is not that difficult, it is mainly a perl grep function trick
(perldoc -f grep). It makes an array for each key of %s hash (from @F which is array of input fields created by -a option) which has zero value (!$s{$_})


All times are GMT -5. The time now is 03:35 AM.