* Undefined Reference
@ 2006-10-30 13:21 Felipe Balbi
0 siblings, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2006-10-30 13:21 UTC (permalink / raw)
To: Linux OMAP Mailing List
Could anyone help me getting this bug fixed?
I've already git pull'd the new version of linux-omap-2.6 git tree and
it didn't work at all.
isp1301.c is including linux/usb/otg.h, hcd.c exports the symbol
usb_bus_start_enum wich is declared inside otg.h as extern.
drivers/built-in.o: In function `omap_otg_irq':
drivers/i2c/chips/isp1301_omap.c:851: undefined reference to
`usb_bus_start_enum'
make: *** [.tmp_vmlinux1] Error 1
--
Best Regards,
Felipe Balbi
ext-felipe.lima@nokia.com
OSMRC - INdT
^ permalink raw reply [flat|nested] 11+ messages in thread
* undefined reference
@ 2006-01-17 20:06 Andrew
2006-01-17 20:23 ` caszonyi
0 siblings, 1 reply; 11+ messages in thread
From: Andrew @ 2006-01-17 20:06 UTC (permalink / raw)
To: linux-newbie
Good evening,
Trying to compile gqcam-0.8 or 0.9 on a Slackware-10.1 I get a lot of
'undefined reference' messages about libpng.so. I have version 1.2.8 of
libpng (the latest).
Does anyone know what is wrong?
TIA
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2006-01-17 20:06 undefined reference Andrew
@ 2006-01-17 20:23 ` caszonyi
2006-01-17 20:30 ` Andrew
0 siblings, 1 reply; 11+ messages in thread
From: caszonyi @ 2006-01-17 20:23 UTC (permalink / raw)
To: Andrew; +Cc: linux-newbie
On Tue, 17 Jan 2006, Andrew wrote:
> Good evening,
>
> Trying to compile gqcam-0.8 or 0.9 on a Slackware-10.1 I get a lot of
> 'undefined reference' messages about libpng.so. I have version 1.2.8 of
> libpng (the latest).
>
> Does anyone know what is wrong?
>
you forgot (or the configure script forgot) to add libz when lining with
libpng ?
try to run
LDFLAGS=-lz ./configure
--
"frate, trezeste-te, aici nu-i razboiul stelelor"
Radu R. pe offtopic at lug.ro
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2006-01-17 20:23 ` caszonyi
@ 2006-01-17 20:30 ` Andrew
2006-01-17 20:58 ` caszonyi
0 siblings, 1 reply; 11+ messages in thread
From: Andrew @ 2006-01-17 20:30 UTC (permalink / raw)
To: linux-newbie
caszonyi@rdslink.ro wrote:
> On Tue, 17 Jan 2006, Andrew wrote:
>
>> Good evening,
>>
>> Trying to compile gqcam-0.8 or 0.9 on a Slackware-10.1 I get a lot of
>> 'undefined reference' messages about libpng.so. I have version 1.2.8
>> of libpng (the latest).
>>
>> Does anyone know what is wrong?
>>
>
> you forgot (or the configure script forgot) to add libz when lining
> with libpng ?
The source doesn't use config, only make.
I found and installed a .tgz, but the app won't start as it doesn't find
libpng.so.2. Is my libpng too recent? Can I install an older one
alongside? Or can I try a symlink? (Without my computer exploding).
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2006-01-17 20:30 ` Andrew
@ 2006-01-17 20:58 ` caszonyi
2006-01-17 20:59 ` Andrew
0 siblings, 1 reply; 11+ messages in thread
From: caszonyi @ 2006-01-17 20:58 UTC (permalink / raw)
To: Andrew; +Cc: linux-newbie
On Tue, 17 Jan 2006, Andrew wrote:
> caszonyi@rdslink.ro wrote:
>
>> On Tue, 17 Jan 2006, Andrew wrote:
>>
>>> Good evening,
>>>
>>> Trying to compile gqcam-0.8 or 0.9 on a Slackware-10.1 I get a lot of
>>> 'undefined reference' messages about libpng.so. I have version 1.2.8 of
>>> libpng (the latest).
>>>
>>> Does anyone know what is wrong?
>>>
>>
>> you forgot (or the configure script forgot) to add libz when lining with
>> libpng ?
>
> The source doesn't use config, only make.
>
ok. I downloaded the program
on the following line in the Makefile
LDFLAGS = `gtk-config --libs gthread` -ljpeg -lpthread -lpng
you should add -lz like this
LDFLAGS = `gtk-config --libs gthread` -ljpeg -lpthread -lpng -lz
--
"frate, trezeste-te, aici nu-i razboiul stelelor"
Radu R. pe offtopic at lug.ro
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2006-01-17 20:58 ` caszonyi
@ 2006-01-17 20:59 ` Andrew
0 siblings, 0 replies; 11+ messages in thread
From: Andrew @ 2006-01-17 20:59 UTC (permalink / raw)
To: linux-newbie
caszonyi@rdslink.ro wrote:
> On Tue, 17 Jan 2006, Andrew wrote:
>
>> caszonyi@rdslink.ro wrote:
>>
>>> On Tue, 17 Jan 2006, Andrew wrote:
>>>
>>>> Good evening,
>>>>
>>>> Trying to compile gqcam-0.8 or 0.9 on a Slackware-10.1 I get a lot
>>>> of 'undefined reference' messages about libpng.so. I have version
>>>> 1.2.8 of libpng (the latest).
>>>>
>>>> Does anyone know what is wrong?
>>>>
>>>
>>> you forgot (or the configure script forgot) to add libz when lining
>>> with libpng ?
>>
>>
>> The source doesn't use config, only make.
>>
>
> ok. I downloaded the program
> on the following line in the Makefile
> LDFLAGS = `gtk-config --libs gthread` -ljpeg -lpthread -lpng
> you should add -lz like this
> LDFLAGS = `gtk-config --libs gthread` -ljpeg -lpthread -lpng -lz
Wow! (Lost for words)
Thanks
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 11+ messages in thread
* undefined reference
@ 2002-03-24 16:16 Anthony Chee
2002-03-25 21:45 ` Bart Trojanowski
0 siblings, 1 reply; 11+ messages in thread
From: Anthony Chee @ 2002-03-24 16:16 UTC (permalink / raw)
To: kbuild-devel, kernelnewbies, linux-kernel
The case is quite complicated.
I am now developing a module. This module need communicate with the kernel.
So I exported a function func(), by using EXPORT_SYMBOL(func). In the header
file, I set "extern int func()".
I also modified the kernel source code, which is inode.c, and insert the
func() and the module header file.
After the above procedure, I use "make bzImage" to build the kernel. At the
compile stage, it does not appear warning message, but it appears in the
linking object stage, which is
fs/fs.o(.text+0x1377d): undefined reference to `func'
How can I solve this issue? Or any parameter for "ld" to avoid checking the
undefined reference?
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2002-03-24 16:16 Anthony Chee
@ 2002-03-25 21:45 ` Bart Trojanowski
2002-03-26 4:17 ` Anthony Chee
0 siblings, 1 reply; 11+ messages in thread
From: Bart Trojanowski @ 2002-03-25 21:45 UTC (permalink / raw)
To: Anthony Chee, linux-kernel; +Cc: kbuild-devel, kernelnewbies, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
* Anthony Chee <anthony.chee@polyu.edu.hk> [020324 11:17]:
> I am now developing a module. This module need communicate with the kernel.
> So I exported a function func(), by using EXPORT_SYMBOL(func). In the header
> file, I set "extern int func()".
<snip>
The problem you face is that the kernel needs to know where foo is to
generate a the bytecode that calls it. Here is a better scenario...
You expose an interface in the kernel such as
typedef void (*func_t)(int);
void register_func ( func_t func );
EXPORT_SYMBOL (register_func);
Then in your modules you call 'register_func' and that will pass the
function in question to the kernel. The kernel can then do whatever it
wants to that pointer (like call it).
B.
--
WebSig: http://www.jukie.net/~bart/sig/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2002-03-25 21:45 ` Bart Trojanowski
@ 2002-03-26 4:17 ` Anthony Chee
2002-03-26 5:49 ` Keith Owens
0 siblings, 1 reply; 11+ messages in thread
From: Anthony Chee @ 2002-03-26 4:17 UTC (permalink / raw)
To: Bart Trojanowski, linux-kernel; +Cc: kbuild-devel, kernelnewbies, linux-kernel
Or let me say clearly.
The suitution is I want the kernel source use the symbol from module.
What I did in the module code are:
1. EXPORT_SYMBOL(func) in the source code of module
2. Set "extern int func()" in the module header
What I did in the kernel source code are:
1. Insert "func()" in the inode.c
2. Add the module header in the kernel source code
Then I use "make bzImage", I got no error message on compiling inode.c, but
I got
"fs/fs.o(.text+0x1377d): undefined reference to `func'"
in the linking stage.
I also set condition inode.c to check the existing of module before calling
func()
Thanks
Regards,
Anthony
----- Original Message -----
From: "Bart Trojanowski" <bart@jukie.net>
To: "Anthony Chee" <anthony.chee@polyu.edu.hk>;
<linux-kernel@vger.kernel.org>
Cc: <kbuild-devel@vger.kernel.org>; <kernelnewbies@vger.kernel.org>;
<linux-kernel@vger.kernel.org>
Sent: Tuesday, March 26, 2002 5:45 AM
Subject: Re: undefined reference
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2002-03-26 4:17 ` Anthony Chee
@ 2002-03-26 5:49 ` Keith Owens
2002-03-30 14:19 ` Anthony Chee
0 siblings, 1 reply; 11+ messages in thread
From: Keith Owens @ 2002-03-26 5:49 UTC (permalink / raw)
To: Anthony Chee; +Cc: Bart Trojanowski, linux-kernel, kbuild-devel, kernelnewbies
On Tue, 26 Mar 2002 12:17:50 +0800,
"Anthony Chee" <anthony.chee@polyu.edu.hk> wrote:
>Or let me say clearly.
>
>The suitution is I want the kernel source use the symbol from module.
>
>What I did in the module code are:
>1. EXPORT_SYMBOL(func) in the source code of module
>2. Set "extern int func()" in the module header
>
>What I did in the kernel source code are:
>1. Insert "func()" in the inode.c
>2. Add the module header in the kernel source code
>
>Then I use "make bzImage", I got no error message on compiling inode.c, but
>I got
>
>"fs/fs.o(.text+0x1377d): undefined reference to `func'"
You cannot do that. The kernel must be self contained. The only way
for the kernel to access module code and data is for the module to
register that code and data when the module is loaded and for the
kernel to access the module via the registration list.
See any module that handles a filesystem. sys_open() does not call the
module directly. A module registers its file operations on load. The
kernel (dentry_open) calls the module via f->f_op->open.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: undefined reference
2002-03-26 5:49 ` Keith Owens
@ 2002-03-30 14:19 ` Anthony Chee
0 siblings, 0 replies; 11+ messages in thread
From: Anthony Chee @ 2002-03-30 14:19 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel, kbuild-devel, kernelnewbies, linux-fsdevel
> >
> >Then I use "make bzImage", I got no error message on compiling inode.c,
but
> >I got
> >
> >"fs/fs.o(.text+0x1377d): undefined reference to `func'"
>
> You cannot do that. The kernel must be self contained. The only way
> for the kernel to access module code and data is for the module to
> register that code and data when the module is loaded and for the
> kernel to access the module via the registration list.
>
> See any module that handles a filesystem. sys_open() does not call the
> module directly. A module registers its file operations on load. The
> kernel (dentry_open) calls the module via f->f_op->open.
>
>
Thanks for your help. I use another apporach to communicate with module,
similiar to the method you stated above.
What I did in the kernel source,
1. In fs.h, I added one line in struct super_operations
int (*query_module) (struct inode *);
2. In write_inode() of inode.c, added
result = inode->i_sb->s_op->query_module(inode);
What I did in the module,
1. Build up my own function, kernel_query_module(struct inode *inode)
2. In init_module(), added
struct super_block *sb_ptr;
sb_ptr = get_super(MKDEV(8,1)); /* suppose I want to
get super_block of /dev/sda1 */
sb_ptr -> s_op -> query_module = &kernel_query_module;
Then, I compile the module and didi not get error message
When I compile the kernel, I got the follow error message,
inode.c:195: structure has no member named `query_module'
It made me crazy. Why the module can access the s_op and register the
address of kernel_query_module, but not the kernel source? I already added
one more item in the struct super_operation, but got the error message the
struct has no such member.
Any thing I missed? Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-10-30 13:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-30 13:21 Undefined Reference Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2006-01-17 20:06 undefined reference Andrew
2006-01-17 20:23 ` caszonyi
2006-01-17 20:30 ` Andrew
2006-01-17 20:58 ` caszonyi
2006-01-17 20:59 ` Andrew
2002-03-24 16:16 Anthony Chee
2002-03-25 21:45 ` Bart Trojanowski
2002-03-26 4:17 ` Anthony Chee
2002-03-26 5:49 ` Keith Owens
2002-03-30 14:19 ` Anthony Chee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.