0

I am trying to compile my own code using some functions in this library: tsnnls

This libraries also uses other libraries: Lapack, Blas, Argtable2, TAUCS

It seems that there are some incompatiablity in error handling of function between math.h and taucs.h. Please help me in sorting out these error.

Here are error messages:

$ sudo make

g++ -c tsnnls_test_DKU.c
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:201:74: error: declaration of ‘int isinf(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                          ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:814:12: error: from previous declaration ‘int isinf(double)’
 extern int isinf(double);
            ^
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:204:75: error: declaration of ‘int finite(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                           ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:811:12: error: from previous declaration ‘int finite(double)’
 extern int finite(double);
            ^
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:234:74: error: declaration of ‘int isnan(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                          ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:808:12: error: from previous declaration ‘int isnan(double)’
 extern int isnan(double);
            ^
tsnnls_test_DKU.c: In function ‘int main(int, char**)’:
tsnnls_test_DKU.c:442:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   colvector_write_mat(outfile,xvals,Acols,"x");
                                              ^
make: *** [tsnnls_test_DKU.o] Error 1
Garima Singh
  • 1,410
  • 5
  • 22
  • 46
  • 3
    Why are you compiling C code with a C++ compiler? – Mat Jan 26 '15 at 10:40
  • @Mat Thanks for reminding. It worked. – Garima Singh Jan 26 '15 at 10:44
  • 3
    Also, don't build as root. Compile with an ordinary user, only switch to a privileged account to install stuff _if_ necessary. A compiler does not need elevated privileges for anything. – Mat Jan 26 '15 at 10:46

0 Answers0