List Info

Thread: undefined symbol problem help




undefined symbol problem help
country flaguser name
United States
2008-04-30 18:27:46
I need wrap a project into Python. All C++ classes are built
as a shared 
library libGORGON.so. The boost.python wrapper file is built
as 
libpyGORGON.so. But when I try to import libpyGORGON in
Python prompt. I got 
error:

Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011
(Red Hat 
4.1.1-30)] on linux2 Type "help",
"copyright", "credits" or
"license" for 
more information.
>>> import libpyGORGON.so
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: /data2/Gorgon/lib/libGORGON.so: undefined
symbol:
_ZTIN8wustl_mm13Visualization8RendererE
>>>

I already set the LD_LIBRARY_PATH and PYTHONPATH to
/data2/Gorgon/lib.

I use ldd to check the libpyGORGON.so:
 libGORGON.so => /data2/Gorgon/lib/libGORGON.so
(0x00002aaaaadf0000)
        libboost_python.so.2 =>
/usr/lib64/libboost_python.so.2 
(0x00002aaaab157000)
        libpython2.4.so.1.0 =>
/usr/lib64/libpython2.4.so.1.0 
(0x00002aaaab395000)
        libGL.so.1 => /usr/lib64/libGL.so.1
(0x00002aaaab6ca000)
        libGLU.so.1 => /usr/lib64/libGLU.so.1
(0x00002aaaab88d000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6
(0x00002aaaabb0d000)
        libm.so.6 => /lib64/libm.so.6
(0x00002aaaabe0e000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1
(0x00002aaaac091000)
        libc.so.6 => /lib64/libc.so.6
(0x00002aaaac29e000)
        libpthread.so.0 => /lib64/libpthread.so.0
(0x00002aaaac5ed000)
        libdl.so.2 => /lib64/libdl.so.2
(0x00002aaaac807000)
        libutil.so.1 => /lib64/libutil.so.1
(0x00002aaaaca0b000)
        libXext.so.6 => /usr/lib64/libXext.so.6
(0x00002aaaacc0f000)
        libX11.so.6 => /usr/lib64/libX11.so.6
(0x00002aaaace20000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
        libXau.so.6 => /usr/lib64/libXau.so.6
(0x00002aaaad12c000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6
(0x00002aaaad32e000)

And also I search the symbol in libGORGON.so:
$ nm libGORGON.so | grep
_ZTIN8wustl_mm13Visualization8RendererE

It actually finds the symbol. I am confused. Anybody help me
out?

By the way, I did not use bjam. I use cmake to create
makefile for me.

Thanks,
Grant 



_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: undefined symbol problem help
country flaguser name
United States
2008-05-01 10:40:57
I made a mistake, the result of
$ nm libGORGON.so | grep
_ZTIN8wustl_mm13Visualization8RendererE
$ U _ZTIN8wustl_mm13Visualization8RendererE

I build Render.cpp into libGORGON.so, really don't know why
this symbol is 
undefined.

"Grant" <grant.tanggmail.com> wrote in
message 
news:fvav9j$t8r$1ger.gmane.org...
>I need wrap a project into Python. All C++ classes are
built as a shared 
>library libGORGON.so. The boost.python wrapper file is
built as 
>libpyGORGON.so. But when I try to import libpyGORGON in
Python prompt. I 
>got error:
>
> Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1
20061011 (Red Hat 
> 4.1.1-30)] on linux2 Type "help",
"copyright", "credits" or
"license" for 
> more information.
>>>> import libpyGORGON.so
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
> ImportError: /data2/Gorgon/lib/libGORGON.so: undefined
symbol:
> _ZTIN8wustl_mm13Visualization8RendererE
>>>>
>
> I already set the LD_LIBRARY_PATH and PYTHONPATH to
/data2/Gorgon/lib.
>
> I use ldd to check the libpyGORGON.so:
> libGORGON.so => /data2/Gorgon/lib/libGORGON.so
(0x00002aaaaadf0000)
>        libboost_python.so.2 =>
/usr/lib64/libboost_python.so.2 
> (0x00002aaaab157000)
>        libpython2.4.so.1.0 =>
/usr/lib64/libpython2.4.so.1.0 
> (0x00002aaaab395000)
>        libGL.so.1 => /usr/lib64/libGL.so.1
(0x00002aaaab6ca000)
>        libGLU.so.1 => /usr/lib64/libGLU.so.1
(0x00002aaaab88d000)
>        libstdc++.so.6 => /usr/lib64/libstdc++.so.6
(0x00002aaaabb0d000)
>        libm.so.6 => /lib64/libm.so.6
(0x00002aaaabe0e000)
>        libgcc_s.so.1 => /lib64/libgcc_s.so.1
(0x00002aaaac091000)
>        libc.so.6 => /lib64/libc.so.6
(0x00002aaaac29e000)
>        libpthread.so.0 => /lib64/libpthread.so.0
(0x00002aaaac5ed000)
>        libdl.so.2 => /lib64/libdl.so.2
(0x00002aaaac807000)
>        libutil.so.1 => /lib64/libutil.so.1
(0x00002aaaaca0b000)
>        libXext.so.6 => /usr/lib64/libXext.so.6
(0x00002aaaacc0f000)
>        libX11.so.6 => /usr/lib64/libX11.so.6
(0x00002aaaace20000)
>        /lib64/ld-linux-x86-64.so.2
(0x0000555555554000)
>        libXau.so.6 => /usr/lib64/libXau.so.6
(0x00002aaaad12c000)
>        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6
(0x00002aaaad32e000)
>
> And also I search the symbol in libGORGON.so:
> $ nm libGORGON.so | grep
_ZTIN8wustl_mm13Visualization8RendererE
>
> It actually finds the symbol. I am confused. Anybody
help me out?
>
> By the way, I did not use bjam. I use cmake to create
makefile for me.
>
> Thanks,
> Grant 



_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: undefined symbol problem help
user name
2008-05-01 11:17:09


2008/5/1 Grant < grant.tanggmail.com">grant.tanggmail.com>:
I made a mistake, the result of
$ nm libGORGON.so | grep _ZTIN8wustl_mm13Visualization8RendererE
$ U _ZTIN8wustl_mm13Visualization8RendererE

gjcdark-tower:~$ c++filt -t _ZTIN8wustl_mm13Visualization8RendererE
typeinfo for wustl_mm::Visualization::Renderer

As for the reasons for the problem, could be several, you have to google it.  I found this:

http://www.dbforums.com/archive/index.php/t-352689.html

In which they say one of the possible reasons is the class missing the implementation of a virtual function.

Hope it helps.



I build Render.cpp into libGORGON.so, really don't know why this symbol is
undefined.

"Grant" < grant.tanggmail.com">grant.tanggmail.com> wrote in message
news:fvav9j$t8r$1ger.gmane.org...
>I need wrap a project into Python. All C++ classes are built as a shared
&gt;library libGORGON.so. The boost.python wrapper file is built as
>libpyGORGON.so. But when I try to import libpyGORGON in Python prompt. I
>got error:
&gt;
> Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat
> 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for
> more information.
>&gt;>> import libpyGORGON.so
> Traceback (most recent call last):
&gt;  File "<stdin>&quot;, line 1, in ?
> ImportError: /data2/Gorgon/lib/libGORGON.so: undefined symbol:
> _ZTIN8wustl_mm13Visualization8RendererE
&gt;>>>
>
> I already set the LD_LIBRARY_PATH and PYTHONPATH to /data2/Gorgon/lib.
>
> I use ldd to check the libpyGORGON.so:
>; libGORGON.so => /data2/Gorgon/lib/libGORGON.so (0x00002aaaaadf0000)
>        libboost_python.so.2 => /usr/lib64/libboost_python.so.2
> (0x00002aaaab157000)
>        libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0
> (0x00002aaaab395000)
>        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00002aaaab6ca000)
>        libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00002aaaab88d000)
>        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaabb0d000)
>        libm.so.6 => /lib64/libm.so.6 (0x00002aaaabe0e000)
>        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaac091000)
>        libc.so.6 => /lib64/libc.so.6 (0x00002aaaac29e000)
>        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaac5ed000)
>        libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaac807000)
>        libutil.so.1 => /lib64/libutil.so.1 (0x00002aaaaca0b000)
>        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002aaaacc0f000)
>        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002aaaace20000)
>        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
>        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002aaaad12c000)
>        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00002aaaad32e000)
>
&gt; And also I search the symbol in libGORGON.so:
> $ nm libGORGON.so | grep _ZTIN8wustl_mm13Visualization8RendererE
&gt;
> It actually finds the symbol. I am confused. Anybody help me out?
>;
> By the way, I did not use bjam. I use cmake to create makefile for me.
>
> Thanks,
> Grant



_______________________________________________
C++-sig mailing list
C%2B%2B-sigpython.org">C++-sigpython.org
http://mail.python.org/mailman/listinfo/c++-sig



--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
";The universe is always one step beyond logic.&quot; -- Frank Herbert
Re: undefined symbol problem help
country flaguser name
United States
2008-05-01 15:33:20
That's exactly the cause of this import error.
Renderer has a viutual destructor which is not defined:
virtual ~Renderer();
 
I change it to
virtual ~Renderer() {}
 
The problem solved. Thank you Gustavo!
Grant


2008/5/1 Grant <gmail.com">grant.tanggmail.com>:
I made a mistake, the result of
$ nm libGORGON.so | grep _ZTIN8wustl_mm13Visualization8RendererE
$ U _ZTIN8wustl_mm13Visualization8RendererE

gjcdark-tower:~$ c++filt -t _ZTIN8wustl_mm13Visualization8RendererE
typeinfo for wustl_mm::Visualization::Renderer

As for the reasons for the problem, could be several, you have to google it.  I found this:

http://www.dbforums.com/archive/index.php/t-352689.html

In which they say one of the possible reasons is the class missing the implementation of a virtual function.

Hope it helps.



I build Render.cpp into libGORGON.so, really don't know why this symbol is
undefined.

"Grant" <gmail.com">grant.tanggmail.com> wrote in message
news:fvav9j$t8r$1ger.gmane.org...
>I need wrap a project into Python. All C++ classes are built as a shared
>;library libGORGON.so. The boost.python wrapper file is built as
>libpyGORGON.so. But when I try to import libpyGORGON in Python prompt. I
>got error:
>;
> Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat
> 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for
> more information.
>>>> import libpyGORGON.so
> Traceback (most recent call last):
>;  File "<stdin>", line 1, in ?
> ImportError: /data2/Gorgon/lib/libGORGON.so: undefined symbol:
&gt; _ZTIN8wustl_mm13Visualization8RendererE
>;>>&gt;
>
>; I already set the LD_LIBRARY_PATH and PYTHONPATH to /data2/Gorgon/lib.
&gt;
> I use ldd to check the libpyGORGON.so:
> libGORGON.so => /data2/Gorgon/lib/libGORGON.so (0x00002aaaaadf0000)
>        libboost_python.so.2 => /usr/lib64/libboost_python.so.2
> (0x00002aaaab157000)
>        libpython2.4.so.1.0 => /usr/lib64/libpython2.4.so.1.0
&gt; (0x00002aaaab395000)
>        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00002aaaab6ca000)
>        libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00002aaaab88d000)
>        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaabb0d000)
>        libm.so.6 => /lib64/libm.so.6 (0x00002aaaabe0e000)
>        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaac091000)
>        libc.so.6 => /lib64/libc.so.6 (0x00002aaaac29e000)
>        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaac5ed000)
>        libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaac807000)
>        libutil.so.1 => /lib64/libutil.so.1 (0x00002aaaaca0b000)
>        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002aaaacc0f000)
>        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002aaaace20000)
>        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
>        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002aaaad12c000)
>        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00002aaaad32e000)
>
> And also I search the symbol in libGORGON.so:
> $ nm libGORGON.so | grep _ZTIN8wustl_mm13Visualization8RendererE
>;
> It actually finds the symbol. I am confused. Anybody help me out?
>
> By the way, I did not use bjam. I use cmake to create makefile for me.
>
&gt; Thanks,
&gt; Grant



_______________________________________________
C++-sig mailing list
python.org">C++-sigpython.org
http://mail.python.org/mailman/listinfo/c++-sig



--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


_______________________________________________
C++-sig mailing list
C++-sigpython.org
http://mail.python.org/mailman/listinfo/c++-sig
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )