Showing posts with label libraries. Show all posts
Showing posts with label libraries. Show all posts

Thursday, October 6, 2011

A good read - Dissecting shared libraries

This article "Dissecting shared libraries" from IBM DeveloperWorks is a good read if you wish to have a deeper understanding on shared libraries.

Tuesday, September 13, 2011

/usr/bin/ld cannot find -lliblapack.so

We were linking our c program to gcc which require the lapack and blas libraries. I did not compile my own libraries but uses instead the CentOS lapack and blas libraries. For more information on installing lapack and blas Installing lapack, blas and atlas on CentOS 5.4

We will compiling our codes
$ gcc exact.c -L/usr/lib64 -lliblapack.so.3 -llibblas.so.3
The result error
/usr/bin/ld: cannot find -lliblapack.so.3
collect2: ld returned 1 exit status

I checked my /etc/ld.so.conf.d/ to ensure that I have /usr/lib64. Of course remember to do a ldconfig if you have made any changes

If the -L and -I does not allow linking process to scan correctly, do a direct complete pathing of the library like the one below and it compile nicely
$ gcc exact.c /usr/lib64/liblapack.so.3 /usr/lib64/libblas.so.3

In case you do not know where to locate your libraries, you can do a
$ locate liblapack

For similar notes on the linking challenges, you may want to explore this forum thread
problems in linking lapack to g77

Sunday, September 26, 2010

Installing lapack, blas and atlas on CentOS 5

Installing lapack, blas and atlas on CentOS 5.4 is very simple.Firstly you must enable the follow repositories:

  1. atlas package - EPEL (For more information on how to download EPEL, see Red Hat Enterprise Linux / CentOS Linux Enable EPEL Repository
  2. blas and lapack packages - RPMForge (For more information on how to download RPMForge, See Install RPMForge
Installing atlas, blas and lapack x86_64 packages
# yum install atlas.x86_64 blas.x86_64 lapack.x86_64