Unix Technical Forum

undefined reference - problem compiling pgadmin3

This is a discussion on undefined reference - problem compiling pgadmin3 within the pgsql Interfaces Pgadmin Support forums, part of the PostgreSQL category; --> Hi, I'm tryin to compile pgadmin1.6.2 on kubuntu 6.1, wxwidgets 2.8, but I'm having this errors during make: tlSQLBox.cpp ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:48 PM
Luca Ferrari
 
Posts: n/a
Default undefined reference - problem compiling pgadmin3

Hi,
I'm tryin to compile pgadmin1.6.2 on kubuntu 6.1, wxwidgets 2.8, but I'm
having this errors during make:

tlSQLBox.cpp.text+0xa5): undefined reference to `wx2stc(wxString const&)'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxFile::wxFile(char const*, wxFile::OpenMode)'
/usr/local/lib/libwx_gtk2u_ogl-2.8.so: undefined reference to
`wxStringList::Add(char const*)'
/usr/local/lib/libwx_gtk2u_ogl-2.8.so: undefined reference to
`wxLogFatalError(char const*, ...)'
/usr/local/lib/libwx_gtk2u_ogl-2.8.so: undefined reference to
`wxString::Format(char const*, ...)'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxString::BeforeFirst(char) const'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxString::AfterFirst(char) const'
/usr/local/lib/libwx_gtk2u_ogl-2.8.so: undefined reference to
`wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxString::Cmp(char const*) const'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxString::Find(char, bool) const'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxStringBase::wxStringBase(unsigned int, char)'
/usr/local/lib/libwx_gtk2u_stc-2.8.so: undefined reference to
`wxWindow::ApplyToolTip(_GtkTooltips*, char const*)'
/usr/local/lib/libwx_gtk2u_ogl-2.8.so: undefined reference to
`wxStringBase:perator=(char const*)'
collect2: ld returned 1 exit status
make[2]: *** [pgadmin3] Error 1
make[2]: Leaving directory `/home/luca/tmp/pgadmin3-1.6.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/tmp/pgadmin3-1.6.2'
make: *** [all] Error 2


Any idea about that?
Luca

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:48 PM
Alex Gorbachenko
 
Posts: n/a
Default Re: undefined reference - problem compilingpgadmin3

On Thu, 1 Feb 2007 12:24:14 +0100
Luca wrote:

>Any idea about that?


can you show result of ldd -r /usr/local/lib/libwx_gtk2u_stc-2.8.so
here ?

--
np: Iron Maiden - The Nomad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFwdOBnBAcpC5E7HkRAqaSAJwJrT3b8kdeu6wI1i9OuU O777nCIQCgmJbB
sS2otQCjVq0KOOPAXWNGXy8=
=zkM+
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 08:48 PM
Luca Ferrari
 
Posts: n/a
Default Re: undefined reference - problem compiling pgadmin3

On Thursday 01 February 2007 Alex Gorbachenko's cat, walking on the keyboard,
wrote:
> ldd -r /usr/local/lib/libwx_gtk2u_stc-2.8.so
> here ?


ldd -r /usr/local/lib/libwx_gtk2u_stc-2.8.so
linux-gate.so.1 => (0xffffe000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7ea2000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e9e000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7b4e000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7ac9000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7aaf000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7a99000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7a73000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7a44000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7a37000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7a2e000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb7a2b000)
libXi.so.6 => /usr/lib/libXi.so.6 (0xb7a23000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7a20000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7a17000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb7a12000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb79d7000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb790e000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb78d4000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb78d0000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb78cb000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7839000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb782f000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb780b000)
libwx_gtk2u_core-2.8.so.0 => /usr/local/lib/libwx_gtk2u_core-2.8.so.0
(0xb7475000)
libwx_baseu-2.8.so.0 => /usr/local/lib/libwx_baseu-2.8.so.0
(0xb7343000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7264000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7259000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7245000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7111000)
/lib/ld-linux.so.2 (0x80000000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb7109000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb70a7000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb703d000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb701e000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb701b000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7016000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb700d000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb6ff5000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb6fc9000)
undefined symbol: _ZN8wxWindow12ApplyToolTipEP12_GtkTooltipsPKc
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZN6wxFileC1EPKcNS_8OpenModeE
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZNK8wxString11BeforeFirstEc
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZNK8wxString10AfterFirstEc
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZN12wxStringBase8InitWithEPKcjj
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZNK8wxString3CmpEPKc
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZNK8wxString4FindEcb
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
undefined symbol: _ZN12wxStringBaseC2Ejc
(/usr/local/lib/libwx_gtk2u_stc-2.8.so)


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 08:48 PM
Alex Gorbachenko
 
Posts: n/a
Default Re: undefined reference - problem compilingpgadmin3

On Thu, 1 Feb 2007 14:17:14 +0100
Luca wrote:

>undefined symbol: _ZN8wxWindow12ApplyToolTipEP12_GtkTooltipsPKc
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZN6wxFileC1EPKcNS_8OpenModeE
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZNK8wxString11BeforeFirstEc
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZNK8wxString10AfterFirstEc
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZN12wxStringBase8InitWithEPKcjj
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZNK8wxString3CmpEPKc
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZNK8wxString4FindEcb
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)
>undefined symbol: _ZN12wxStringBaseC2Ejc
>(/usr/local/lib/libwx_gtk2u_stc-2.8.so)


libwx_gtk2u_stc-2.8.so is not linked with some other wxgtk libs.

in shell type:

for LIBS in $(/bin/ls /usr/local/lib/libwx*so) ; do echo "$LIBS" ;
objdump -T "$LIBS" | grep -i '<undef_symbol_func_name>' ; done

this could help to find necessary libraries.

--
np: Iron Maiden - No More Lies

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFwe4qnBAcpC5E7HkRAhFOAJ9MOYdDMlcBGf4rO2zgNI qvqVQXFwCfcVdL
gHrW00qaeFuvV6wAsz4B+XQ=
=9wv9
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 08:48 PM
Luca Ferrari
 
Posts: n/a
Default Re: undefined reference - problem compiling pgadmin3

On Thursday 01 February 2007 Alex Gorbachenko's cat, walking on the keyboard,
wrote:
>
> for LIBS in $(/bin/ls /usr/local/lib/libwx*so) ; do echo "$LIBS" ;
> objdump -T "$LIBS" | grep -i '<undef_symbol_func_name>' ; done
>



It returns

/usr/local/lib/libwx_baseu-2.8.so
/usr/local/lib/libwx_baseu_net-2.8.so
/usr/local/lib/libwx_baseu_xml-2.8.so
/usr/local/lib/libwx_gtk2_fl-2.8.so
/usr/local/lib/libwx_gtk2_gizmos-2.8.so
/usr/local/lib/libwx_gtk2_gizmos_xrc-2.8.so
/usr/local/lib/libwx_gtk2_mmedia-2.8.so
/usr/local/lib/libwx_gtk2_ogl-2.8.so
/usr/local/lib/libwx_gtk2_plot-2.8.so
/usr/local/lib/libwx_gtk2_stc-2.8.so
/usr/local/lib/libwx_gtk2_svg-2.8.so
/usr/local/lib/libwx_gtk2u_adv-2.8.so
/usr/local/lib/libwx_gtk2u_aui-2.8.so
/usr/local/lib/libwx_gtk2u_core-2.8.so
/usr/local/lib/libwx_gtk2u_fl-2.8.so
/usr/local/lib/libwx_gtk2u_gizmos-2.8.so
/usr/local/lib/libwx_gtk2u_gizmos_xrc-2.8.so
/usr/local/lib/libwx_gtk2u_html-2.8.so
/usr/local/lib/libwx_gtk2u_mmedia-2.8.so
/usr/local/lib/libwx_gtk2u_ogl-2.8.so
/usr/local/lib/libwx_gtk2u_plot-2.8.so
/usr/local/lib/libwx_gtk2u_qa-2.8.so
/usr/local/lib/libwx_gtk2u_richtext-2.8.so
/usr/local/lib/libwx_gtk2u_stc-2.8.so
/usr/local/lib/libwx_gtk2u_svg-2.8.so
/usr/local/lib/libwx_gtk2u_xrc-2.8.so

and all the above are under /usr/local/lib that is listed in
my /etc/ld.so.conf (I ran ldconfig a few times).
How can I proceed?

Thanks,
Luca

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 08:48 PM
Alex Gorbachenko
 
Posts: n/a
Default Re: undefined reference - problem compilingpgadmin3

On Fri, 2 Feb 2007 09:15:42 +0100
Luca wrote:

>It returns

[skipped]

hmmm... very strange behavior. can you show output of
objdump -T /usr/local/lib/libwx_baseu-2.8.so | grep 'wxStringBase.*Init'

>and all the above are under /usr/local/lib that is listed in
>my /etc/ld.so.conf (I ran ldconfig a few times).
>How can I proceed?


your problem is not there.

when you build wxgtk contribs (i.e. ogl), core and base wxgtk libs is
not present in linker options.

example for "right" build flags: "-Wl,-L<wxbuilddir>/lib
-lwx_gtk2u_core-2.8 -lwx_baseu-2.8"

change dir to <wxbuilddir>/contrib/src/ogl and type make clean && make.
at the end of report you should see string with linker options. for
example, my string is:

g++ -shared -fPIC
-o /home/agent_007/RPM/BUILD/wxGTK-2007-01-31/lib/libwx_gtk2u_ogl-2.8.so.0.0.0
ogldll_basic2.o ogldll_canvas.o ogldll_divided.o ogldll_mfutils.o
ogldll_oglmisc.o ogldll_basic.o ogldll_composit.o ogldll_drawn.o
ogldll_bmpshape.o ogldll_constrnt.o ogldll_lines.o ogldll_ogldiag.o
-pthread -Wl,--as-needed
-L/home/agent_007/RPM/BUILD/wxGTK-2007-01-31/lib
-Wl,-soname,libwx_gtk2u_ogl-2.8.so.0 -lz -ldl -lm -pthread
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lXinerama
-lXxf86vm -lSM -lpng -lz -ljpeg -ltiff -pthread -Wl,--as-needed
-Wl,--version-script,/home/agent_007/RPM/BUILD/wxGTK-2007-01-31/version-script
-lz -ldl -lm -lwx_gtk2u_core-2.8 -lwx_baseu-2.8

--
np: Bullet for My Valentine - No Control

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFwwp1nBAcpC5E7HkRAubbAJ4yWk32t7qlGGRfmCXmFv AdMcgY3QCfTLf9
yIpHfFjIUhQAUb9bMov4fs8=
=DIAw
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 08:48 PM
Luca Ferrari
 
Posts: n/a
Default Re: undefined reference - problem compiling pgadmin3

On Friday 02 February 2007 Alex Gorbachenko's cat, walking on the keyboard,
wrote:
> hmmm... very strange behavior. can you show output of
> objdump -T /usr/local/lib/libwx_baseu-2.8.so | grep 'wxStringBase.*Init'


0009f1c0 g DF .text 0000008d WXU_2.8 _ZN12wxStringBase8InitWithEPKwjj

> when you build wxgtk contribs (i.e. ogl), core and base wxgtk libs is
> not present in linker options.


but I've installed wx, run ldconfig and then build the contribs.

>
> example for "right" build flags: "-Wl,-L<wxbuilddir>/lib
> -lwx_gtk2u_core-2.8 -lwx_baseu-2.8"
>
> change dir to <wxbuilddir>/contrib/src/ogl and type make clean && make.
> at the end of report you should see string with linker options. for
> example, my string is:
>



It seems right to me, isn't it?

g++ -shared -fPIC -o /home/luca/tmp/wxWidgets-2.8.0/lib/libwx_gtk2u_ogl-2.8.so.0.0.0
ogldll_basic2.o ogldll_canvas.o ogldll_divided.o ogldll_mfutils.o
ogldll_oglmisc.o ogldll_basic.o ogldll_composit.o ogldll_drawn.o
ogldll_bmpshape.o ogldll_constrnt.o ogldll_lines.o
ogldll_ogldiag.o -pthread -L/home/luca/tmp/wxWidgets-2.8.0/lib -Wl,-soname,libwx_gtk2u_ogl-2.8.so.0 -lz -ldl -lm -lwxtiff-2.8 -lwxjpeg-2.8 -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lXinerama -lSM -lpng -lz -lwxregexu-2.8 -pthread -Wl,--version-script,/home/luca/tmp/wxWidgets-2.8.0/version-script -lz -ldl -lm -lwx_gtk2u_core-2.8 -lwx_baseu-2.8

Should I set other options?

Thanks,
Luca

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-17-2008, 08:48 PM
Alex Gorbachenko
 
Posts: n/a
Default Re: undefined reference - problem compilingpgadmin3

On Fri, 2 Feb 2007 12:00:09 +0100
Luca wrote:

>but I've installed wx, run ldconfig and then build the contribs.


imho, wxgtk bulds normally only in wxgtk source tree, and you must
compile at once main package along with contribs.

currently, i maintain wxGTK and pgadmin3 for russian ALTLinux distro. i
was routinely build rpm packages, and all works fine.

>It seems right to me, isn't it?


yes, that's right.

[skipped]

>Should I set other options?


no.


--
np: Bullet for my Valentine - suffocating under words of sorrow (what
can i do) (live at brixton academy)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFwyFbnBAcpC5E7HkRAiFXAJ92pd4fuxV3Q0yH9qfA1R bxWN0+eQCfXpsl
eiRoXlfKXGF7A8ik8VIZD9g=
=/ioH
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-17-2008, 08:48 PM
Alex Gorbachenko
 
Posts: n/a
Default Re: undefined reference - problem compilingpgadmin3

On Fri, 2 Feb 2007 12:00:09 +0100
Luca wrote:

>Should I set other options?


why you don't use binary wx distributions for ubuntu ?
http://wxpython.wxcommunity.com/apt/...apper/2.8.1.1/

--
np: Bullet for my Valentine - suffocating under words of sorrow (what
can i do) (live at brixton academy)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFwycRnBAcpC5E7HkRAuAWAJ9NyAClmbq8ZkeXC/4lrbqioGk1kQCgrEk6
uA/9V8f7+52l4jlkG1TMYAM=
=0StH
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-17-2008, 08:48 PM
Luca Ferrari
 
Posts: n/a
Default Re: undefined reference - problem compiling pgadmin3

On Friday 02 February 2007 Alex Gorbachenko's cat, walking on the keyboard,
wrote:
> why you don't use binary wx distributions for ubuntu ?
> http://wxpython.wxcommunity.com/apt/...apper/2.8.1.1/



Well, from the above link I took the src library, recompiled it and now I've
got the pgadmin3 working! I'm quite astonished by this strange behaviour, but
now it works!

Thanks everyone for the support, and if someone has a clue about what happened
please advice.

Luca



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:13 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com