LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Errors attempting to compile driver using "make" command (https://www.linuxquestions.org/questions/linux-software-2/errors-attempting-to-compile-driver-using-make-command-4175462619/)

Arkon 05-19-2013 06:57 PM

Errors attempting to compile driver using "make" command
 
I'm basicall a brand new linux user.

My wireless card is not working well, and I've downloaded a new driver for it. The text document provides instructions, but when I run the "make" command after navigating to the appropriate folder, I get the following error:


make[1]: Entering directory `/usr/src/linux-headers-3.5.0-27-generic'
gcc: error: /lib/modules/3.5.0-27-generic/build/include/linux/autoconf.h: No such file or directory
gcc: fatal error: no input files
compilation terminated.
scripts/Makefile.build:49: *** CFLAGS was changed in "/home/laura/Documents/Adapter/HAL/rtl8192/Makefile". Fix it to use ccflags-y. Stop.
make[1]: *** [_module_/home/laura/Documents/Adapter/HAL/rtl8192] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-27-generic'
make: *** [all] Error 2

I've googled parts of these error messages, but nothing suggested seems to work. I downloaded the autoconf program from the software center and restarted my desktop, still nothing.

Using Ubuntu 12.10 32 bit.

Happy to provide more info if needed.

Thanks in advance.

Arkon

prushik 05-20-2013 02:11 AM

You should actually run autoconf
make sure you have installed all the autotools packages.
maybe run aclocal and then autoconf, and then ./configure if needed and then make.
Autotools are a pain sometimes.

prushik 05-20-2013 02:21 AM

Quote:

Originally Posted by Arkon (Post 4954519)
I've googled parts of these error messages, but nothing suggested seems to work. I downloaded the autoconf program from the software center and restarted my desktop, still nothing.

Also note that you usually shouldn't be restating all the time. Linux doesn't require reboots like Windows does because Linux doesn't attempt to hide its operations from you like Windows.
If you "fix" a problem by rebooting, then you can't find out what the problem was.

Once you get the driver installed, run:
sudo rmmod rtl8192
sudo modprobe rtl8192

this will start using the new driver without a reboot

Arkon 05-21-2013 03:49 PM

Quote:

Originally Posted by prushik (Post 4954687)
You should actually run autoconf
make sure you have installed all the autotools packages.
maybe run aclocal and then autoconf, and then ./configure if needed and then make.
Autotools are a pain sometimes.

The steps of a new user: I searched for autoconf and didn't see anything to run.
I tried "autoconf" in the terminal. It told me there is no input file.

So how do I "run autoconf"? Or aclocal or the ./configure? I noticed that "run" is not a command which Terminal accepts.

Thanks!

Arkon

jpollard 05-21-2013 05:01 PM

The configure script (if it is there) is usually started with "./configure". The shell interprets the command as the full path to the executable. As long as the script "configure" is in the current directory, AND is marked executable (the usual case) it should start and run.

Normally there can be a number of options - you can usually get those listed out with "./configure --help" or you can just read the script (it is a bit obtuse until you get to the help section though).

Normally, the default options are fine for the type of thing you are doing.

Arkon 05-21-2013 07:27 PM

I'm getting "no such file or directory" when I type ./configure in the terminal. =\

Any other suggestions? And I still don't know how to run autoconf or aclocal.

I appreciate the help thus far. =)

Arkon

prushik 05-21-2013 11:47 PM

How did you download the driver? did you download it as a tarball or from GIT or subversion or cvs or a tarball generated from one of those?

when I said "run autoconf", I meant you should type it on the command line (in the source directory). The purpose of autoconf is to generate the ./configure script which you would then run by typing "./configure". After that, typing make will complete the build process.
However, after re-reading your original question, it seems you may have another error. You should read the files called README and INSTALL which were included in the tarball, these files usually have details about how to compile and install the package. Since we are talking about a driver and not a userland application, the installation details may be different.

One more thing, your original message indicates that the build process is searching for your kernel headers, make sure those are installed or the build will fail, they should be installed through your synaptic, probably called something like "linux-headers-generic" or something like that. After installing those, just running "make" again might work.

knudfl 05-22-2013 12:53 AM

! It's about the kernel "autoconf.h" ! In /usr/src/linux-headers-**

Quote:

3.5.0-27-generic/build/include/linux/autoconf.h: No such file or directory
The file "autoconf.h" has got a new location :
/usr/src/linux-headers-**/include/generated/autoconf.h

Solution : 1) cd /usr/src/linux-headers-3.5.0-27-generic/include/linux/

2) sudo ln -s ../generated/autoconf.h

-

evo2 05-22-2013 01:09 AM

Hi,

I hope this doesn't derail your efforts, but I think it might be a good idea to confirm that:
  1. installing a newer driver is the right thing to do, and
  2. if it is, that you are going about it in the best/simplest way.
So, could you start by telling us what wireless card you have that is "not working well"? The output of the output of the following should suffice:
Code:

lspci | grep -i net
And, can you tell us why you think it is "not working well"? After that we can move on to 2., if needed.

Cheers,

Evo2.

Arkon 05-22-2013 10:57 AM

Quote:

Originally Posted by evo2 (Post 4956280)
Hi,

I hope this doesn't derail your efforts, but I think it might be a good idea to confirm that:
  1. installing a newer driver is the right thing to do, and
  2. if it is, that you are going about it in the best/simplest way.
So, could you start by telling us what wireless card you have that is "not working well"? The output of the output of the following should suffice:
Code:

lspci | grep -i net
And, can you tell us why you think it is "not working well"? After that we can move on to 2., if needed.

Cheers,

Evo2.

Here is the output:
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
03:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)

I did some research and found others that had the same problem as I was having: I can connect to a wireless network, and the connection will work for a little bit, but then I can't communicate over it, even though it says it's still connected. I was told this is because I need a linux specific driver.

Here is the first part of the readme file that came with the driver:

Release Date: 2011-0321, ver 0006
RTL8192CE Linux driver
--This driver supports RealTek rtl8192CE/8188CE PCI Wireless LAN NIC for

2.6 kernel:
Fedora Core, Debian, Mandriva, Open SUSE, Gentoo,
Ubuntu 7.10/8.04/8.10/9.04/9.10/10.04/10.10,
moblin(V2), android-x86_090916, etc.

2.4 kernel:
Redhat 9.0/9.1

Thanks so much for the replies, everyone!

Arkon

evo2 05-22-2013 08:26 PM

Hi,
Quote:

Originally Posted by Arkon (Post 4956587)
Here is the output:
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
03:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)

I did some research and found others that had the same problem as I was having: I can connect to a wireless network, and the connection will work for a little bit, but then I can't communicate over it, even though it says it's still connected. I was told this is because I need a linux specific driver.

That device is more than a few years old, and I suspect the advice you received was outdated. Can you be more specific about where you got that advice?

Quote:

Here is the first part of the readme file that came with the driver:

Release Date: 2011-0321, ver 0006
RTL8192CE Linux driver
--This driver supports RealTek rtl8192CE/8188CE PCI Wireless LAN NIC for

2.6 kernel:
Fedora Core, Debian, Mandriva, Open SUSE, Gentoo,
Ubuntu 7.10/8.04/8.10/9.04/9.10/10.04/10.10,
moblin(V2), android-x86_090916, etc.

2.4 kernel:
Redhat 9.0/9.1
Yes, that driver is for the 2.4 and 2.6 series kernels, you have 3.5 kernel! Note also that it mentions Ubuntu upto version 10.10, and you have 12.10. The correct driver is already in your kernel. You also need some firmware, but you must have that already otherwise it would not be working at all. So, as far as I can tell you do not need to (and indeed won't be able to) compile and install this kernel module you have downloaded.

So, this brings us back to the actual problem. I did a quick search and it seems there are quite a few reports of stability issues with this device. I did not yet see a confirmed solution (there are many suggestions of loading the modules with specific parameters). Before proceeding can you confirm that you see these problems on all wireless networks that you use or just one in particular? If just on one network in particular, are there other devices on this wireless network that have no problems?

Cheers,

Evo2.

Arkon 05-22-2013 08:52 PM

The wireless network I use is a University network, I use my Windows laptop on it all the time with no problems.

Because the Ubuntu system is a desktop, it's a little difficult to take it elsewhere to test other networks, and I really need it to work on this network as it's the only one available to me right now.

Do I just need a new wireless card, then?

Thanks again for the help.

=)

evo2 05-22-2013 09:17 PM

Hi,

ok so it really does seem to be a problem with this device and its driver. After quite a bit of duckduckgo searching I've still not been able to find a solution for this. There are many people posting problems with this device on Ubuntu 12.10, but I don't see any reports of problems for people running Debian with a 3.x kernel. This is a little curious.

As I mentioned this driver needs some firmware. To find out what version you have installed please post the output of:

Code:

dpkg -l linux-firmware
But really I'm a bit stumped. It should "just work".

Evo2.

Arkon 05-22-2013 09:55 PM

Output of dpkg -l linux-firmware is:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-=============-=============-=====================================
ii linux-firmware 1.95 all Firmware for Linux kernel drivers

Thanks again,

Arkon

evo2 05-22-2013 10:12 PM

Hi,

although it seems that 1.95.1 is the latest version from the 1.95.1 changelog there is no difference in the realtek firmware files between 1.95 and 1.95.1.

Running out of ideas, thinking out loud now...

Do you have any other OS installed on that machine? If so how does the wireless work with them? Have you tried reseating the card (turn off computer, remove card from pci slot and then put it back in)?

At this point, if I were you I'd be looking for another wireless card, or trying to get the machine hooked up on a wired network. Sorry I can't be of more help.


Evo2.


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