[mpich-discuss] Error building mpich-3.1.2 on Solaris 10 with gcc-4.9.0

Junchao Zhang jczhang at mcs.anl.gov
Fri Sep 5 16:58:00 CDT 2014


Could you configure with --disable-cxx to see if you can continue?

--Junchao Zhang


On Fri, Sep 5, 2014 at 2:26 PM, Siegmar Gross <
Siegmar.Gross at informatik.hs-fulda.de> wrote:

> Hi,
>
> thank you very much for all answers to my problems building
> MPICH on Solaris with gcc-4.9.0. Today I tried to build
> mpich-master-v3.2a1. Unfortunately I have had the same problems.
>
> > 1) For the linking errors you should provide the full build log but it
> > could just be an issue with the order of arguments passed to Solaris ld,
> or
> > if you compiled gcc to use GNU ld, the same issue might occur if the
> > configure script assumes Solaris => Solaris ld.
>
> I have attached the files in the archive
> mpich-3.2-SunOS.sparc.64_gcc_only-m64.tar.gz
>
>
> > 2) I keep this sticky note on my wiki:
> >
> > "Compiler or options invalid for pre-UNIX 03 X/Open applications and
> > pre-2001 POSIX applications"
> >
> >
> /usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.3/include-fixed/sys/feature_tests.h:362:2:
> > error: #error "Compiler or options invalid for pre-UNIX 03 X/Open
> applications
> > and pre-2001 POSIX applications"
> >
> >  Conflict of standards between _XOPEN_SOURCE and C99 extensions.
> >
> > #if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
> >
> > As GCC standards do not match ANSI/ISO/POSIX standards strictly you need
> to
> > specify the standard you want to comply with.
> > Usually adding -D_XOPEN_SOURCE=500 (or 600) and/or -D__EXTENSIONS__ to
> your
> > compiler flags is a good start.
>
> It was a little bit more complicated to get this one as far as
> the build with just "CFLAGS=-m64". Adding "-D__EXTENSIONS__" broke
> the build process. Adding "-D_XOPEN_SOURCE=500" didn't solve the
> problem, because Solaris expects "-D_XOPEN_SOURCE=600". Using this
> flag wasn't helpful, because you redefined it to "500" in file
> mpich-master-v3.2a1/src/mpi/romio/adio/common/ad_read.c, so that I
> had to add "-D_STDC_C99" to keep "600". Another problem came from
> file /usr/include/sys/statvfs.h ("FSTYPSZ" wasn't defined). Looking
> into the file showed the following.
>
> ...
> #define _FSTYPSZ        16
> #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
> #ifndef FSTYPSZ
> #define FSTYPSZ _FSTYPSZ
> #endif
> ...
>
> Finally I could build MPICH with "CFLAGS=-m64 -std=c99 -D_STDC_C99
> -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -DFSTYPSZ=_FSTYPSZ"
> to the same point as with "CFLAGS=-m64". In both cases libmpicxx.so
> wasn't available. I have attached the files for this build process
> in the archive mpich-3.2-SunOS.sparc.64_gcc.tar.gz. Please let me
> know if you need anything else.
>
> Kind regards
>
> Siegmar
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140905/60a343d1/attachment.html>


More information about the discuss mailing list