LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2008, 09:11 AM   #1
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Rep: Reputation: 16
undefined reference for __bad_spinloc_type with CONFIG_NETFILTER_DEBUG enabled


Hi everyone,

i was trying to enable the netfilters debugging option by enabling the above macro but the subsequent compilation is giving compilation error. The complete error is:
--------------------------------------------------------------------------
net/built-in.o(.text+0x76c84): In function `ip_set_hash_add':
sysctl_net.c: undefined reference to `__bad_spinlock_type'
net/built-in.o(.text+0x76da4):sysctl_net.c: undefined reference to `__bad_spinlock_type'
net/built-in.o(.text+0x76de8): In function `ip_set_testip_kernel':
sysctl_net.c: undefined reference to `__bad_spinlock_type'
net/built-in.o(.text+0x76e8c):sysctl_net.c: undefined reference to `__bad_spinlock_type'
net/built-in.o(.text+0x76ec4): In function `ip_set_addip_kernel':
sysctl_net.c: undefined reference to `__bad_spinlock_type'
net/built-in.o(.text+0x76f6c):sysctl_net.c: more undefined references to `__bad_spinlock_type' follow
make: *** [vmlinux] Error 1
--------------------------------------------------------------------------

the function ip_set_hash_add is using the call write_unlock_bh () which is a macro defined in spinlock.h. The macro,eventually, is replaced with call to __bad_spinlock_type (). Now grep'ing the kernel code doesn't provides any reference to the function definition.

can any body provide any kind of reference here. Googling it up does provides some links but those are full of kernel patches, unsure about if any patch is needed or not?

my doubt is, is there any other macro required in conjunction with the aforementined macro ?. Though i had checked the spinloch.h, and the macros are not wrapped around by any #ifdef <KERNEL CONFIGURATION MACRO>

any kind of help will be appreciated.
 
Old 07-17-2008, 09:13 AM   #2
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
my appologies,
there is a typo mistake in the subject. the undefined reference is for object __bad_spinlock_type
 
Old 07-18-2008, 12:26 AM   #3
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
well!!! it may prove to be helpful to anyone who is conserned. I just successfully compiled the kernel and it did worked for me.What i did was enabled the macro CONFIG_PREEMPT_DESKTOP. Honestly, i dont know the side effects of this change thou this gave me a SOS.

comments invited.
 
  


Reply



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
Undefined reference, why? george_mercury Programming 4 05-07-2009 12:15 AM
undefined reference? Sharky01252 Programming 3 11-07-2006 11:36 AM
undefined reference vkmgeek Programming 1 05-11-2006 06:37 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 03:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:57 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
Open Source Consulting | Domain Registration