|
From: Dima K. <gn...@di...> - 2017-08-20 04:29:44
|
sfeam <sf...@us...> writes: > On Thursday, 17 August 2017 19:17:05 Dima Kogan wrote: >> On Thu, Aug 17, 2017, at 14:13, Ethan A Merritt wrote: >> >> > > 2. The build was broken on a recent Debian system: we were calling >> > > XInitThreads(), but not linking in -lX11. The patch adds the linkage >> > >> > Sigh. This keeps coming back and back and back. >> > Adding -lX11 fixes most linux installations but breaks everyone else. >> > >> > See for example https://sourceforge.net/p/gnuplot/bugs/1764/ >> >> OK, I read your links, but it's not obvious how it breaks everyone else. >> Is the concern that some platforms have wx, but not X11, so the link to >> libX11 will fail? What if instead of linking to -lX11 we link to >> $LIBRARIES_FOR_X? > > Doesn't that just push the same problem down or up one level? > The question then becomes how do you figure out what to put > in $LIBRARIES_FOR_X. I think this should be fine. On platforms where we ran ./configure --with-x (default usually) then $LIBRARIES_FOR_X would contain "-lX11", and the proposed link command would work. On platforms X11 isn't available, $LIBRARIES_FOR_X should evaluate to "", which would be fine. Presumably, the same should happen if we ./configure --without-x, but that doesn't work. This is probably a bug in the build system, but this is a separate issue. I'm attaching the updated patch |