On 24/04/2017 19:30, Ben Boeckel wrote:
On Mon, Apr 24, 2017 at 19:17:39 +0100, Roger Leigh wrote:
Sounds like that's exactly the problem.  You can only have one libpng
*development* package installed at once.  You probably want the regular
"libpng-dev" package installed if you want to build against the standard
libpng.

Ah, this is before the multiarch split from Debian came into Ubuntu? I'm
so used to Red Hat's lib64 split (multilib) (which, admittedly, has its
drawbacks in light of multiarch).

Yes, this is exactly the case. There are actually four development packages which could be installed:

libpng-dev:amd64
libpng-dev:i386
libpng12-dev:amd64
libpng12-dev:i386

And that's not counting the other architectures which could /also/ be installed as well, e.g. libpng-dev:powerpc, libpng12-dev:armel etc.

While you can install as many of the runtime packages as you like, the headers go into /usr/include and so they conflict with each other, limiting you to a single development package at one time (checked the behaviour to verify this, and installing one triggers removal of any existing variant). Not itself a multiarch limitation--many packages now use /usr/include/<arch> for this reason--but certainly a limitation in the packaging of the current libpng, which for some reason hasn't yet started using arch-specific headers.

This is almost certainly why FindPNG fails. The headers are found, but the library is missing since it's in the arch-specific lib path for the other architecture, and the compiler isn't using that path by default.


Regards,
Roger
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to