From: Hans-Bernhard B. <br...@ph...> - 2004-04-26 12:13:37
|
On Sun, 25 Apr 2004, Ethan Merritt wrote: > On Sunday 25 April 2004 12:56 pm, Hans-Bernhard Broeker wrote: [...] > > That's not the right way of fixing this, of course. The actual > > bug is in configure.in, where linking against -lgd and -lpng is > > tested and the variables used in the link command are set up. > > > > Ethan: I'm CCing you on this because if memory serves, it was you who > > claimed that the tests in their current shape are the only way to get > > this to work on some platforms. > > I have vague recollections of saying that, but the only thing I can > find in the mailing list archive (from Jan 2003) is a slightly > different issue. I was making the point that (at least under linux) > if ./configure tests for libpng and finds it, it will be finding the > most current installed version. But this version may not > match the one that, say, libgd was linked against. In this case you get > incompatibility warnings at link time. So I was arguing against > specifying "-lpng -lz" explicitly if libgd was already being included. And that argument, as far as I can recall, is the exact reason why -lz is not currently appended to the link command line by the -lgd tests. This approach broke on at least 3 platforms by current count. In fact, it'll break all platforms with static libraries and those with shared libraries, but without inter-library dependency support. > Regardless of all that, the current report looks to me to be a different > issue. He had to change the order of the libraries in the link statement. > Apparently ./configure places them in the wrong order. > If I ever had a reason for wanting -lz to come before -lpng I can no longer > remember what it might have been. So if moving the tests on libz to after > the png tests fixes the problem, I have no objection (but we should test > it first, of course). That cannot possibly work, I think. We have to test for -lz first, then, if that exists, use it in the -lpng and -lgd link tests. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |