I recently received a new 64-bit laptop and is my first endeavor into 64-bit computing. I installed all my usual packages through yum (I am using fedora 64 bit) and it downloaded all the 64-bit versions of the packages. I went to install an rpm packaged by years ago by a colleague at my university and the installer notified me that I had to install the 32-bit versions of about 40 dependencies (the dependencies of the dependencies as well). Now I have a lot of questions and can't find the answers. I would appreciate some feedback on my two largest questions:

1a - If I have both versions of a library, say libABC.x86_64 and libABC.i686 (the 64 and 32 bit versions of libABC) how does the compiler (I always use cmake) know to use the 64 or 32 bit version?

1b - If I install the 32 and 64 bit versions of all the packages and compilers, do I now have to specify which compilers I use?

2 - I had installed OpenCV yesterday (downloading all the 64-bit dependicies prior) via the git source code. Now I was curious to see if OpenCV had installed its libraries into /usr/local/lib or /usr/local/lib64. It installed in /usr/local/lib. What's the deal? This code was compiled using 64-bit dependecny libraries using 64-bit compilers (all located in /usr/lib64) and it installed it's libraries into a 32-bit directory. Am I supposed to specify otherwise?

Thatnks for your time, looking forward to any feedback you can give.

-Sam

FM (Farking Magic). :-) On Red Hat (RHEL and Fedora) systems, 32-bit libraries are installed into /usr/lib, and 64-bit ones in /usr/lib64. The system knows when an application is 32-bit or 64-bit and will load the appropriate shared libraries. If your colleague provides an RPM file for installation, then the yum package manager will deal with installing the dependencies for you. If it is in source or other (binary) form, then you will probably need to install the dependencies (32-bit versions) manually (use yum to do that where possible).

As for compilers, it doesn't matter. The 64-bit version of the gcc compilers will handle 32-bit code just fine.

Since you installed OpenCV via git (source code), if there wasn't a configure script (which should deal with 32-bit vs. 64-bit issues when generating the Makefiles), then you may have needed to modify the Makefile(s) to install the libraries into /usr/lib64, or /usr/local/lib64. I've run into this issue in the past for packages that were not configured to handle Red Hat or Suse distributions properly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.