From: Johan Hidding <johannes.hidding@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: using GSL with cblas via FFI
Date: Sat, 26 Mar 2011 10:53:52 +0100 [thread overview]
Message-ID: <AANLkTikAW=WObq+CnaQPaBjnpqCnR93iPi5xSMKV6wPY@mail.gmail.com> (raw)
In-Reply-To: <87y643aqns.fsf@gnu.org>
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 <ludo@gnu.org>:
> Hi Johan,
>
> Johan Hidding <johannes.hidding@gmail.com> 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’.
>
next prev parent reply other threads:[~2011-03-26 9:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 14:54 using GSL with cblas via FFI Johan Hidding
2011-03-25 20:31 ` Ludovic Courtès
2011-03-26 9:53 ` Johan Hidding [this message]
2011-03-31 15:18 ` Andy Wingo
-- strict thread matches above, loose matches on Subject: below --
2012-06-03 22:04 cong gu
2012-06-04 4:15 ` Thien-Thi Nguyen
2012-06-04 6:11 ` cong gu
2012-06-04 4:22 ` Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTikAW=WObq+CnaQPaBjnpqCnR93iPi5xSMKV6wPY@mail.gmail.com' \
--to=johannes.hidding@gmail.com \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).