LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2010, 09:09 PM   #1
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Rep: Reputation: 1
Compiling using Cygwin


Hello. New to this kernel stuff 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

Last edited by Kronus980; 10-14-2010 at 09:10 PM.
 
Old 10-14-2010, 09:31 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
What cross-compiler are you using?
 
Old 10-14-2010, 09:39 PM   #3
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
The only one cygwin lets me download. Gcc and G++ I think?
 
Old 10-14-2010, 09:45 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
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.

Last edited by AlucardZero; 10-14-2010 at 09:46 PM.
 
Old 10-14-2010, 09:46 PM   #5
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
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.

Last edited by Kronus980; 10-14-2010 at 10:16 PM.
 
Old 10-14-2010, 10:10 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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 .
 
Old 10-15-2010, 12:12 AM   #7
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
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??
 
Old 10-15-2010, 12:34 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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
 
Old 10-15-2010, 12:37 AM   #9
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
Rrrrg!!!! I was afraid of that :/ How about open Solarus? Haha. But if I'm gonna use Linux, which would you recommend?
 
Old 10-15-2010, 12:52 AM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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
 
Old 10-15-2010, 12:57 AM   #11
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
Err... I didn't like mint sooo much... is there any other recommended beginner OS?
 
Old 10-15-2010, 01:11 AM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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
 
Old 10-15-2010, 02:28 AM   #13
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
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?
 
Old 10-15-2010, 07:03 AM   #14
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
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.
 
Old 10-16-2010, 09:30 PM   #15
Kronus980
Member
 
Registered: Oct 2010
Location: California
Distribution: Ubuntu 12.10 x64
Posts: 41

Original Poster
Rep: Reputation: 1
So I would need a cross compiler? I can't dl a binary version?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling in Cygwin tralli Linux - Newbie 2 05-22-2010 08:19 AM
Help with compiling gcc under cygwin amadhusudan General 0 05-26-2008 05:07 AM
cygwin compiling PatrickNew Programming 6 07-27-2007 03:54 PM
cygwin -> compiling lib3ds hylke General 0 06-21-2005 03:02 AM
compiling opengl with cygwin adhara Programming 0 07-28-2004 06:58 AM


All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration