LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 04-05-2012, 09:50 AM   #1
ramendra
LQ Newbie
 
Registered: May 2008
Posts: 7

Rep: Reputation: 0
Cross compilation on MIPS failed for pgd_t variable.


Hi all,

I am cross compiling Linux kernel(2.6.18.4) and gets following compilation errors as below:

*********************************************************
In file included from arch/mips/kernel/asm-offsets.c:13:
include/linux/sched.h:310: error: expected specifier-qualifier-list before 'pgd_t'
include/linux/sched.h: In function 'mmdrop':
include/linux/sched.h:1274: error: 'struct mm_struct' has no member named 'mm_count'
In file included from include/asm/pgtable-32.h:17,
from include/asm/pgtable.h:12,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm/fixmap.h: At top level:
include/asm/fixmap.h:56: error: expected declaration specifiers or '...' before 'pgprot_t'
include/asm/fixmap.h:117: error: expected declaration specifiers or '...' before 'pgd_t'
In file included from include/asm-generic/pgtable-nopmd.h:6,
from include/asm/pgtable-32.h:19,
from include/asm/pgtable.h:12,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable-nopud.h:13: error: expected specifier-qualifier-list before 'pgd_t'
include/asm-generic/pgtable-nopud.h:25: error: expected ')' before 'pgd'
include/asm-generic/pgtable-nopud.h:26: error: expected ')' before 'pgd'
include/asm-generic/pgtable-nopud.h:27: error: expected ')' before 'pgd'
include/asm-generic/pgtable-nopud.h:28: error: expected ')' before '*' token
include/asm-generic/pgtable-nopud.h:38: error: expected ')' before '*' token
In file included from include/asm/pgtable.h:12,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm/pgtable-32.h:102: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'invalid_pte_table'
include/asm/pgtable-32.h: In function 'pmd_none':
include/asm/pgtable-32.h:109: warning: implicit declaration of function 'pgd_val'
include/asm/pgtable-32.h:109: error: 'pud_t' has no member named 'pgd'
include/asm/pgtable-32.h:109: error: 'invalid_pte_table' undeclared (first use in this function)
include/asm/pgtable-32.h:109: error: (Each undeclared identifier is reported only once
include/asm/pgtable-32.h:109: error: for each function it appears in.)
include/asm/pgtable-32.h: In function 'pmd_present':
include/asm/pgtable-32.h:116: error: 'pud_t' has no member named 'pgd'
include/asm/pgtable-32.h:116: error: 'invalid_pte_table' undeclared (first use in this function)
include/asm/pgtable-32.h: In function 'pmd_clear':
include/asm/pgtable-32.h:121: error: 'pud_t' has no member named 'pgd'
include/asm/pgtable-32.h:121: error: 'invalid_pte_table' undeclared (first use in this function)
In file included from include/asm/pgtable.h:18,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm/io.h: In function 'virt_to_phys':
include/asm/io.h:122: error: 'PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm/pgtable.h: At top level:
include/asm/pgtable.h:138: error: expected ')' before '*' token
include/asm/pgtable.h:155: error: expected declaration specifiers or '...' before 'pte_t'
include/asm/pgtable.h: In function 'pte_clear':
include/asm/pgtable.h:159: warning: implicit declaration of function 'pte_val'
include/asm/pgtable.h:159: warning: implicit declaration of function 'ptep_buddy'
include/asm/pgtable.h:159: error: 'ptep' undeclared (first use in this function)
include/asm/pgtable.h:160: warning: implicit declaration of function 'set_pte'
include/asm/pgtable.h:160: warning: implicit declaration of function '__pte'
include/asm/pgtable.h: At top level:
include/asm/pgtable.h:185: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'swapper_pg_dir'
include/asm/pgtable.h:191: error: expected ')' before 'pte'
include/asm/pgtable.h:266: error: expected ')' before 'pte'
include/asm/pgtable.h:267: error: expected ')' before 'pte'
include/asm/pgtable.h:268: error: expected ')' before 'pte'
include/asm/pgtable.h:269: error: expected ')' before 'pte'
include/asm/pgtable.h:270: error: expected ')' before 'pte'
include/asm/pgtable.h:272: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_wrprotect'
include/asm/pgtable.h:278: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_rdprotect'
include/asm/pgtable.h:284: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkclean'
include/asm/pgtable.h:290: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkold'
include/asm/pgtable.h:296: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkwrite'
include/asm/pgtable.h:304: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkread'
include/asm/pgtable.h:312: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkdirty'
include/asm/pgtable.h:320: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_mkyoung'
include/asm/pgtable.h:337: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pgprot_noncached'
include/asm/pgtable.h:362: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pte_modify'
include/asm/pgtable.h:370: error: expected declaration specifiers or '...' before 'pte_t'
include/asm/pgtable.h:372: error: expected declaration specifiers or '...' before 'pte_t'
include/asm/pgtable.h:375: error: expected declaration specifiers or '...' before 'pte_t'
include/asm/pgtable.h: In function 'update_mmu_cache':
include/asm/pgtable.h:377: error: 'pte' undeclared (first use in this function)
include/asm/pgtable.h:377: error: too many arguments to function '__update_tlb'
include/asm/pgtable.h:378: error: too many arguments to function '__update_cache'
In file included from include/asm/pgtable.h:404,
from include/linux/mm.h:38,
from arch/mips/kernel/asm-offsets.c:14:
include/asm-generic/pgtable.h: At top level:
include/asm-generic/pgtable.h:132: error: expected declaration specifiers or '...' before 'pte_t'
include/asm-generic/pgtable.h: In function 'ptep_set_wrprotect':
include/asm-generic/pgtable.h:134: error: 'pte_t' undeclared (first use in this function)
include/asm-generic/pgtable.h:134: error: expected ';' before 'old_pte'
include/asm-generic/pgtable.h:135: error: 'ptep' undeclared (first use in this function)
include/asm-generic/pgtable.h:135: warning: implicit declaration of function 'pte_wrprotect'
include/asm-generic/pgtable.h:135: error: 'old_pte' undeclared (first use in this function)
include/asm-generic/pgtable.h: At top level:
include/asm-generic/pgtable.h:197: error: expected ')' before '*' token
include/asm-generic/pgtable.h:201: error: expected ')' before '*' token
include/asm-generic/pgtable.h: In function 'pmd_none_or_clear_bad':
include/asm-generic/pgtable.h:227: error: 'pud_t' has no member named 'pgd'
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: At top level:
include/linux/mm.h:67: error: expected specifier-qualifier-list before 'pgprot_t'
include/linux/mm.h:188: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'protection_map'
include/linux/mm.h:200: error: expected declaration specifiers or '...' before 'pgprot_t'
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h: In function 'lowmem_page_address':
include/linux/mm.h:531: error: 'PHYS_OFFSET' undeclared (first use in this function)
include/linux/mm.h: At top level:
include/linux/mm.h:711: error: expected declaration specifiers or '...' before 'pte_t'
include/linux/mm.h:725: error: expected declaration specifiers or '...' before 'pgprot_t'
include/linux/mm.h:737: error: expected declaration specifiers or '...' before 'pgprot_t'
In file included from arch/mips/kernel/asm-offsets.c:14:
include/linux/mm.h:738: error: expected declaration specifiers or '...' before 'pgprot_t'
include/linux/mm.h:768: error: expected declaration specifiers or '...' before 'pte_t'
include/linux/mm.h:805: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/linux/mm.h:807: error: expected declaration specifiers or '...' before 'pgd_t'
include/linux/mm.h:817: error: expected declaration specifiers or '...' before 'pgd_t'
include/linux/mm.h: In function 'pud_alloc':
include/linux/mm.h:819: warning: implicit declaration of function 'pgd_none'
include/linux/mm.h:819: error: 'pgd' undeclared (first use in this function)
include/linux/mm.h:819: error: too many arguments to function '__pud_alloc'
include/linux/mm.h:820: warning: implicit declaration of function 'pud_offset'
include/linux/mm.h: In function 'vma_nonlinear_insert':
include/linux/mm.h:909: error: 'struct vm_area_struct' has no member named 'shared'
include/linux/mm.h:910: error: 'struct vm_area_struct' has no member named 'shared'
include/linux/mm.h: At top level:
include/linux/mm.h:965: error: expected declaration specifiers or '...' before 'pgprot_t'
include/linux/mm.h:1020: error: expected declaration specifiers or '...' before 'pgprot_t'
arch/mips/kernel/asm-offsets.c: In function 'output_mm_defines':
arch/mips/kernel/asm-offsets.c:218: error: 'struct mm_struct' has no member named 'mm_users'
arch/mips/kernel/asm-offsets.c:219: error: 'struct mm_struct' has no member named 'pgd'
arch/mips/kernel/asm-offsets.c:220: error: 'struct mm_struct' has no member named 'context'
arch/mips/kernel/asm-offsets.c:225: error: 'pgd_t' undeclared (first use in this function)
arch/mips/kernel/asm-offsets.c:227: error: 'pte_t' undeclared (first use in this function)

*********************************************************

Please do let me know the way to resolve such cases.

Thanks
Ramendra
 
Old 04-07-2012, 04:31 AM   #2
ramendra
LQ Newbie
 
Registered: May 2008
Posts: 7

Original Poster
Rep: Reputation: 0
This problem was observed because of previous default .config file present.After "make mrproper " to clean and make menuconfig for ARCH=MIPS , this problem with datatype identification is resolved.
 
  


Reply


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
MIPS cross compilation error sheelavantar Linux - Software 0 09-06-2011 03:56 AM
all about cross compilation swift2008 Programming 3 08-27-2008 06:49 AM
How to make cross compilation toolchain for mips architecture kennithwang Linux - Embedded & Single-board computer 3 10-20-2007 09:03 AM
How to cross-compile X window for mips! whutxuan Programming 4 09-26-2005 03:20 PM
Cross-compilation radhapriya Linux - Software 0 08-11-2003 08:24 AM


All times are GMT -5. The time now is 01:35 AM.

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