LinuxQuestions.org
Latest LQ Deal: Linux Power User 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 02-23-2004, 12:03 PM   #1
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Rep: Reputation: 15
problem compling loadablr module


i tried to compile a multifile module...by giving ./configure.
but the response i get is...dir or file not found...
how do i compile my module?
should i compile all the files individually using gcc?
could someone please explain what ELF not found error means?
waiting .......
 
Old 02-23-2004, 12:25 PM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
What are you exactly trying to compile? In general you compile modules using:
./configure
make
make install
Quote:
should i compile all the files individually using gcc?
I don't think...
Elf is a compilation format... But without more precisions, no one can help you... Send error messages
 
Old 02-23-2004, 10:57 PM   #3
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
im trying to compile a fat filesystem module...(know it exists) but let us assume that i have to compile it now...there are around files and one make file in the fat directory.How do i compile it and get the fat.o working..?./configure when given from inside the module source directory...gives the error

file not found

if i compile the files individually i get the error
elf file not found

please help
 
Old 02-23-2004, 11:06 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try "make"
 
Old 02-24-2004, 07:54 AM   #5
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
i tried make....
not found in ...rules/make error message appears.....
please help
 
Old 02-24-2004, 08:52 AM   #6
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
What is the package you try to compile? (where do you download it?)
 
Old 02-25-2004, 09:23 AM   #7
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
im trying to compile the fat file system module ...it has 8 files in it and a makefile ./configure is not workin,make is not working
 
Old 02-25-2004, 09:48 AM   #8
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
OK
To do that, you are in the wrong way... log as root, and do the following:
cd /usr/src/linux
make menuconfig
then select File Sytem menu then select DOS FAT fs support as module (<M>) and also VFAT (Windows-95) fs support as module... then exit and exit (answer yes to save config)
make clean
make dep
make bzImage (If you want to recompile the kernel, but I think that you can bypass this step)
make modules && make modules_install
At least, your fat module should be located in /lib/modules/<your_kernel_version>/kernel/fs/ directory
now you can modprobe or insmod fat module
 
Old 02-25-2004, 09:59 AM   #9
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
oh...
but i want to manully compile the module using compile commands and load it inside using insmod not have it built like a module while configuring itself.....if suppose i write my own filesystem module i would have to do the compiling on my own rite?...just the same way...but on the fat fs....
please help.....
 
Old 02-25-2004, 10:13 AM   #10
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
either you use make menuconfig which is an equivalent of configure script and then make modules which is the equivalent of make. Moreover, if you have specific requirements, you can pass args to your make command like: make CC=/opt/gcc-2.95/bin/gcc modules ...
or you have to modify (in fact rewrite) the Makefile script to fit your need... but according to me there's no interests as the previous commands do it for you (unless you don't have full kernel sources)
 
Old 02-25-2004, 10:26 AM   #11
ramya272
Member
 
Registered: Feb 2004
Posts: 41

Original Poster
Rep: Reputation: 15
make CC=/opt/gcc-2.95/bin/gcc modules ...
what does this exactly do?cud u plz tell me?
 
Old 02-25-2004, 10:51 AM   #12
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
I have two compilers install on my PC: gcc-3.3.2 (the default which is installed in /usr/bin) and gcc-2.95.3 because kernel developpers advice to compile kernel with gcc-2.95 for stability reasons (kernel stability with gcc-3 is not still fully tested). So when I compile module s, I have to compile them with the same gcc that I compiled my kernel.
And when I compile my kernel, if I type:
make bzImage... It will use the first compiler it find in my path: gcc3.3.2
So to force it to use my gcc-2.95, I add the flag: CC=/path/where/my/compilo/is
 
  


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
Compling A New Kernel mullet Slackware 7 08-26-2004 06:04 PM
fglrx module not found but X runs using module biger problem though HELP! fireicer Linux - Newbie 4 07-30-2004 05:44 PM
problem in compling kernel 2.6.6 rexhack Linux - Software 0 05-25-2004 03:21 AM
compling c++ LinuxTiro Programming 16 08-30-2003 07:04 AM
Compling GUI C++ example CragStar Programming 10 05-24-2002 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:26 AM.

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