|
From: sfeam <sf...@us...> - 2014-06-19 15:44:09
|
On Thursday, 19 June 2014 05:05:45 PM Jun T. wrote:
> On 2014/06/17, at 4:43, Ethan A Merritt <sf...@us...> wrote:
> > So I have changed gnuplot's autoconfigure script to add -lX11
> > itself if it sees that the newer wxWidgets is being used.
>
> This causes a problem on my Mac (and maybe on other systems);
> the linker dies saying "-lX11 can't be found".
> (OS X 10.8 / no X11 installed / wxWidgets=svn HEAD)
I was afraid of that.
This is really a problem with the wxWidgets libraries and/or packaging.
If wx requires a initialization call to X11, it should make that call
itself rather than expecting the application to to the initialization.
Failing that, the wx package should at least have the configuration
tool wx-config report the correct dependencies. If it requires
a call to X11 then it should add -lX11 to the list generated by
`wx-config --libs` or `wx-config --linkdeps`.
As it stands, wx-config doesn't tell us what it needs so we have to
guess. I will try to report this as a bug against wxWidgets itself,
but that won't fix any existing installations.
> The following may be a possible fix, but not tested at all on Linux.
> diff -r1.368 configure.in
> 1037c1037,1038
> < if expr ${WXWIDGETS_VERSION} \> 2.8 >/dev/null; then
> ---
> > if expr ${WXWIDGETS_VERSION} \> 2.8 >/dev/null && \
> > ${WX_CONFIG} --basename | grep 'wx_gtk' >/dev/null 2>&1; then
As I understand it, wx_gtk does not necessarily use X11 as a
back end. So this test would not solve the problem for instance on
a linux system using wayland as a back end.
I notice that there was a bug-fix release of wxWidgets last week
(3.0.1). There are two items in the ChangeLog that might possibly
affect this issue. But even if they have fixed it, that still won't
make gnuplot's autoconfigure script work correctly on existing
wxWidgets installations.
Ethan
|