[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fwd: Linking lapack and C standard library



As to the problem of linking lapack, I wonder whether this is because
it deal of a C-language code, requiring a fine-tuned calling. Is any C
interface to lapack in Debian?

thanks
francesco


---------- Forwarded message ----------
From: Francesco Pietra <chiendarret@gmail.com>
Date: Thu, Mar 14, 2013 at 6:35 PM
Subject: Fwd: Linking lapack and C standard library
To: amd64 Debian <debian-amd64@lists.debian.org>, debian-users
<debian-user@lists.debian.org>


No, it is not correct. With the indicated links, patching reports all
correct Hunk(s), while a post script is incorrect. So that "make
depends" for the program+plugin does not correlate anything.

I tried the link to "-L/usr" with same error. It is not clear to me
whether it is a problem of path, or of lacking headers. While I see
the headers for stdc++ (commanding "locate ...", I don't see headers
for lapack (having installed liblapack3gf-dev). Perhaps some other
lapack package is required.

I tried to have a more verbose patching, as the error indicated both
on "patching" and on "make depends":

plugin.inc:39: *** missing separator. Stop
DONE!


 does not point to a remedy.

francesco


---------- Forwarded message ----------
From: Francesco Pietra <chiendarret@gmail.com>
Date: Thu, Mar 14, 2013 at 3:54 PM
Subject: Re: Linking lapack and C standard library
To: João Luis Meloni Assirati <assirati@nonada.if.usp.br>, amd64
Debian <debian-amd64@lists.debian.org>, debian-users
<debian-user@lists.debian.org>


Hello  João Luis:

Sorry for my lack of care in setting the addresses.

What I did was: install liblapack3gf-dev to complete the
installations, according to previous suggestions. Now, my guess for
the link is

LIBS="-L/usr/lib -llapack  -L/usr/lib  -lstdc++"

According to the README, a link to both lapack and lstc++ libraries is
needed. No  link to the C++ compiler, as the above link is for a
plugin for a program that is C++ compiled. Should those LIBS above not
be correctly linked, the program complises without the plugin.

I am going to try with the above link. If it works, I have to consider
whether faster libraries would speed up the plugin. I don't know how
heavy the mathematical computations are. I have the MKL libraries,
though as rpm package. And since a few years, alien alone is no more
capable of transforming that rpm to deb. Probably rpm would install
with Debian, though one never knows where the files are.

Thanks
francesco



On Thu, Mar 14, 2013 at 1:19 PM, João Luis Meloni Assirati
<assirati@nonada.if.usp.br> wrote:
> Em 14-03-2013 08:54, Francesco Pietra escreveu:
>
>> Please  see my previous answer, and action.
>>
>> Directions how to compile that program tell that links to both lapack
>> and lstc++ libraries are required in LIBS=..... No link to the C++
>> compiler is required.
>
>
> Francesco, please answer to the list. I could not see your previous answer
> nor action. I'm a subscriber of the debian-users list only.
>
> João Luis.
>
>
>>
>> francesco
>>
>> On Thu, Mar 14, 2013 at 12:21 PM, João Luis Meloni Assirati
>> <assirati@nonada.if.usp.br>  wrote:
>>>
>>> Em 14-03-2013 08:00, Francesco Pietra escreveu:
>>>
>>>> Hello
>>>> May I ask how to correctly link lapack and C standard libraries with
>>>> Debian amd64 wheezy?
>>>
>>>
>>> You mean how to compile a C program, linking both lapack and the standard
>>> C
>>> library to it? I suppose so in the following.
>>>
>>>
>>>> Packages installed: liblapack3gf liblapack3 libblas3 libc6 libc6-dev
>>>> **************
>>>
>>>
>>> You probably need liblapack-dev also, which contains the header files
>>> needed
>>> to compile our program.
>>>
>>>
>>>> The code to compile makes a generic example:
>>>>
>>>> LIBS="-llapack -lstdc++"
>>>
>>>
>>> If it's a C program, you don't need the C++ standard library. Suppose
>>> your
>>> program is a file program.c. Try
>>>
>>> gcc -llapack -lm -o program program.c
>>>
>>> Usually you don't have to explicitly link the standard C library (because
>>> it
>>> is standard), except the math portions of it (so use the -lm switch if
>>> you
>>> are using math functions from the standard lib).
>>>
>>>
>>>> thanks
>>>>
>>>> francesco pietra
>>>>
>>> João Luis.
>>>
>


Reply to: