Thread: Linking error (same old story)

Linking error (same old story)

From
Jean-Michel POURE
Date:
Dear all,

I am now running RedHat 9. Still ... the linking error is the same as under
RedHat 8.0.

/usr/bin/ld cannot find -lwx_gtkd_stc-2.5.

After each installation of wxGTK and XTC and STC, I ran ldconfig to update
library paths. Furthermore, I added /usr/local/lib to /etc/ld.so.conf.

Adam or anyone could you help me? Why not use real paths of xrc and stc during
linking?

Cheers,
Jean-Michel

*********************************************************************************************

g++ -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I./include/
-I -g -O2  -L/usr/lib -L/usr/local/lib -o pgAdmin3  pgAdmin3.o pgConn.o
pgSet.o pgAggregate.o pgCast.o pgCheck.o pgCollection.o pgColumn.o
pgConstraints.o pgConversion.o pgDatabase.o pgDomain.o pgForeignKey.o
pgFunction.o pgGroup.o pgIndex.o pgIndexConstraint.o pgLanguage.o pgObject.o
pgOperator.o pgOperatorClass.o pgRule.o pgSchema.o pgSequence.o pgServer.o
pgTable.o pgTrigger.o pgType.o pgUser.o pgView.o pgDatatype.o ctlSQLBox.o
ctlSQLResult.o dlgAddTableView.o events.o frmAbout.o frmChildTableViewFrame.o
frmConnect.o frmMain.o frmOptions.o frmPassword.o frmQuery.o
frmQueryBuilder.o frmHelp.o frmQBJoin.o frmSplash.o frmVacuum.o frmEditGrid.o
dlgProperty.o dlgUser.o dlgGroup.o dlgDatabase.o dlgLanguage.o dlgSchema.o
dlgDomain.o dlgTable.o dlgColumn.o dlgIndex.o dlgFunction.o dlgView.o
dlgRule.o dlgOperator.o dlgAggregate.o dlgCast.o dlgConversion.o
dlgIndexConstraint.o dlgForeignKey.o dlgSequence.o dlgTrigger.o dlgType.o
dlgCheck.o frmStatus.o misc.o sysLogger.o sysSettings.o  -lssl -lcrypto -lpq
-lwx_gtkd_stc-2.5 -lwx_gtkd_xrc-2.5 -L/usr/local/lib -pthread
/usr/local/lib/libwx_gtk-2.5.a -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk
-rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm
-lpng -ljpeg -ltiff -lz -ldl -lm
/usr/bin/ld: ne peut trouver -lwx_gtkd_stc-2.5
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [pgAdmin3] Erreur 1
make[2]: Quitte le répertoire `/home/pgadmin/pgadmin3/src'
make[1]: *** [all-recursive] Erreur 1
make[1]: Quitte le répertoire `/home/pgadmin/pgadmin3'
make: *** [all] Erreur 2

*************************************************************************************************

[root@linus pgadmin3]# ls /usr/local/lib
libwx_gtk-2.5.a     libwx_gtk-2.5.so.0.0.0  libwx_gtk_stc-2.5.so.0
libwx_gtk_xrc-2.5.so        wx
libwx_gtk-2.5.so    libwx_gtk_stc-2.5.a     libwx_gtk_stc-2.5.so.0.0.0
libwx_gtk_xrc-2.5.so.0
libwx_gtk-2.5.so.0  libwx_gtk_stc-2.5.so    libwx_gtk_xrc-2.5.a
libwx_gtk_xrc-2.5.so.0.0.0


Re: Linking error (same old story)

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 09 June 2003 06:59
> To: pgadmin-hackers@postgresql.org
> Cc: Dave Page; Andreas Pflug
> Subject: Re: [pgadmin-hackers] Linking error (same old story)
>
>
> > I've tried to help you a couple of times with this but you never
> > replied to any of my emails.
>
> Thanks Dave for your various emails which helped. I read your
> emails ... By
> the way, wxGTK 2.4 does not even ./configure under RedHat 9.
> So, wxGTK 2.5 is
> the only solution...
>
> > I too cannot link under Linux - after discussion with Andreas, we
> > should be using the 2003-06-07 CVS snapshot so we're at least all
> > running the same version. In your case though, it looks like you
> > didn't compile debug version of wx (--enable-debug).
>
> I would like to create a wxGTK 2.5 rpm to be sure we use the
> same environment.
>
> Could someone confirm the required configuration options
> (Andreas?): --enable-debug --with-gtk --enable-gtk2
> --enable-unicode --disable-shared

OK, I've run:

./configure --enable-debug --with-gtk --enable-gtk2 --enable-unicode
./configure --with-gtk --enable-gtk2 --enable-unicode

And compiled and installed wx, src and stc (the 20030607 CVS release,
with Andreas' patch).

I then configured pgAdmin with:

./configure --wit-wx=/usr/local/wx25 --with-pgsql=/usr/local/pgsql
--enable-unicode --enable-gtk2

Which gets me the following:

root@snake:/usr/local/src/pgadmin3# make all
make  all-recursive
make[1]: Entering directory `/usr/local/src/pgadmin3'
Making all in src
make[2]: Entering directory `/usr/local/src/pgadmin3/src'
g++ -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g
-I./include/ -I -g -O2  -L/usr/local/pgsql/lib -L/usr/local/wx25/lib -o
pgAdmin3  pgAdmin3.o pgConn.o pgSet.o pgAggregate.o pgCast.o pgCheck.o
pgCollection.o pgColumn.o pgConstraints.o pgConversion.o pgDatabase.o
pgDomain.o pgForeignKey.o pgFunction.o pgGroup.o pgIndex.o
pgIndexConstraint.o pgLanguage.o pgObject.o pgOperator.o
pgOperatorClass.o pgRule.o pgSchema.o pgSequence.o pgServer.o pgTable.o
pgTrigger.o pgType.o pgUser.o pgView.o pgDatatype.o ctlSQLBox.o
ctlSQLResult.o dlgAddTableView.o events.o frmAbout.o
frmChildTableViewFrame.o frmConnect.o frmMain.o frmOptions.o
frmPassword.o frmQuery.o frmQueryBuilder.o frmHelp.o frmQBJoin.o
frmSplash.o frmVacuum.o frmEditGrid.o dlgProperty.o dlgUser.o dlgGroup.o
dlgDatabase.o dlgLanguage.o dlgSchema.o dlgDomain.o dlgTable.o
dlgColumn.o dlgIndex.o dlgFunction.o dlgView.o dlgRule.o dlgOperator.o
dlgAggregate.o dlgCast.o dlgConversion.o dlgIndexConstraint.o
dlgForeignKey.o dlgSequence.o dlgTrigger.o dlgType.o dlgCheck.o
frmStatus.o misc.o sysLogger.o sysSettings.o  -lssl -lcrypto -lpq
-lwx_gtk2ud_stc-2.5 -lwx_gtk2ud_xrc-2.5 -L/usr/local/wx25/lib -pthread
/usr/local/wx25/lib/libwx_gtk2u-2.5.a -Wl,--export-dynamic -pthread
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lgthread-2.0 -lglib-2.0 -lpng -ljpeg -ltiff -lz -Wl,--export-dynamic
-lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
-lm
pgSet.o(.text+0xa27): In function `pgQueryThread::execute()':
/usr/local/include/wx/wxchar.h:573: undefined reference to
`wxString::ConcatSelf(int, wchar_t const*)'
pgDatatype.o(.text+0xc4): In function
`pgDatatype::pgDatatype[not-in-charge](wxString const&, long, long)':
/usr/local/include/wx/wxchar.h:573: undefined reference to
`wxString::ConcatSelf(int, wchar_t const*)'
pgDatatype.o(.text+0x133): In function
`pgDatatype::pgDatatype[not-in-charge](wxString const&, long, long)':
/usr/local/include/wx/string.h:343: undefined reference to
`wxString::ConcatSelf(int, wchar_t const*)'
pgDatatype.o(.text+0x179): In function
`pgDatatype::pgDatatype[not-in-charge](wxString const&, long, long)':
/usr/local/include/wx/wxchar.h:573: undefined reference to
`wxString::ConcatSelf(int, wchar_t const*)'
pgDatatype.o(.text+0x1b8): In function
`pgDatatype::pgDatatype[not-in-charge](wxString const&, long, long)':
/usr/local/include/wx/string.h:343: undefined reference to
`wxString::ConcatSelf(int, wchar_t const*)'
pgDatatype.o(.text+0x24c):/usr/local/include/wx/string.h:343: more
undefined references to `wxString::ConcatSelf(int, wchar_t const*)'
follow
sysLogger.o(.text+0x787): In function `sysLogger::WriteLog(wxString
const&)':
/usr/local/include/wx/string.h:448: undefined reference to
`wxFFile::wxFFile[in-charge](wchar_t const*, char const*)'
sysSettings.o(.text+0x6c): In function
`sysSettings::sysSettings[not-in-charge](wxString const&)':
/usr/local/include/wx/string.h:308: undefined reference to
`wxFileConfig::wxFileConfig[not-in-charge](wxString const&, wxString
const&, wxString const&, wxString const&, long)'
sysSettings.o(.text+0xd20): In function
`sysSettings::sysSettings[in-charge](wxString const&)':
/usr/local/include/wx/string.h:308: undefined reference to
`wxFileConfig::wxFileConfig[not-in-charge](wxString const&, wxString
const&, wxString const&, wxString const&, long)'
collect2: ld returned 1 exit status
make[2]: *** [pgAdmin3] Error 1
make[2]: Leaving directory `/usr/local/src/pgadmin3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/pgadmin3'
make: *** [all] Error 2

Any ideas anyone? As Jean-Michel asked, what options are you guys
configuring with?

Regards, Dave.

BTW: Works fine under Win32 with wx25...



Re: Linking error (same old story)

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 08 June 2003 18:49
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Linking error (same old story)
>
>
> Dear all,
>
> I am now running RedHat 9. Still ... the linking error is the
> same as under
> RedHat 8.0.
>
> /usr/bin/ld cannot find -lwx_gtkd_stc-2.5.
>
> After each installation of wxGTK and XTC and STC, I ran
> ldconfig to update
> library paths. Furthermore, I added /usr/local/lib to /etc/ld.so.conf.
>
> Adam or anyone could you help me? Why not use real paths of
> xrc and stc during
> linking?

Jean-Michel,

I've tried to help you a couple of times with this but you never replied
to any of my emails.

I too cannot link under Linux - after discussion with Andreas, we should
be using the 2003-06-07 CVS snapshot so we're at least all running the
same version. In your case though, it looks like you didn't compile
debug version of wx (--enable-debug).

Regards, Dave

Re: Linking error (same old story)

From
Jean-Michel POURE
Date:
> I've tried to help you a couple of times with this but you never replied
> to any of my emails.

Thanks Dave for your various emails which helped. I read your emails ... By
the way, wxGTK 2.4 does not even ./configure under RedHat 9. So, wxGTK 2.5 is
the only solution...

> I too cannot link under Linux - after discussion with Andreas, we should
> be using the 2003-06-07 CVS snapshot so we're at least all running the
> same version. In your case though, it looks like you didn't compile
> debug version of wx (--enable-debug).

I would like to create a wxGTK 2.5 rpm to be sure we use the same environment.

Could someone confirm the required configuration options (Andreas?):
--enable-debug --with-gtk --enable-gtk2 --enable-unicode --disable-shared

The wxGTK RPM will include Andreas patch unless the patch is applied to wxGTK
cvs soon (please keep me informed).

Cheers, Jean-Michel


UTF-8 issues

From
Jean-Michel POURE
Date:
On Tuesday 10 June 2003 11:06, Andreas Pflug wrote:
> There's one patch pending, that's Hiroshi's patch regarding the
> scintilla lexer, which will take some time to make it's way into
> wxWindows cvs. There should be no problem about that, because it's just
> a better highlighting thing, not a "won't go" situation that we had with
> older wx versions.

Perfect, thanks for your help Andreas. I now build daily snapshots and plan to
upload them to Snake everyday.

By the way:
- Make install does not install language files. Adam, can it be done easilly?
- I think it is preferable to store all .po files in UTF-8 format. This will
help us track UTF-8 bugs. Also, it is always easier to have a single encoding
for all languages.

To convert language files to UTF-8:
recode latin1..utf8 DE_de/pgadmin3.po

Cheers,
Jean-Michel


Re: Linking error (same old story)

From
"Adam H. Pendleton"
Date:
Jean-Michel POURE wrote:

>By the way, wxGTK 2.4 does not even ./configure under RedHat 9. So, wxGTK 2.5 is
>the only solution...
>
I've had no problems using both wxGTK 2.4 and 2.5 under RedHat 9.  What
are your problems specifically?

ahp


Re: Linking error (same old story)

From
Jean-Michel POURE
Date:
On Tuesday 10 June 2003 14:14, Adam H. Pendleton wrote:
> I've had no problems using both wxGTK 2.4 and 2.5 under RedHat 9.  What
> are your problems specifically?

Sorry Adam, this is a old post, please disguard it.

I successfully compiled wxGTK 2.5, pgAdmin3 and uploaded Redhat 9 snapshots on
http://snake.pgadmin.org. Thanks for your help within the last days and
weeks.

Now, I have a question: do you plan to add language support to the make
script? Languages files are stored in /src/ui/DE_de, etc...

Cheers,
Jean-Michel


Re: Linking error (same old story)

From
"Adam H. Pendleton"
Date:
Jean-Michel POURE wrote:

>Now, I have a question: do you plan to add language support to the make
>script? Languages files are stored in /src/ui/DE_de, etc...
>
>
>
"I work at the pleasure of the President".  :)  If Dave wants me to add
language support to the make script, it will be done.  I don't know much
about language support (I don't much about the French I took), but I can
learn.  Dave, what do you think?  Also, now would be a good time to tell
me what type of default build (i.e., static, debug, etc.) you would like
the autoconf code to support.

ahp


Re: Linking error (same old story)

From
"Dave Page"
Date:

> -----Original Message-----
> From: Adam H. Pendleton [mailto:fmonkey@fmonkey.net]
> Sent: 10 June 2003 14:03
> To: jm.poure@freesurf.fr
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Linking error (same old story)
>
>
> Jean-Michel POURE wrote:
>
> >Now, I have a question: do you plan to add language support
> to the make
> >script? Languages files are stored in /src/ui/DE_de, etc...
> >
> >
> >
> "I work at the pleasure of the President".  :)  If Dave wants
> me to add
> language support to the make script, it will be done.  I
> don't know much
> about language support (I don't much about the French I
> took), but I can
> learn.  Dave, what do you think?

Errrmm, not to fussed about having multilanguage support for the process
itself, but the translations themselves should be included in the build
somehow (I assume they are anyway - it gives me an option for German now
under Linux). Jean-Michel is rapidly becoming the expert in this I think
so I must bow to his superior knowledge.

> Also, now would be a good
> time to tell
> me what type of default build (i.e., static, debug, etc.) you
> would like
> the autoconf code to support.

I think we should have the following options in addition to
--with-wx/--with-pgsql):

--[en|dis]able-unicode (implies gtk2)
--[en|dis]able-debug
--[en|dis]able-shared

The default should be equivalent to:

--enable-unicode --enable-shared --disable-debug

I think that will give us maxmimum flexibility. Any thoughts form anyone
else?

Regards, Dave.

PS. Adam/Andreas: I finally got the builds working on snake by using
--with-wx=/usr/local/src/wxWindows-20030607 instead of
--with-wx=/usr/local/wx25. There must be something that wasn't getting
installed...


Re: Linking error (same old story)

From
"Adam H. Pendleton"
Date:
Dave Page wrote:

>PS. Adam/Andreas: I finally got the builds working on snake by using
>--with-wx=/usr/local/src/wxWindows-20030607 instead of
>--with-wx=/usr/local/wx25. There must be something that wasn't getting
>installed...
>
>
>
Dave/Everybody, if you encounter a problem with building/linking, etc.
pgAdmin3, especially if it occurs during the config process, the best
thing to do is to send me a copy of your error, the config.log that was
generated when you ran ./configure, the options you passed to the
pgAdmin3 configure, and the options you passed to the wxWindows
configure as well.  If you (Dave) would like, I can put together a quick
HOWTO on building pgAdmin3 against both wxWindows 2.4 as well as 2.5 for
RedHat/Linux and Mac.

ahp


Re: Linking error (same old story)

From
"Dave Page"
Date:

> -----Original Message-----
> From: Adam H. Pendleton [mailto:fmonkey@fmonkey.net]
> Sent: 10 June 2003 14:22
> To: Dave Page
> Cc: jm.poure@freesurf.fr; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Linking error (same old story)
>
> If you (Dave) would like, I can put
> together a quick
> HOWTO on building pgAdmin3 against both wxWindows 2.4 as well
> as 2.5 for
> RedHat/Linux and Mac.

That would certainly be useful if you have a few minutes spare - thanks.
We should start thinking about sorting out some documentation properly.

Regards, Dave.

Re: Linking error (same old story)

From
Jean-Michel POURE
Date:
On Tuesday 10 June 2003 15:21, Adam H. Pendleton wrote:
> Dave/Everybody, if you encounter a problem with building/linking, etc.
> pgAdmin3, especially if it occurs during the config process, the best
> thing to do is to send me a copy of your error, the config.log that was
> generated when you ran ./configure, the options you passed to the
> pgAdmin3 configure, and the options you passed to the wxWindows
> configure as well.  If you (Dave) would like, I can put together a quick
> HOWTO on building pgAdmin3 against both wxWindows 2.4 as well as 2.5 for
> RedHat/Linux and Mac.

Just to let you know pgadmin.spec file was committed to CVS and pgAdmin3
redhat RPMs are available at http://snake.pgadmin.org. So there is less need
for basic users to compile.

Configuration works like a charm, thanks for all your work.

Do you plan to use the remote MacOsX machine to generate daily snapshot?

Cheers,
Jean-Michel


Re: Linking error (same old story)

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 10 June 2003 15:09
> To: Adam H. Pendleton
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Linking error (same old story)
>
>
> Do you plan to use the remote MacOsX machine to generate
> daily snapshot?

Does it compile on Mac yet?

Regards, Dave.