Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

'make' never seems to work!

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
alloydog
LXF regular


Joined: Thu Apr 07, 2005 8:32 pm
Posts: 600

PostPosted: Wed Aug 10, 2005 7:40 pm    Post subject: 'make' never seems to work! Reply with quote

I have tried on numerous occassions to 'make' a file, but I always get errors.

Here are two examples:

Code:
#:/home/voyager/programmes/pc-cam_880_driver # ls
CHANGELOG  Makefile  decode-jpg.c  memory.c  zr364xx-0.60         zr364xx.c
COPYING    README    decode-jpg.h  osd.c     zr364xx-0.60.tar.gz
#:/home/voyager/programmes/pc-cam_880_driver # make
   Building zr364xx driver for 2.5/2.6 kernel.
   PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
   Remember: you must have read/write access to your kernel source tree.
make -C /lib/modules/`uname -r`/build/ SUBDIRS=`pwd` modules
make: *** /lib/modules/2.6.7/build/: No such file or directory.  Stop.
make: *** [default] Error 2


and

Code:
/home/voyager/programmes/pc-cam_880-0.2 # ls
COPYING  Makefile  README  app  driver  driver-2.6.diff  pccam880-0.2.tar.gz
#:/home/voyager/programmes/pc-cam_880-0.2 # make
make -C driver
make[1]: Entering directory `/home/voyager/programmes/pc-cam_880-0.2/driver'
Makefile:4: /usr/src/linux/.config: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux/.config'.  Stop.
make[1]: Leaving directory `/home/voyager/programmes/pc-cam_880-0.2/driver'
make: *** [all] Error 2


what am I doing wrong?
Back to top
View user's profile Send private message
Gordon
LXF regular


Joined: Thu Apr 07, 2005 6:01 pm
Posts: 209
Location: Bradford, West Yorkshire

PostPosted: Wed Aug 10, 2005 9:21 pm    Post subject: RE: Reply with quote

I presume you mean building a file from source code? These days you don't just "make" a file.

First of all start again. If your source code package is a .tar.gz file (which it seems to be from your code) then unpack it using the command

tar xvzf xxx.tar.gz

where xxx refers to the rest of the filename before the .tar.gz extension. The source code should unpack into its own directory. Use the cd command to change into this new diretory.

Now just list the files in this new directory with the ls command. If you see a README file of any kind then read this first with the command

less README

Do the same thing for any INSTALL files you see in this directory. If there are any special build procedures for the source code then these files should point them out.

If there is a file in this directory you're in called .configure then in due course you will need to run this file, BUT first try the following; run the command,

./configure --help | less

This will output the configuration options for the code to the screen. If you're happy so far then you need to run the following commands from inside the directory containing the source code;

./configure --prefix=/usr
make

and now as root type

make install

All should now be well. There are some older packages of source code out there which use different methods but these days we rarely come across them.

Hope this helps.
Gordon
_________________
Violence is the last refuge of the incompetent
Back to top
View user's profile Send private message Yahoo Messenger
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8439
Location: Warrington, UK

PostPosted: Wed Aug 10, 2005 9:27 pm    Post subject: RE: Reply with quote

Both of these error indicate you don't have the kernel sources installed. When compiling a driver as a module, the code needs access to the source code for the current kernel. Look for a kernel-source or similarly named package in your distro's package manager.
Back to top
View user's profile Send private message
Erin
LXF regular


Joined: Thu Apr 07, 2005 8:35 pm
Posts: 141
Location: The Olde Smoke south of the River

PostPosted: Wed Aug 10, 2005 9:32 pm    Post subject: RE: Reply with quote

It seems the second make attempt cannot find the kernel header files. You need to install these from your local install CD or repository. Have the ones for the kernel you are running (check this on the command line by typing 'uname -r' sans quotes. The clue was in "Makefile:4: /usr/src/linux/.config: No such file or directory".

However, you do need to read the README files first. If that doesn't make sense or you need more help, reply.

Erin
_________________
Just beneath my skin I'm screaming. Faithless::Insomnia.
Dual PIII 550 with Ubuntu [semi-bleeding].
Back to top
View user's profile Send private message
wiz
LXF regular


Joined: Thu Apr 07, 2005 7:20 pm
Posts: 119
Location: In front of a computer

PostPosted: Wed Aug 10, 2005 9:32 pm    Post subject: Reply with quote

From the diff file it looks like this is going to be a kernel module so you will probably need to have the kernel source code installed in /usr/src/linux.

When you have done this once it is easy but can be a bit hairy trying to figure it out for the first time. Check which kernel you are using and then install the source code for it and try again
Back to top
View user's profile Send private message
wiz
LXF regular


Joined: Thu Apr 07, 2005 7:20 pm
Posts: 119
Location: In front of a computer

PostPosted: Wed Aug 10, 2005 9:34 pm    Post subject: Reply with quote

Hey ! the other two replies sneaked in before mine while i was doing my one finger typing.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8439
Location: Warrington, UK

PostPosted: Wed Aug 10, 2005 10:23 pm    Post subject: Reply with quote

Two finger tipping wins again!
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Erin
LXF regular


Joined: Thu Apr 07, 2005 8:35 pm
Posts: 141
Location: The Olde Smoke south of the River

PostPosted: Wed Aug 10, 2005 10:33 pm    Post subject: Reply with quote

One finger and a rogue cat here!
_________________
Just beneath my skin I'm screaming. Faithless::Insomnia.
Dual PIII 550 with Ubuntu [semi-bleeding].
Back to top
View user's profile Send private message
alloydog
LXF regular


Joined: Thu Apr 07, 2005 8:32 pm
Posts: 600

PostPosted: Thu Aug 11, 2005 12:22 pm    Post subject: Reply with quote

Thanks folks, that was wut I wuz needing.

Now to find the kernel source code...
Back to top
View user's profile Send private message
comcamel
LXF regular


Joined: Thu Apr 07, 2005 6:35 pm
Posts: 205

PostPosted: Sat Oct 15, 2005 10:12 am    Post subject: Reply with quote

i get the same problem than that, but after having a look on line, i thought that the problem was that i was using the gcc 4.0 compiler modules, things such as gimp wouldn't compile at all, however thanks for the idea of the kernel sources.
Back to top
View user's profile Send private message Visit poster's website
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast