# RPM build errors: No kernel source directory provided.

**URL:** <https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960>\
**Category:** SLES Networking\
**Created:** [October 10, 2011, 10:56am UTC](https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960 "2011-10-10T10:56:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [October 10, 2011, 10:56am UTC](https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960/1 "2011-10-10T10:56:02Z")

</div>

Any help appreciated - I’m lost in a Linux fog

Daryl

A new install of SLES 10 SP2 on IBM xSeries 336 dooes not automatically  
identify on board NIC

I have attempted to install Broadcom drivers (downloaded from Broadcom  
and following the instructions) as follows. But I have an RPM build  
error “No kernel source directory provided.” How do I provide the kernal  
source directory?

Proxy2:~/bin # rpm -ivh tg3-3.116j-1.src.rpm  
1:tg3 ###########################################  
[100%]  
Proxy2:~/bin #

Proxy2:/usr/src/packages # rpmbuild -bb SPECS/tg3.spec  
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.35858

- umask 022RO
- cd /usr/src/packages/BUILD
- cd /usr/src/packages/BUILD
- rm -rf tg3-3.116j
- /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/tg3-3.116j.tar.bz2
- tar -xvvf -  
drwxr-xr-x mcarlson/305 0 2011-01-21 18:50:51 tg3-3.116j/  
-rwxr–r-- mcarlson/305 7837 2011-01-04 20:28:55  
tg3-3.116j/makeflags.sh  
-rw-r–r-- mcarlson/305 399554 2010-12-10 00:38:34 tg3-3.116j/ChangeLog  
-rw-r–r-- mcarlson/305 3888 2011-01-04 20:27:41 tg3-3.116j/Makefile  
-rw-r–r-- mcarlson/305 43934 2011-01-04 20:30:05  
tg3-3.116j/tg3\_firmware.h  
-rw-r–r-- mcarlson/305 445295 2011-01-21 18:50:32 tg3-3.116j/tg3.c  
-rw-r–r-- mcarlson/305 119912 2011-01-07 02:41:10 tg3-3.116j/tg3.h  
-rw-r–r-- mcarlson/305 24624 2011-01-12 02:04:04  
tg3-3.116j/tg3\_vmware.c  
-rw-r–r-- mcarlson/305 37228 2011-01-04 20:29:48  
tg3-3.116j/tg3\_compat.h  
-rw-r–r-- mcarlson/305 15153 2010-11-12 20:40:42 tg3-3.116j/LICENSE  
-rw-r–r-- mcarlson/305 2246 2011-01-04 20:29:56  
tg3-3.116j/tg3\_compat2.h  
-rw-r–r-- mcarlson/305 3445 2011-01-04 20:29:11 tg3-3.116j/tg3.4  
-rw-r–r-- mcarlson/305 2155 2011-01-13 18:44:56  
tg3-3.116j/tg3\_vmware.h  
-rw-r–r-- mcarlson/305 11410 2011-01-21 18:50:50  
tg3-3.116j/README.TXT  
-rw------- mcarlson/305 2437 2011-01-04 20:28:25  
tg3-3.116j/esx\_ioctl.h
- STATUS=0
- ‘[’ 0 -ne 0 ‘]’
- cd tg3-3.116j  
++ /usr/bin/id -u
- ‘[’ 0 = 0 ‘]’
- /bin/chown -Rhf root .  
++ /usr/bin/id -u
- ‘[’ 0 = 0 ‘]’
- /bin/chgrp -Rhf root .
- /bin/chmod -Rf a+rX,u+w,g-w,o-w .
- exit 0  
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.35858
- umask 022
- cd /usr/src/packages/BUILD
- /bin/rm -rf /var/tmp/tg3-3.116j-1-buildroot  
++ dirname /var/tmp/tg3-3.116j-1-buildroot
- /bin/mkdir -p /var/tmp
- /bin/mkdir /var/tmp/tg3-3.116j-1-buildroot
- cd tg3-3.116j
- value=
- ‘[’ -z ‘’ ‘]’  
++ uname -r
- KVER=2.6.16.60-0.21-smp
- make KVER=2.6.16.60-0.21-smp  
sh makeflags.sh \> tg3\_flags.h  
makeflags.sh: No kernel source directory provided.  
make: \*\*\* [tg3\_flags.h] Error 255  
error: Bad exit status from /var/tmp/rpm-tmp.35858 (%build)

RPM build errors:  
Bad exit status from /var/tmp/rpm-tmp.35858 (%build)  
Proxy2:/usr/src/packages #

## – browndj

browndj’s Profile: [http://forums.novell.com/member.php?userid=18897](http://forums.novell.com/member.php?userid=18897)  
View this thread: [http://forums.novell.com/showthread.php?t=446409](http://forums.novell.com/showthread.php?t=446409)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 12, 2011, 8:16am UTC](https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960/2 "2011-10-12T08:16:02Z")

</div>

Before going on the route of installing custom drivers, I am curious as  
to why you are installing freshly using the unsupported SLES 10 SP2  
(which is almost 3 years old) and not going with SLES 10 SP4? It will  
contain newer modules that might make the issue non existant …

-Willem

–  
Novell Knowledge Partner (voluntary sysop)

## It ain’t anything like Harry Potter.. but you gotta love the magic IT can bring to this world

magic31’s Profile: [http://forums.novell.com/member.php?userid=2303](http://forums.novell.com/member.php?userid=2303)  
View this thread: [http://forums.novell.com/showthread.php?t=446409](http://forums.novell.com/showthread.php?t=446409)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 20, 2011, 12:36pm UTC](https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960/3 "2011-10-20T12:36:01Z")

</div>

I’m playing with a test machine and just started with an sp2 install  
disk 🙂  
it’s now upto sp4

## – browndj

browndj’s Profile: [http://forums.novell.com/member.php?userid=18897](http://forums.novell.com/member.php?userid=18897)  
View this thread: [http://forums.novell.com/showthread.php?t=446409](http://forums.novell.com/showthread.php?t=446409)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 20, 2011, 12:46pm UTC](https://forums.suse.com/t/rpm-build-errors-no-kernel-source-directory-provided/21960/4 "2011-10-20T12:46:02Z")

</div>

Kernel source directory found via

Software Management / Filter (Installation Sources) / Choose SLES  
source / selecting “kernel-source” package

I learn more about Linux every day

## – browndj

browndj’s Profile: [http://forums.novell.com/member.php?userid=18897](http://forums.novell.com/member.php?userid=18897)  
View this thread: [http://forums.novell.com/showthread.php?t=446409](http://forums.novell.com/showthread.php?t=446409)
