Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-14-2005, 02:41 AM   #1
LQ Newbie
Registered: Feb 2005
Posts: 5

Rep: Reputation: 0
Trying to load a driver - gcc can't find a file

Hi! I've just installed a RedHat6 and I'm trying to loan a driver for my realtek cardbus ethernet card. I copied the command

gcc -DCARDBUS -DMODULE -D__KERNEL__ -Wall -Wstric-prototypes -O6 -c rtl8139.c -o realtek_cb.o -I/usr/src/linux/pcmcia-cs-3.1.8/include/pcmcia

from the driver file rlt8139.c and everything else seems to be fine, but gcc gives me the following line and stops:
rtl8139.c:1511: pcmcia/driver_ops.h: No such file or directory.

In the driver source file I can find the lines
#ifdef CARDBUS
#include <pcmcia/driver_ops.h>
which must be the reason for this. The file /driver_ops-h didn't come with the driver floppy, but I found a file installed in my computer in /usr/src/linux/pcmcia-cs-3.0.8/include/pcmcia/driver-ops.h.
I tried copying this file to all the places I could think of hoping gcc would work, but with no success. Now I'm stuck!

Am I missing a file or do I need to change something in the existing file or is there another way of doing this? In the driver floppy there is also a Makefile, but I have absolutely no idea of the make approach, so I feel more comfortable with a 'simple' command like gcc. And wouldn't the same problem with the missing file arise with the makefile, too?

If anybody knows what to do, I would be immensly grateful for some help!

Cheers, Titta
Old 02-14-2005, 04:03 AM   #2
Senior Member
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Do you have a /usr/src/linux/include directory?

If you do, try moving the whole directory (pcmcia) into there. So you would have /usr/src/linux/include/pcmcia/driver-ops.h as I have a feeling this is where it is looking. If it doesn't work, edit the source file to use " insted of < and > (as that tells the compiler to look locally for the file and not in the global includes).
Old 02-14-2005, 05:35 AM   #3
LQ Newbie
Registered: Feb 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Nice one!

I think I already tried moving the directory, but will check that one anyway. I'll try the other one, too, and if it doesn't work I'll be back to you in a couple of days (that's how long it usually takes to try everything out...slow but interesting)!

Thanks a million, Titta


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
where can i load gcc for linux eltn Linux - Software 1 10-20-2004 03:21 PM
Where can find the file containg the information of the printer driver Naveen Sriram Linux - Software 1 09-24-2004 06:05 AM
i can't find driver for dell monitor can some help me find a driver for it krt47 Linux - Hardware 1 07-28-2004 03:16 PM
Unreal Tourny: Failed to load 'OpenGLDrv': Can't find file for package 'OpenGLDrv' r_jensen11 Linux - Software 0 06-21-2004 12:17 AM
Cant find GCC manzoor Programming 3 10-12-2001 02:46 AM > Forums > Linux Forums > Linux - Newbie

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

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