forum.alglib.net

ALGLIB forum
It is currently Fri Nov 08, 2024 5:49 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Obscure Linker-Error
PostPosted: Wed Nov 16, 2011 12:49 pm 
Offline

Joined: Wed Nov 16, 2011 11:52 am
Posts: 1
Hi,

I am encountering some difficulties when using the mpfr version of ALGLIB. There is an obscure Linker error whenever I try to use a function of the library. It says:
Code:
g++  -o "svdTest"  ./source/amp.o ./source/ap.o ./source/main.o   -lgmp -lmpfr
/usr/lib/gcc/i586-suse-linux/4.5/../../../../i586-suse-linux/bin/ld: __gmpfr_emin: TLS definition in /usr/lib/gcc/i586-suse-linux/4.5/../../../libmpfr.so section .tdata mismatches non-TLS reference in ./source/main.o
/usr/lib/gcc/i586-suse-linux/4.5/../../../libmpfr.so: could not read symbols: Bad value
collect2: ld returned 1 exit status


The code works fine while I am only using the ampf objects and matrices thereof. The error occurs as soon as I am calling an ALG routine (I tried so far: rmatrixsvd and rmatrixinverse). I already tried to ask the Administrator of my System as I supposed this to be a System specific error, but he could not help either.

Below I will post an example code which produces this error:
Code:
#include <svd.h>

using namespace ap;
using namespace amp;

const int prec = 256;

int main(int argc, char **argv) {
   const int prec = 256;
   template_2d_array< ampf<prec> > A;

   //initializing A
   A.setbounds(0, 3, 0, 3);
   int i, j;
   for (i = 0; i < 4; ++i) for (j = 0; j < 4; ++j) {
      A(i, j) = i + j*4;
   }

   template_2d_array< ampf<prec> > U, V;
   template_1d_array< ampf<prec> > s;

   U.setbounds(0, 3, 0, 3);
   V.setbounds(0, 3, 0, 3);
   s.setbounds(0, 3);

   template_2d_array< ampf<prec> > &rU = U, &rV = V;
   template_1d_array< ampf<prec> > &rs = s;

   svd::rmatrixsvd(A, 4, 4, 2, 2, 2, rs, rU, rV);

   return 0;
}


Without the line svd::rmatrixsvd(A, 4, 4, 2, 2, 2, rs, rU, rV); it compiles (and links) without Problems.

Thank you for your time


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group