Help with 'Make'

Hello and thanks for the help! I’ve been at this for hours now, and have googled it to death.

I’ve downloaded a linux driver for my wireless card (Realtek 8191SE), and whenever I try to make it it gives me the following error:

make: *** /lib/modules/2.6.31.5-0.1-desktop/build: No such file or directory. Stop.
make: *** [all] Error 2

I have installed make, pattern devel_basis devel_C_C++, kernel-source, linux-kernel-headers, gcc43, etc.

I also tried linking them:

ln -s /usr/src/kernel-headers-2.6.31.5-0.1-desktop /lib/modules/2.6.31.5-0.1-desktop/build

ln: creating symbolic link `./build’: File exists

linux-ynct:/lib/modules # ls
2.6.31.14-0.1-debug 2.6.31.14-0.1-desktop 2.6.31.5-0.1-desktop
2.6.31.14-0.1-default 2.6.31.14-0.1-xen

I have no idea why the make isn’t working. Any thoughts? Thanks!

Install the pattern “Linux Kernel Development”, you probably miss something.

I also tried linking them:

ln -s /usr/src/kernel-headers-2.6.31.5-0.1-desktop /lib/modules/2.6.31.5-0.1-desktop/build

ln: creating symbolic link `./build’: File exists

This would be the wrong symbolic link anyway. Instead, install package ‘kernel-desktop-devel’.

Thank you both so much for the help! I tried:

zypper in -t pattern devel_kernel, which extracted quite a few things, as well as
zypper install kernel-desktop-devel, which didn’t have anything new to unpack

Unfortunately when I went back to the directory of my driver and tried ‘make’ again, it gave the same error as above.

Any further thoughts?

What is the output of:

ls -l /lib/modules/2.6.31.5-0.1-desktop/

Mine looks like this:

# ls -l /lib/modules/2.6.34-12-desktop/
total 2268
lrwxrwxrwx  1 root root     41 Sep 24 10:10 build -> /usr/src/linux-2.6.34-12-obj/i386/desktop                                                                  
drwxr-xr-x 13 root root   4096 Sep 24 10:23 kernel
-rw-r--r--  1 root root 547829 Sep 24 11:58 modules.alias
-rw-r--r--  1 root root 525366 Sep 24 11:58 modules.alias.bin
-rw-r--r--  1 root root   4215 Jul  5 15:44 modules.builtin
-rw-r--r--  1 root root   5572 Sep 24 11:58 modules.builtin.bin
-rw-r--r--  1 root root 236874 Sep 24 11:58 modules.dep
-rw-r--r--  1 root root 354520 Sep 24 11:58 modules.dep.bin
-rw-r--r--  1 root root    196 Sep 24 11:58 modules.devname
-rw-r--r--  1 root root  94248 Jul  5 15:44 modules.order
-rw-r--r--  1 root root    131 Sep 24 11:58 modules.softdep
-rw-r--r--  1 root root 224418 Sep 24 11:58 modules.symbols
-rw-r--r--  1 root root 289072 Sep 24 11:58 modules.symbols.bin
lrwxrwxrwx  1 root root     24 Sep 24 10:10 source -> /usr/src/linux-2.6.34-12
drwxr-xr-x  2 root root   4096 Sep 24 10:27 systemtap
drwxr-xr-x  2 root root   4096 Sep 24 10:23 vdso

and:

# ls -l /usr/src/linux-2.6.34-12-obj/i386/desktop
total 796
-rw-r--r-- 1 root root 112939 Jul  5 15:43 .config
-rw-r--r-- 1 root root    512 Jul  5 15:51 Makefile
-rw-r--r-- 1 root root    313 Jul  5 14:23 Module.base
-rw-r--r-- 1 root root  20051 Jul  5 14:23 Module.supported
-rw-r--r-- 1 root root 662159 Jul  5 15:49 Module.symvers
drwxr-xr-x 5 root root   4096 Sep 24 10:10 include
drwxr-xr-x 7 root root   4096 Sep 24 10:10 scripts

Your paths may differ a bit due to the kernel version numbers. I am on 11.3 here.

Here’s my output:

david@linux-ynct:~> ls -l /lib/modules/2.6.31.5-0.1-desktop/
total 2084
lrwxrwxrwx 1 root root 46 2010-10-06 13:00 build -> /usr/src/linux-2.6.31.5-0.1-obj/x86_64/desktop
drwxr-xr-x 12 root root 4096 2010-10-06 13:00 kernel
-rw-r–r-- 1 root root 501558 2010-10-06 14:59 modules.alias
-rw-r–r-- 1 root root 475025 2010-10-06 14:59 modules.alias.bin
-rw-r–r-- 1 root root 3902 2009-10-27 11:32 modules.builtin
-rw-r–r-- 1 root root 5163 2010-10-06 14:59 modules.builtin.bin
-rw-r–r-- 1 root root 223170 2010-10-06 14:59 modules.dep
-rw-r–r-- 1 root root 333301 2010-10-06 14:59 modules.dep.bin
-rw-r–r-- 1 root root 87107 2009-10-27 11:32 modules.order
-rw-r–r-- 1 root root 206085 2010-10-06 14:59 modules.symbols
-rw-r–r-- 1 root root 264820 2010-10-06 14:59 modules.symbols.bin
lrwxrwxrwx 1 root root 27 2010-10-06 13:00 source -> /usr/src/linux-2.6.31.5-0.1
drwxr-xr-x 2 root root 4096 2010-10-06 13:01 systemtap
drwxr-xr-x 2 root root 4096 2010-10-06 14:59 updates
drwxr-xr-x 2 root root 4096 2010-10-06 13:00 vdso

and here (hopefully) is the problem, I don’t think I have the right files in usr/src/:

david@linux-ynct:~> cd /usr/src/
david@linux-ynct:/usr/src> ls
linux linux-2.6.31.14-0.1 linux-2.6.31.14-0.1-obj linux-obj packages

I’m not sure if this is useful:

david@linux-ynct:/usr/src/linux-2.6.31.14-0.1-obj/x86_64> ls -l desktop
total 636
drwxr-xr-x 5 root root 4096 2010-10-06 14:00 include
drwxr-xr-x 2 root root 4096 2010-10-06 14:00 include2
-rw-r–r-- 1 root root 520 2010-09-21 00:23 Makefile
-rw-r–r-- 1 root root 187 2010-09-20 23:27 Module.base
-rw-r–r-- 1 root root 18599 2010-09-20 23:27 Module.supported
-rw-r–r-- 1 root root 607916 2010-09-21 00:22 Module.symvers
drwxr-xr-x 7 root root 4096 2010-10-06 14:00 scripts

I’m hope the problem is quite obvious (I can certainly see the kernel #s don’t match), but as a complete beginner I still am not sure how to go about fixing this. Thanks again!

I still am not sure how to go about fixing this.

Some thoughts, what I would do. My first step would be to fire up yast (software installation), use the search function there and display whatever “kernel*” thingies I have installed. The “Version” tab would show me where they are from (what repository) and what other versions are available. I would up- or downgrade to make them all the same version (rather upgrade). While doing this I would make sure that I have only activated the oss, non-oss and update repository, giving me a consistent install.

Well I updated everything as you suggested, and now I’m getting a new error: apparently gcc isn’t recognizing ‘cc1’:

make

make[1]: Entering directory /usr/src/linux-2.6.31.14-0.1-obj/x86_64/desktop' make -C ../../../linux-2.6.31.14-0.1 O=/usr/src/linux-2.6.31.14-0.1-obj/x86_64/desktop/. modules /usr/src/linux-2.6.31.14-0.1/arch/x86/Makefile:80: stack protector enabled but no compiler support CC [M] /tmp/rtl8192se_linux_2.6.0017.0705.2010/HAL/rtl8192/rtl_core.o gcc: error trying to exec 'cc1': execvp: No such file or directory make[4]: *** [/tmp/rtl8192se_linux_2.6.0017.0705.2010/HAL/rtl8192/rtl_core.o] Error 1 make[3]: *** [_module_/tmp/rtl8192se_linux_2.6.0017.0705.2010/HAL/rtl8192] Error 2 make[2]: *** [sub-make] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory /usr/src/linux-2.6.31.14-0.1-obj/x86_64/desktop’
make: *** [all] Error 2

I tried re-installing every package that had ‘cpp’ in it, and that did nothing. Any suggestions?

Thanks again for the help!

gcc: error trying to exec ‘cc1’: execvp: No such file or directory

Sorry to say so, but your install really seems to be borked.

I tried re-installing every package that had ‘cpp’ in it, and that did nothing.

The first step in debugging a problem is always to understand what happens and/or what is going wrong. cc1 is the gcc precompiler. It is in package ‘cpp44’. This should provide the following file:

/usr/lib/gcc/i586-suse-linux/4.4/cc1

Your actual path may differ, because you have x86_64. Can you check that cc1 is there?

software.opensuse.org: Suchergebnisse - rtl8192se

Praise you Akoellh!!! This is incredible!! I can’t believe that after all of this effort, that took care of everything in one click!! Thank you so much, I literally raised my laptop over my head in triump when the wireless started working.

As for the make, I think it is still broken, and I’m not sure when I’m going to need it again but it is not dire anymore. Checking in that file I couldn’t find cc1, and I’d gladly take recommendations as to how to fix it:

/usr/lib/gcc/i586-suse-linux/4.4> ls
collect2 crtend.o crtprec64.o libgcc.a libgomp.a
crtbegin.o crtendS.o crtprec80.o libgcc_eh.a libgomp.so
crtbeginS.o crtfastmath.o include libgcc_s.so libgomp.spec
crtbeginT.o crtprec32.o include-fixed libgcov.a

Thank you so much Vodoo for helping me with everything. If there is a convenient way to fix my gcc I’d appreciate it, but otherwise I’m a happy camper for the time being.

You guys are the best, thanks again!