On Mon, Apr 25, 2016 at 4:01 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote: > On 2016-04-25 14:06-0400 Nick Deubert wrote: > >> On Fri, Apr 22, 2016 at 5:08 PM, Alan W. Irwin >> <ir...@beluga.phys.uvic.ca> wrote: >>> >>> On 2016-04-22 14:59-0400 Nick Deubert wrote: >>> >>>> Hey everyone, I am trying to build and link some 32bit binaries on >>>> Ubuntu 15.10 64bit, but no matter what combination of arguments I give >>>> FIND_LIBRARY I cannot get it to use the 32bit libs. I have been >>>> scouring the mailing lists and came up with all these things to try >>>> but nothing has worked so far. I am using cmake 3.0.2. Please let me >>>> know what I am missing. Thanks in advance for your help. >>> >>> >>> >>> CMake 3.0.2 is pretty old, and there were some find and other issues >>> for early CMake-3 versions. I don't know whether any of those issues >>> are relevant to the issue you are discussing. Nevertheless, as an >>> experiment (and to make sure your eventual solution works for the >>> latest CMake) I would suggest you try building and using the latest >>> released version of CMake, 3.5.2, to see if that makes any difference. >>> >>> Alan >> >> >> Ok I upgraded to 3.2.2 which is the latest ubuntu 15.10 offers (I will >> try 16.04 w/3.5.1 soon), but I get the same issue. > > >> Is my syntax all correct as far as you can tell? > > > Hi Nick: > > The syntax is OK _as far as I can tell_, but I did notice one important > issue in the libdl information you supplied with your original post which is > your 64-bit version of libdl is > > -- DL_LIBRARY is /usr/lib/x86_64-linux-gnu/libdl.so > > but there is no libdl.so in your 32-bit directory listings. The closest > you come is > > /lib/i386-linux-gnu/libdl.so.2 -> libdl-2.21.so > > but that doesn't cut it, and you need a development symlink (provided > by the development version of a library package) that defines a 32-bit > libdl.so symlink that can be found by CMake. Such symlink would > ordinarily be supplied by a Ubuntu development package. I don't have > Ubuntu installed myself, but Ubuntu is based on Debian, and for Debian > jessie the package name is libc6-dev-i386, and it contains the > > /usr/lib32/libdl.so > > symlink. So look for a similarly named package for Ubuntu, verify it > contains > libdl.so (I did that on Debian using "apt-file search libdl.so") and > install it.
Solved! I did have the 32bit-dev libraries installed but your tip made me realize the plain .so files are installed into /usr/lib/i386-linux-gnu and not /lib/i386-linux-gnu. As soon as I switched to that path it is finding all the right libs. I didn't realize cmake wouldn't parse the version numbers, so that is a very good thing to know. Thanks for your help! Nick -- 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