LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem compling loadablr module (https://www.linuxquestions.org/questions/linux-newbie-8/problem-compling-loadablr-module-149560/)

ramya272 02-23-2004 11:03 AM

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 .......

Oliv' 02-23-2004 11:25 AM

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 ;)

ramya272 02-23-2004 09:57 PM

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

Demonbane 02-23-2004 10:06 PM

try "make"

ramya272 02-24-2004 06:54 AM

i tried make....
not found in ...rules/make error message appears.....
please help

Oliv' 02-24-2004 07:52 AM

What is the package you try to compile? (where do you download it?)

ramya272 02-25-2004 08:23 AM

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

Oliv' 02-25-2004 08:48 AM

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 :D

ramya272 02-25-2004 08:59 AM

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.....

Oliv' 02-25-2004 09:13 AM

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)

ramya272 02-25-2004 09:26 AM

make CC=/opt/gcc-2.95/bin/gcc modules ...
what does this exactly do?cud u plz tell me?

Oliv' 02-25-2004 09:51 AM

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


All times are GMT -5. The time now is 07:47 PM.