Page 1 of 1

[SOLVED] libxc-1.1.0.1 bug with gnu compiler

Posted: Fri Mar 02, 2012 4:47 pm
by cpsosa
Hello,

I am trying to build abinit latest version on a Cray using the gnu compiler ( I tried different versions ) and I get the following syntax error. Is this a known problem?

Thanks

libtool: compile: CC -DHAVE_CONFIG_H -I. -I.. -I/lus/scratch/cpsosa/csm/abinit-6.12.1/tmp/fallbacks/exports/include -O3 -MT lda.lo -MD -MP -MF .deps/lda.Tpo -c lda.c -o lda.o
mv -f .deps/lda.Tpo .deps/lda.Plo
/bin/sh ../libtool --tag=CC --mode=compile CC -DHAVE_CONFIG_H -I. -I.. -I/lus/scratch/cpsosa/csm/abinit-6.12.1/tmp/fallbacks/exports/include -O3 -MT lda_x.lo -MD -MP -MF .deps/lda_x.Tpo -c -o lda_x.lo lda_x.c
libtool: compile: CC -DHAVE_CONFIG_H -I. -I.. -I/lus/scratch/cpsosa/csm/abinit-6.12.1/tmp/fallbacks/exports/include -O3 -MT lda_x.lo -MD -MP -MF .deps/lda_x.Tpo -c lda_x.c -o lda_x.o
In file included from lda_x.c:246:
work_lda.c: In function 'void work_lda(const void*, int, const double*, double*, double*, double*, double*)':
work_lda.c:34: error: invalid conversion from 'const void*' to 'const xc_lda_type*'
lda_x.c: At global scope:
lda_x.c:259: warning: deprecated conversion from string constant to 'char*'
lda_x.c:259: warning: deprecated conversion from string constant to 'char*'
lda_x.c:271: warning: deprecated conversion from string constant to 'char*'
lda_x.c:271: warning: deprecated conversion from string constant to 'char*'
make[1]: *** [lda_x.lo] Error 1

Re: libxc-1.1.0.1 bug with gnu compiler

Posted: Fri Mar 02, 2012 5:48 pm
by pouillon
LibXC makes a heavy use of preprocessing. You should check that your setting of CPP is consistent with your compiler. In your case, I guess that not setting it manually has induced the build system of abinit to detect another - probably incompatible - C preprocessor.

Please contact directly the developers of LibXC if the problem persists.

Re: libxc-1.1.0.1 bug with gnu compiler

Posted: Fri Mar 02, 2012 5:56 pm
by cpsosa
Thanks. Do you know what is the best way to contact the libxc developers?

Re: libxc-1.1.0.1 bug with gnu compiler

Posted: Fri Mar 02, 2012 11:08 pm
by cpsosa
Problem solved, I was using CC=CC which compiles c code with c++ compiler that is more restrictive. CC=cc.