LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compiling using Cygwin (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-using-cygwin-838137/)

Kronus980 10-14-2010 08:09 PM

Compiling using Cygwin
 
Hello. New to this kernel stuff :D But not too new to C/C++. I'm trying to compile the linux kernel on a PC, that is running Wiindows XP 32 bit, using Cygwin. I keep getting the error saying:

Error: Not ELF
make[2]:*** [scripts/mod/elfconfig.h] Error 1
make[1]:*** [scripts/mod] Error 2
make:***[scripts] Error 2

Every time I try to compile it from the main directory of the source, which I hope is what I'm supposed to do, I always get this. Please helps me :(

AlucardZero 10-14-2010 08:31 PM

What cross-compiler are you using?

Kronus980 10-14-2010 08:39 PM

The only one cygwin lets me download. Gcc and G++ I think?

AlucardZero 10-14-2010 08:45 PM

That's not a cross compiler, that's a compiler.

http://readlist.com/lists/cygwin.com...n/3/15637.html

You need a special-purpose compiler to compile on Cygwin code meant for Linux. Does one exist? I have no idea.

Kronus980 10-14-2010 08:46 PM

O.o So I need one of those? Gosh I feel stoopid :S Does Cygwin have any for download under that list thingy?
Edit: Cygwin doesn't have a Cross Compile for me to download. So which would you recommend? And which folder in Cygwin would I put it in.

John VV 10-14-2010 09:10 PM

build the kernel on the operating system you intend to run it on

mind you cygwin like mingw are NOT LINUX installs they are emulators
for Cygwin EVERYTHING runs through the "cygwin.dll" to the windows os

also have you googled the error ??
"Error: Not ELF"

have you looked up ELF
http://en.wikipedia.org/wiki/Executa...inkable_Format
Quote:

Does Cygwin have any for download under that list thingy?
thingy ????????
you mean the gui software installer ( also known as cygwin.exe)
the answer
NO
you would need to build one from scratch , a hacked( for the cygwin environment) source build .
and most likely never work .

Kronus980 10-14-2010 11:12 PM

So is it possible or not? I don't see why it can't.. I know that Cygwin is an emulator, and that it's NOT Linux, but it emulates Linux.. it should work. So yeha.... is it possible??

John VV 10-14-2010 11:34 PM

you might ?? but as an emulater the cygwin.dll uses the Microsoft kernel
Quote:

New to this kernel stuff
if you want to learn about the kernel then install a linux distro and learn how to build and hack it IN A LINUX environment

it i wanted to study -- say birds i would not do it under water
nor would i study fish from the air

if you wnat to learn Microsoft - use microsoft
if you want to learn linux kernel then use a linux distro

Kronus980 10-14-2010 11:37 PM

Rrrrg!!!! I was afraid of that :/ How about open Solarus? :D Haha. But if I'm gonna use Linux, which would you recommend?

John VV 10-14-2010 11:52 PM

for a very new user
Mint Linux has a very good rep as very new user freindly
get some experience on building code and installing programs , then in say 6 months to 2 to 3 years
install Arch linux
or
"linux from scratch " LFS is a you build EVERYTHING from the ground up - not for the very new to linux person


but try a few first
i would start with mint then debain and CentOS then opensuse then Fedora or Arch
then LFS or Slackware

all of these do things DIFFERENTLY ( some VERY VERY differently )


if you want to dive a "stock car" you MUST start with the go-carts

Kronus980 10-14-2010 11:57 PM

Err... I didn't like mint sooo much... is there any other recommended beginner OS?

John VV 10-15-2010 12:11 AM

any from the page hit list on
http://distrowatch.com/
but keep in mind that fedora is a VERY very fast research and development distro
and as a testing distro ( testing just how far things can be pushed before breaking)
not great for the new user but one that if you want to LEARN by fixing things when they do not work .

Ubuntu is nice

openSUSE , but you better have a VERY high end computer ( i5 cpu and 8 gig ram)
suse troughs in EVERYTHING ,including the kitchen sink -- then for good measure your neighbors kitchen sink too.
it is a bit bloated .

Debain - very stable great for a server and lab and office
PCLinuxOS - a lot of people really like this one , i have never used it

Kronus980 10-15-2010 01:28 AM

So.. Uhmmm.. Like... the best way to compile the linux kernel would be to use it on Linux?And I'm going with Mint -.- SO yeah. Best way to build the kernel would be on Linux?

AlucardZero 10-15-2010 06:03 AM

Just because gcc on Cygwin and gcc on Linux both happen to generate code that runs on the x86 does not mean they are in any way the same platform, so you absolutely cannot use the Cygwin gcc to build a Linux kernel.

So, YES, learn Linux on Linux and compile the kernel on Linux.

Kronus980 10-16-2010 08:30 PM

So I would need a cross compiler? I can't dl a binary version?


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