[mpich-discuss] Compilation error of mpich-3.0.4 with Lustre 2.4.0

Yan Li yanli at ucsc.edu
Wed Oct 23 18:28:12 CDT 2013


Hello,

I'm trying to compile mpich-3.0.4 on CentOS 6.4 x86-64 running Lustre 2.4.0, which was installed by using RPMs from http://zfsonlinux.org/lustre.html

Configure command used:
./configure --prefix=/share/ --with-file-system=ufs+lustre

There's a compilation error:

~~~~ [snip] ~~~~
 CC       adio/ad_lustre/ad_lustre_open.lo
 CC       adio/ad_lustre/ad_lustre_rwcontig.lo
In file included from /usr/include/linux/lustre_user.h:46,
                from /usr/include/lustre/lustre_user.h:54,
                from adio/ad_lustre/ad_lustre.h:30,
                from adio/ad_lustre/ad_lustre_rwcontig.c:14:
/usr/include/sys/quota.h:221: error: expected declaration specifiers or '...' before 'caddr_t'
~~~~ [snip] ~~~~

As you can see that the file ad_lustre_open.c compiles OK. The difference between it and ad_lustre_rwcontig.c is that the latter includes this line:
#define _XOPEN_SOURCE 600
before including the lustre header file.

It seems to me that defining _XOPEN_SOURCE to 600 on Linux implies that caddr_t is defined somewhere else, suppressing the definition of caddr_t in <sys/types.h>, thus leads to the compilation error of <sys/quota.h>.

Removing the definition of _XOPEN_SOURCE from ad_lustre_rwcontig.c seems fixed this problem, but I want to know why the definition was put there in the first place and whether removing it can cause any potential problem.

Thanks for your help in advance.

Yan Li
Graduate Student Researcher,
Storage Systems Research Center,
Computer Science, University of California, Santa Cruz




More information about the discuss mailing list