guile-user
[Top][All Lists]
Advanced

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

Re: using GSL with cblas via FFI


From: Johan Hidding
Subject: Re: using GSL with cblas via FFI
Date: Sat, 26 Mar 2011 10:53:52 +0100

Hello Ludo',
I had a chat with Mark Weaver on IRC; he could reproduce the error.
The output shows basic GSL working, but GSL+CBLAS failing. I found a
way to -combine the static versions into a single shared library using
a trick I found on StackOverflow:

> gcc -shared -o c.so -Wl,--whole-archive libgsl.a libgslcblas.a 
> -Wl,--no-whole-archive

Then the code works fine. A C program using GSL is normally compiled
using -lgsl -lgslcblas, as the CBLAS functionality is optional.
Cheers, Johan

===
> guile ./minex.scm
#2f64((-0.234971334260896 -0.594500912896459 -1.11255443967142
0.801480195855566 -0.316194645848403) (1.24290785268759
-2.08593556136405 -1.22752508394053 0.277045912580934
-0.516092994917882) (0.459567260627738 1.15395341561812
-0.835952522855203 0.0988356041772604 -0.635311924759972)
(-0.244100471165847 1.15963505516295 0.0613902743778219
0.259165537608565 0.0346540015684283) (0.296738078387975
2.71061022226222 0.0472142970448045 -0.602746825007033
1.07870413974582))
#f64(0.967207588370043 -1.05773505748483 0.554728493261389
-0.996518864916059 0.577347100608013)
=================
-1.74071198327312
guile: symbol lookup error: /usr/lib/libgsl.so: undefined symbol: cblas_dtrsv
===

2011/3/25 Ludovic Courtès <address@hidden>:
> Hi Johan,
>
> Johan Hidding <address@hidden> writes:
>
>> I'm trying to use GSL through the FFI, but the program is not linked
>> to libgslcblas, so it cannot find some functions. Attached a minimal
>
> Can you please post your Guile session including the error message that
> you get?
>
> Thanks,
> Ludo’.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]