LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2007, 01:54 PM   #1
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Rep: Reputation: 0
kernel building


Hi,
I got the following while building the kernel 2.6.12.
--
include/asm/mpspec_def.h:78: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
arch/i386/kernel/process.c: In function ‘show_regs’:
arch/i386/kernel/process.c:259: warning: pointer targets in passing argument 2 of ‘show_trace’ differ in signedness
{standard input}: Assembler messages:
{standard input}:1400: Error: suffix or operands invalid for `mov'
----

GCC version -4.1
AC version - 2.17

can anyone help me to fix this
 
Old 07-19-2007, 10:18 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Do you have kernel-headers package installed?
 
Old 07-20-2007, 01:39 PM   #3
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
yes,i have them installed
 
Old 07-20-2007, 01:48 PM   #4
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
Are you trying to compile a distro-patched kernel, or a "plain vanilla" kernel?

Any "third party" kernel patches? Hardened toolchain?

Can you reproduce the problem on more recent kernel source?
 
Old 07-21-2007, 12:13 AM   #5
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
I am not using any third party patches.

I got the kernel from kernel.org
 
Old 07-21-2007, 02:20 AM   #6
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
I managed to compile the linux-2.6.12.1 package from kernel.org using GCC 4.1.2. I got the same warning (include/asm/mpspec_def.h:78: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’) as you, but the kernel compiled fine. Next I tried compiling it with GCC 3.4.6, and I got the same result (successful compilation), though I didn't get the warnings like I did with 4.1.2.

The only configuration I did was to run make menuconfig and then exit. Immediately after that I ran make, and between compiles I ran 'rm -R linux-2.6.12.1' and 'tar xvf linux-2.6.12.1.tar' to make sure no object files were left behind/reused.

Do you have any "non-standard" configuration settings?

Last edited by rocket357; 07-21-2007 at 02:49 AM.
 
Old 07-21-2007, 02:34 PM   #7
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
i am a newbie . i can't get u.
well i tried to build gcc 3.4 but it end with the following error
--
make[1]: Entering directory `/mnt/windows/linux/gcc-3.0.4/libiberty'
make[2]: Entering directory `/mnt/windows/linux/gcc-3.0.4/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/libiberty/testsuite'
make[1]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/libiberty'
make[1]: Entering directory `/mnt/windows/linux/gcc-3.0.4/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh /mnt/windows/linux/gcc-3.0.4/install-sh -c" "INSTALL_DATA=/bin/sh /mnt/windows/linux/gcc-3.0.4/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /mnt/windows/linux/gcc-3.0.4/install-sh -c " "INSTALL_SCRIPT=/bin/sh /mnt/windows/linux/gcc-3.0.4/install-sh -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/i686-pc-linux-gnu" "AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
make[1]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/zlib'
make[1]: Entering directory `/mnt/windows/linux/gcc-3.0.4/fastjar'
make[1]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/fastjar'
make[1]: Entering directory `/mnt/windows/linux/gcc-3.0.4/gcc'
(cd intl && make all)
make[2]: Entering directory `/mnt/windows/linux/gcc-3.0.4/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/gcc/intl'
(cd po && make all)
make[2]: Entering directory `/mnt/windows/linux/gcc-3.0.4/gcc/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/gcc/po'
gcc -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -I. -Icp -I. -I./cp -I./config -I./../include cp/decl.c -o cp/decl.o
cp/decl.c: In function ‘push_binding_level’:
cp/decl.c:528: error: invalid lvalue in assignment
cp/decl.c: In function ‘pop_binding_level’:
cp/decl.c:584: error: invalid lvalue in assignment
cp/decl.c: In function ‘suspend_binding_level’:
cp/decl.c:599: error: invalid lvalue in assignment
cp/decl.c:621: error: invalid lvalue in assignment
cp/decl.c: In function ‘resume_binding_level’:
cp/decl.c:634: error: invalid lvalue in assignment
cp/decl.c: In function ‘pushdecl_with_scope’:
cp/decl.c:4294: error: invalid lvalue in assignment
cp/decl.c:4296: error: invalid lvalue in assignment
cp/decl.c: In function ‘init_decl_processing’:
cp/decl.c:6405: error: invalid lvalue in assignment
cp/decl.c: In function ‘grokdeclarator’:
cp/decl.c:9939: error: invalid lvalue in assignment
cp/decl.c:9942: error: invalid lvalue in assignment
cp/decl.c: In function ‘start_function’:
cp/decl.c:13508: error: invalid lvalue in assignment
make[1]: *** [cp/decl.o] Error 1
make[1]: Leaving directory `/mnt/windows/linux/gcc-3.0.4/gcc'
make: *** [all-gcc] Error 2

--
 
Old 07-23-2007, 04:15 PM   #8
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
Quote:
Originally Posted by crazyfreakystuff
make[1]: Entering directory `/mnt/windows/linux/gcc-3.0.4/libiberty'
Umm, are you building this on an ntfs partition? Why the /mnt/windows? Just curious.

Last edited by rocket357; 07-23-2007 at 04:22 PM.
 
Old 07-24-2007, 04:55 AM   #9
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Initially i tried mounting a ntfs.after that i tried to build GCC from there.
For learning !! :-)
 
Old 07-24-2007, 08:54 AM   #10
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
Were you building the kernel from an ntfs partition, too? Just curious.

If you are, then try building from a native filesystem just to double-check that ntfs isn't causing any issues. If you get the same errors please post back and I'll help more.

And while you're at it, (and if you don't have a problem with it), I'd like for you to pastebin your .config (in the root directory you're building the kernel from) so I can test it out on my home machine. I'm really curious to see what the problem is here!

Thanks.

Last edited by rocket357; 07-24-2007 at 08:56 AM.
 
Old 07-24-2007, 02:18 PM   #11
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
include/asm/mpspec_def.h:78: warning: ‘packed’ attribute ignored for field of type ‘unsigned char[6]’
arch/i386/kernel/process.c: In function ‘show_regs’:
arch/i386/kernel/process.c:259: warning: pointer targets in passing argument 2 of ‘show_trace’ differ in signedness
{standard input}: Assembler messages:
{standard input}:1400: Error: suffix or operands invalid for `mov'

while building with native file systems
 
Old 07-24-2007, 03:16 PM   #12
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
Ok, thanks for verifying that for me. Do you still have the original file that you downloaded? If so, did you/could you verify the md5sum for that file?
 
Old 07-25-2007, 12:14 PM   #13
crazyfreakystuff
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Original Poster
Rep: Reputation: 0
no, i dont have that. but will try to do that once again. i think with ur help i can complete this. hanks buddy.

i also have another quesion. what is the use of kernel header packages. should i install them before compiling a kernel
 
Old 07-25-2007, 12:25 PM   #14
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 159

Rep: Reputation: 74
Hrmmm...header files basically keep the compiler from having to do multiple passes on source code and provide the programmer with a single location to update function prototypes, etc... They contain function prototypes and other stuff (structs, variables, and whatnot) so the compiler can "see" these structures before actually running into them in the source. As the compiler parses the source files, it needs to know the function "signature" so it can ensure the function calls are using the correct parameters (and in the correct order) and that other "illegal" activities aren't being done. Without the headers, the compiler would have to do multiple passes to get the information it needs...and with a large project that could prove to be time consuming!

Do you need them? Absolutely.

And glad I've been able to help so far =)

A quick intro to header files: http://en.wikipedia.org/wiki/Header_file

Last edited by rocket357; 07-25-2007 at 12:31 PM.
 
  


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
kernel panic after building custom kernel for macbook sparrott Linux - Laptop and Netbook 1 06-29-2007 06:06 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 10:31 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 04:35 PM
Kernel building? microsoft/linux Linux - General 1 09-30-2004 08:46 PM
Building kernel mods for an existing kernel ugenn Linux - Software 2 10-06-2003 02:25 PM


All times are GMT -5. The time now is 06:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration