[ wxwindows-Bugs-1787512 ] wx-config gives erronous output
SourceForge.net
noreply at sourceforge.net
Tue Sep 4 02:04:13 PDT 2007
Bugs item #1787512, was opened at 2007-09-04 07:59
Message generated for change (Comment added) made by neis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1787512&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Utils
Group: Platform specific
Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Peter Lundgren (spirouz)
Assigned to: Nobody/Anonymous (nobody)
Summary: wx-config gives erronous output
Initial Comment:
I have discovered that wx-config in linux gives a funny output which messes up my linking. The output is this: "~$ wx-config --libs
-pthread -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6"
The first library parameter should be: "-lpthread". If I manually paste the text above and change the first parameter accordingly, the build succeeds. I discovered this in Gentoo and thought it was a flaw in the ebuild there, but now that I tested Ubuntu I get the same thing. It is also the same for wx-widgets 2.4 and 2.6.
----------------------------------------------------------------------
>Comment By: Stefan Neis (neis)
Date: 2007-09-04 09:04
Message:
Logged In: YES
user_id=32202
Originator: NO
In general, building a threaded version might involve more than just
linking to the pthread library, e.g. linking to a thread-safe version of
the C library or to thread-safe version of gcc support libraries or passing
specific options to the linker or whatever.
"-pthread" (or "-pthreads", depending on platform and on gcc version) is
going to take care of _all_ these details, while -lpthread is only going to
do this one particular thing...
----------------------------------------------------------------------
Comment By: Peter Lundgren (spirouz)
Date: 2007-09-04 08:48
Message:
Logged In: YES
user_id=1882489
Originator: YES
I am very sorry! I must have messed up something else. Should have double
checked! I does work! VERY VERY SORRY! I don't understandy though why -l
should not be used with pthread! Isn't it a static linkage to the pthread
library? Would be happy for an explanation if you have time.
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-09-04 08:26
Message:
Logged In: YES
user_id=71618
Originator: NO
What exactly is funny about this? "-pthread" is a valid gcc option, what
compiler/architecture do you use that it doesn't work for you?
Finally, replacing -pthread with -lpthread is *not* a safe thing to do.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1787512&group_id=9863
More information about the wx-dev
mailing list