[Coin-discuss] Lapack, blas, g2c and makefiles

Francois Margot fmargot at andrew.cmu.edu
Fri Mar 4 09:11:10 EST 2005


Matt:

>>
>> I had trouble compiling Bcp and Cbc with a version of COIN that has
>> Lapack, Blas and g2c installed. I had to modify the makefiles to make it
>> work. I wonder if something is wrong with my installation or my understanding
>> of the makefiles, but something could be done to make this easier. The
>> problem might be that the lapack library I have is named lapack_LINUX.a and
>> not liblapack_LINUX.a. But since I am using the default names used by the
>> Lapack makefiles, either put a warning in the COIN makefile that these names
>> should be changed or modify the makefiles so that it can handle names not
>> starting with "lib". I am far from an expert in makefiles, so I might have
>> overlooked something obvious.
>
> The problem here is that the -l option to gcc automatically prepends "lib"
> and appends ".a" or ".so*" to the string supplied in order to specify the
> filename.  It looks like the right action if your lib name doesn't conform
> to this convention is to just include the lib as one of the input files to
> the link stage.  The -l option searches the paths specified by the
> compiler defaults and the -L option, so not using it means you will have
> to specify the full (relative or absolute) path to the lapack file.

What about a warning somewhere that the COIN makefiles assume this type of 
names for libraries (i.e. starting with lib) ? What is obvious for 
some is far from obvious for others ...

What happens for Bcp ? As far as I can tell, it does not work when 
COIN is built with lapack, and this has nothing to do with libraries names.
No reference to lapack appears in the link command.

>>
>> For Bcp, it apparently completely ignores the presence of Lapack. I had to
>> add
>>
>> 	$(ENV_LAPACK_LIB)/lapack_LINUX.a $(ENV_BLAS_LIB)/blas_LINUX.a \
>> 	$(ENV_G2C_LIB)/libg2c.a
>>
>> in the compilation line for bcps in COIN/Bcp/Makefile, around line 340.
>>

Francois



More information about the Coin-discuss mailing list