Ubuntu 11 Compiler linux-2.6 kernel error, give partial compilation problem solving __linux

Source: Internet
Author: User
Tags mutex vars
# configuration written to. config
#
MAKE[2]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
Make extraversion=dell1400 arch=i386 Prepare
MAKE[2]: Entering directory '/home/gdsdj/src/linux-2.6.19 '
Scripts/kconfig/conf-s Arch/i386/kconfig
MAKE[2]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
MAKE[2]: Entering directory '/home/gdsdj/src/linux-2.6.19 '
CHK Include/linux/version.h
CHK include/linux/utsrelease.h
MAKE[2]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
echo Done > debian/stamp/conf/kernel-conf
MAKE[1]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
Make-f Debian/rules Debian/stamp/conf/full-changelog
MAKE[1]: Entering directory '/home/gdsdj/src/linux-2.6.19 '
= = = = Making target Debian/stamp/conf/full-changelog [new prereqs:]======
For file in Changelog Control control.bin86 config templates.in rules; Do \
Cp-f/usr/share/kernel-package/$file./debian/; \
Done
For dir in Config docs examples ruleset Scripts pkg po; Do \
cp-af/usr/share/kernel-package/$dir./debian/; \
Done
Install-p-M 755/usr/share/kernel-package/rules debian/rules
Sed-e ' s/=v/2.6.19dell1400/g '
-E ' s/=d/2.6.19dell1400-10.00.custom/g '-e ' s/=a/i386/g ' \
-e ' s/=sa//g ' \
-e ' s/=i//g ' \
-e ' s/=cv/2.6/g ' \
-E ' s/=m/unknown Kernel Package maintainer < unknown@unconfigured.in.etc.kernel-pkg.conf>/g ' \
-E ' s/=st/linux/g '-e ' s/=b/i386/g ' \
/usr/share/kernel-package/control > Debian/control
Sed-e ' s/=v/2.6.19dell1400/g '-e ' s/=d/2.6.19dell1400-10.00.custom/g '
-E ' s/=a/i386/g '-e ' s/=m/unknown Kernel Package maintainer < unknown@unconfigured.in.etc.kernel-pkg.conf>/g ' \
-E ' s/=st/linux/g '-e ' s/=b/i386/g ' \
/usr/share/kernel-package/changelog > Debian/changelog
chmod 0644 Debian/control Debian/changelog
Make-f Debian/rules debian/stamp/conf/kernel-conf
MAKE[2]: Entering directory '/home/gdsdj/src/linux-2.6.19 '
MAKE[2]: "debian/stamp/conf/kernel-conf" is up to date.
MAKE[2]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
MAKE[1]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
echo Done > Debian/stamp/conf/minimal_debian
EXEC debian/rules append_to_version=dell1400 initrd=yes kernel_image kernel-headers
= = = = Making target Debian/stamp/conf/vars [new prereqs:]======

= = = = Making target Debian/stamp/build/kernel [new prereqs:vars]======
This is kernel package version 12.036+nmu1.
Restore_upstream_debianization
Test!    -F Scripts/package/builddeb.kpkg-dist | | Mv-f scripts/package/builddeb.kpkg-dist Scripts/package/builddeb
Test!    -F Scripts/package/makefile.kpkg-dist | | Mv-f scripts/package/makefile.kpkg-dist Scripts/package/makefile
/usr/bin/make extraversion=dell1400 arch=i386 \
Bzimage
MAKE[1]: Entering directory '/home/gdsdj/src/linux-2.6.19 '
CHK Include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC SCRIPTS/MOD/SUMVERSION.O
The following is the error hint, add the red Word, added on the disorderly order, comment on the:
SCRIPTS/MOD/SUMVERSION.C: In the function ' get_src_version ':
Scripts/mod/sumversion.c:384:16: Error: ' Path_max ' not declared (first use in this function)
Scripts/mod/sumversion.c:384:16: NOTE: Each undeclared identifier is reported only once in the function in which it appears
Scripts/mod/sumversion.c:384:7: Warning: Unused variable ' filelist ' [-wunused-variable]
MAKE[3]: * * * [SCRIPTS/MOD/SUMVERSION.O] Error 1
MAKE[2]: * * * [Scripts/mod] Error 2
MAKE[1]: * * * [scripts] Error 2
MAKE[1]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
Make: * * * * [Debian/stamp/build/kernel] Error 2

gdsdj@gdsdj-laptop:~/src/linux-2.6.19$



#include <netinet/in.h>
#ifdef __SUN__
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include "Modpost.h"
#include <limits.h>

Perform sudo gedit scripts/mod/sumversion.c
After joining the #include <limits.h>, the problem has been solved and new problems have arisen.

CC ARCH/I386/KERNEL/CPU/RISE.O
CC ARCH/I386/KERNEL/CPU/NEXGEN.O
CC ARCH/I386/KERNEL/CPU/UMC.O
LD ARCH/I386/KERNEL/CPU/BUILT-IN.O
CC ARCH/I386/KERNEL/REBOOT.O
CC ARCH/I386/KERNEL/REBOOT_FIXUPS.O
CC ARCH/I386/KERNEL/MODULE.O
CC ARCH/I386/KERNEL/SYSENTER.O
ARCH/I386/KERNEL/SYSENTER.C: In the function ' arch_setup_additional_pages ':
ARCH/I386/KERNEL/SYSENTER.C:158:17: Warning: Address of an expression of type ' void ' (default enabled)
LDS Arch/i386/kernel/vsyscall.lds
As ARCH/I386/KERNEL/VSYSCALL-INT80.O
As ARCH/I386/KERNEL/VSYSCALL-NOTE.O
SYSCALL arch/i386/kernel/vsyscall-int80.so
GCC: Error: elf_i386: no file or directory
MAKE[2]: * * * [arch/i386/kernel/vsyscall-int80.so] Error 1
MAKE[1]: * * * [Arch/i386/kernel] Error 2
MAKE[1]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
Make: * * * * [Debian/stamp/build/kernel] Error 2

Execute command
sudo gedit arch/i386/kernel/makefile


# The DSO images are built using a special linker script.
Quiet_cmd_syscall = Syscall $@
Cmd_syscall = $ (CC)-M Elf_i386-nostdlib $ (syscflags_$ (@F)) \
-wl,-t,$ (filter-out force,$^)-O $@

Export Cppflags_vsyscall.lds +-p-c-u$ (ARCH)

The change of the red character is the-m32 problem, and the new ones appear again.


AR ARCH/I386/LIB/LIB.A
GEN. Version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC INIT/VERSION.O
LD INIT/BUILT-IN.O
LD. tmp_vmlinux1
kernel/built-in.o:in function ' Mutex_lock ':
/home/gdsdj/src/linux-2.6.19/kernel/mutex.c:91:undefined reference to ' __mutex_lock_slowpath '
kernel/built-in.o:in function ' Mutex_unlock ':
/home/gdsdj/src/linux-2.6.19/kernel/mutex.c:116:undefined reference to ' __mutex_unlock_slowpath '
MAKE[1]: * * * [. tmp_vmlinux1] Error 1
MAKE[1]: Leaving directory '/home/gdsdj/src/linux-2.6.19 '
Make: * * * * [Debian/stamp/build/kernel] Error 2
gdsdj@gdsdj-laptop:~/src/linux-2.6.19$

the problem has not been solved yet.


* This function is similar to (but not equivalent to) down ().
*/
void inline fastcall __sched mutex_lock (struct mutex *lock)
{
Might_sleep ();
/*
* The locking FastPath is the 1->0 transition from
* ' unlocked ' into ' locked '.
*/
__mutex_fastpath_lock (&lock->count, __mutex_lock_slowpath);
}

Export_symbol (Mutex_lock);

static void Fastcall Noinline __sched
__mutex_unlock_slowpath (atomic_t *lock_count);

/***


~/linux-2.6.19/kernel/mutex.c:91:undefined reference to ' __mutex_lock_slowpath '
Kernel/built-in.o:in function ' Mutex_unlock ':
~/linux-2.6.19/kernel/mutex.c:116:undefined reference to ' __mutex_unlock_slowpath '
MAKE[1]: * * * [. tmp_vmlinux1] Error 1
The following is the solution:
Original URL: http://blog.csdn.net/lidisha/article/details/7933201
Search in. config and discover that config_debug_mutexes macros are not defined. Change it to Y, recompile the

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.