The nightlybuilds on OSX are primarily with gcc. We don't have a build
with clang.

I have Xcode 4.6 on OSX 10.8. I just attempted a build with clang and see 
errors.

Perhaps Barry/Srhi who use OSX know more about Xcode5/clang issues.

Attaching my make.log

Using configure Options: CC=clang CXX=clang++ FC=gfortran --download-mpich=1

[balay@petsc-mini petsc.test (next)]$ sw_vers 
ProductName:      Mac OS X
ProductVersion:   10.8.4
BuildVersion:     12E55
[balay@petsc-mini petsc.test (next)]$ xcodebuild -version
Xcode 4.6.2
Build version 4H1003
[balay@petsc-mini petsc.test (next)]$ clang -v
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
[balay@petsc-mini petsc.test (next)]$ 

Satish

On Wed, 9 Oct 2013, Lisandro Dalcin wrote:

> Satish, I have problems to build PETSc with Apple's clang on OS X
> 10.8.5. Configure goes fine, then while building the compiler crashes
> bad at parsing the MPI_Xxx macros that log MPI calls (at petsclog.h).
> clang on Linux works just fine, but this Apple version crashes.
> 
> Can you tell me what OS X and clang versions are you testing PETSc on?
> 
> Here is my info (OS X 10.8.5, had same issues with previous 10.8.x):
> 
> $ uname -a
> Darwin macarena 12.5.0 Darwin Kernel Version 12.5.0: Mon Jul 29
> 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64
> 
> $ cc --version
> Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
> Target: x86_64-apple-darwin12.5.0
> Thread model: posix
> 
> $ c++ --version
> Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
> Target: x86_64-apple-darwin12.5.0
> Thread model: posix
> 
> 
make[1]: Entering directory `/Users/balay/petsc.test'
make[1]: Leaving directory `/Users/balay/petsc.test'
make[1]: Entering directory `/Users/balay/petsc.test'
==========================================
 
See documentation/faq.html and documentation/bugreporting.html
for help with installation problems. Please send EVERYTHING
printed out below when reporting problems
 
To subscribe to the PETSc announcement list, send mail to 
[email protected] with the message: 
subscribe petsc-announce
 
To subscribe to the PETSc users mailing list, send mail to 
[email protected] with the message: 
subscribe petsc-users
 
==========================================
On Wed Oct 9 11:21:19 CDT 2013 on petsc-mini.mcs.anl.gov
Machine characteristics: Darwin petsc-mini.mcs.anl.gov 12.4.0 Darwin Kernel 
Version 12.4.0: Wed May 1 17:57:12 PDT 2013; 
root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
-----------------------------------------
Using PETSc directory: /Users/balay/petsc.test
Using PETSc arch: arch-darwin-c-debug
-----------------------------------------
PETSC_VERSION_RELEASE    0
PETSC_VERSION_MAJOR      3
PETSC_VERSION_MINOR      4
PETSC_VERSION_SUBMINOR   2
PETSC_VERSION_PATCH      0
PETSC_VERSION_DATE       "unknown"
PETSC_VERSION_GIT        "unknown"
PETSC_VERSION_DATE_GIT   "unknown"
PETSC_VERSION_(MAJOR,MINOR,SUBMINOR) \
PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR)          \
PETSC_VERSION_LE(MAJOR,MINOR,SUBMINOR) \
PETSC_VERSION_GT(MAJOR,MINOR,SUBMINOR) \
PETSC_VERSION_GE(MAJOR,MINOR,SUBMINOR) \
-----------------------------------------
Using configure Options: CC=clang CXX=clang++ FC=gfortran --download-mpich=1
Using configuration flags:
#define INCLUDED_PETSCCONF_H
#define IS_COLORING_MAX 65535
#define STDC_HEADERS 1
#define MPIU_COLORING_VALUE MPI_UNSIGNED_SHORT
#define PETSC_RTLD_DEFAULT 1
#define PETSC_UINTPTR_T uintptr_t
#define PETSC_HAVE_PTHREAD 1
#define PETSC_DEPRECATED(why) __attribute((deprecated))
#define PETSC_REPLACE_DIR_SEPARATOR '\\'
#define PETSC_HAVE_SO_REUSEADDR 1
#define PETSC_HAVE_MPI 1
#define PETSC_PREFETCH_HINT_T2 _MM_HINT_T2
#define PETSC_PREFETCH_HINT_T0 _MM_HINT_T0
#define PETSC_PREFETCH_HINT_T1 _MM_HINT_T1
#define PETSC_USE_SOCKET_VIEWER 1
#define PETSC_LIB_DIR "/Users/balay/petsc.test/arch-darwin-c-debug/lib"
#define PETSC_HAVE_FORTRAN 1
#define PETSC_HAVE_SOWING 1
#define PETSC_SLSUFFIX "dylib"
#define PETSC_FUNCTION_NAME_CXX __func__
#define PETSC_HAVE_ATOLL 1
#define PETSC_HAVE_DOUBLE_ALIGN_MALLOC 1
#define PETSC_UNUSED __attribute((unused))
#define PETSC_FUNCTION_NAME_C __func__
#define PETSC_HAVE_C2HTML 1
#define PETSC_USE_SINGLE_LIBRARY 1
#define PETSC_HAVE_BUILTIN_EXPECT 1
#define PETSC_DIR_SEPARATOR '/'
#define PETSC_PATH_SEPARATOR ':'
#define PETSC__BSD_SOURCE 1
#define PETSC_HAVE_XMMINTRIN_H 1
#define PETSC_PREFETCH_HINT_NTA _MM_HINT_NTA
#define PETSC_Prefetch(a,b,c) _mm_prefetch((const char*)(a),(c))
#define PETSC_HAVE_BLASLAPACK 1
#define PETSC_HAVE_STRING_H 1
#define PETSC_HAVE_SYS_TYPES_H 1
#define PETSC_HAVE_DLFCN_H 1
#define PETSC_HAVE_MACHINE_ENDIAN_H 1
#define PETSC_HAVE_SCHED_H 1
#define PETSC_HAVE_STDINT_H 1
#define PETSC_HAVE_TIME_H 1
#define PETSC_HAVE_MATH_H 1
#define PETSC_HAVE_STDLIB_H 1
#define PETSC_HAVE_SYS_PARAM_H 1
#define PETSC_HAVE_PTHREAD_H 1
#define PETSC_HAVE_UNISTD_H 1
#define PETSC_HAVE_CXXABI_H 1
#define PETSC_HAVE_SYS_WAIT_H 1
#define PETSC_HAVE_SETJMP_H 1
#define PETSC_HAVE_LIMITS_H 1
#define PETSC_HAVE_SEARCH_H 1
#define PETSC_HAVE_NETINET_IN_H 1
#define PETSC_HAVE_SYS_SOCKET_H 1
#define PETSC_HAVE_MEMORY_H 1
#define PETSC_HAVE_SYS_RESOURCE_H 1
#define PETSC_HAVE_SYS_TIMES_H 1
#define PETSC_HAVE_NETDB_H 1
#define PETSC_HAVE_SYS_UTSNAME_H 1
#define PETSC_HAVE_PWD_H 1
#define PETSC_HAVE_FCNTL_H 1
#define PETSC_HAVE_STRINGS_H 1
#define PETSC_HAVE_FLOAT_H 1
#define PETSC_TIME_WITH_SYS_TIME 1
#define PETSC_HAVE_SYS_TIME_H 1
#define PETSC_USING_F90 1
#define PETSC_USING_F2003 1
#define PETSC_HAVE_RTLD_NOW 1
#define PETSC_HAVE_RTLD_LOCAL 1
#define PETSC_HAVE_RTLD_LAZY 1
#define PETSC_C_STATIC_INLINE static inline
#define PETSC_HAVE_FORTRAN_UNDERSCORE 1
#define PETSC_HAVE_CXX_NAMESPACE 1
#define PETSC_HAVE_RTLD_GLOBAL 1
#define PETSC_C_RESTRICT restrict
#define PETSC_CXX_RESTRICT  __restrict__
#define PETSC_CXX_STATIC_INLINE static inline
#define PETSC_HAVE_LIBBLAS 1
#define PETSC_HAVE_LIBZ 1
#define PETSC_HAVE_LIBDL 1
#define PETSC_HAVE_LIBGFORTRAN 1
#define PETSC_HAVE_LIBGCC_EXT_10_5 1
#define PETSC_HAVE_LIBPTHREAD 1
#define PETSC_HAVE_LIBLAPACK 1
#define PETSC_HAVE_FENV_H 1
#define PETSC_HAVE_LIBMPICHF90 1
#define PETSC_HAVE_ERF 1
#define PETSC_HAVE_LIBM 1
#define PETSC_HAVE_LIBQUADMATH 1
#define PETSC_HAVE_TGAMMA 1
#define PETSC_ARCH "arch-darwin-c-debug"
#define PETSC_VERSION_DATE_GIT "2013-10-09 17:36:12 +0200"
#define PETSC_VERSION_GIT "11bf492b43c77d532f1d3fff669e66f73549a212"
#define PETSC_DIR "/Users/balay/petsc.test"
#define HAVE_GZIP 1
#define PETSC_CLANGUAGE_C 1
#define PETSC_USE_ERRORCHECKING 1
#define PETSC_MISSING_DREAL 1
#define PETSC_SIZEOF_MPI_COMM 4
#define PETSC_BITS_PER_BYTE 8
#define PETSC_SIZEOF_MPI_FINT 4
#define PETSC_SIZEOF_VOID_P 8
#define PETSC_RETSIGTYPE void
#define PETSC_HAVE_CXX_COMPLEX 1
#define PETSC_SIZEOF_LONG 8
#define PETSC_USE_FORTRANKIND 1
#define PETSC_SIZEOF_SIZE_T 8
#define PETSC_HAVE_SIGINFO_T 1
#define PETSC_SIZEOF_CHAR 1
#define PETSC_SIZEOF_DOUBLE 8
#define PETSC_SIZEOF_FLOAT 4
#define PETSC_HAVE_C99_COMPLEX 1
#define PETSC_SIZEOF_INT 4
#define PETSC_SIZEOF_LONG_LONG 8
#define PETSC_SIZEOF_SHORT 2
#define PETSC_HAVE_STRCASECMP 1
#define PETSC_HAVE_POPEN 1
#define PETSC_HAVE_SIGSET 1
#define PETSC_HAVE_GETWD 1
#define PETSC_HAVE_VSNPRINTF 1
#define PETSC_HAVE_TIMES 1
#define PETSC_HAVE_DLSYM 1
#define PETSC_HAVE_SNPRINTF 1
#define PETSC_HAVE_GETHOSTBYNAME 1
#define PETSC_HAVE_GETCWD 1
#define PETSC_HAVE_ACCESS 1
#define PETSC_HAVE_DLERROR 1
#define PETSC_HAVE_FORK 1
#define PETSC_HAVE_RAND 1
#define PETSC_HAVE_GETTIMEOFDAY 1
#define PETSC_HAVE_DLCLOSE 1
#define PETSC_HAVE_UNAME 1
#define PETSC_HAVE_GETHOSTNAME 1
#define PETSC_HAVE_MKSTEMP 1
#define PETSC_HAVE_SIGACTION 1
#define PETSC_HAVE_DRAND48 1
#define PETSC_HAVE_VA_COPY 1
#define PETSC_HAVE_CLOCK 1
#define PETSC_HAVE_SYSCTLBYNAME 1
#define PETSC_HAVE_SIGNAL 1
#define PETSC_HAVE_USLEEP 1
#define PETSC_HAVE_GETRUSAGE 1
#define PETSC_HAVE_VFPRINTF 1
#define PETSC_HAVE_NANOSLEEP 1
#define PETSC_HAVE_GETDOMAINNAME 1
#define PETSC_HAVE_TIME 1
#define PETSC_HAVE_LSEEK 1
#define PETSC_HAVE_SOCKET 1
#define PETSC_HAVE_READLINK 1
#define PETSC_HAVE_REALPATH 1
#define PETSC_HAVE_DLOPEN 1
#define PETSC_HAVE_MEMMOVE 1
#define PETSC_HAVE__GFORTRAN_IARGC 1
#define PETSC_SIGNAL_CAST  
#define PETSC_HAVE_SLEEP 1
#define PETSC_HAVE_VPRINTF 1
#define PETSC_HAVE_BZERO 1
#define PETSC_HAVE_GETPAGESIZE 1
#define PETSC_WRITE_MEMORY_BARRIER() asm volatile("sfence":::"memory")
#define PETSC_MEMORY_BARRIER() asm volatile("mfence":::"memory")
#define PETSC_READ_MEMORY_BARRIER() asm volatile("lfence":::"memory")
#define PETSC_CPU_RELAX() asm volatile("rep; nop" ::: "memory")
#define PETSC_HAVE_MPI_F90MODULE 1
#define PETSC_HAVE_MPI_IALLREDUCE 1
#define PETSC_HAVE_MPI_COMM_C2F 1
#define PETSC_HAVE_MPI_TYPE_GET_EXTENT 1
#define PETSC_HAVE_MPI_WIN_CREATE 1
#define PETSC_HAVE_MPI_TYPE_DUP 1
#define PETSC_HAVE_MPI_INIT_THREAD 1
#define PETSC_HAVE_MPI_LONG_DOUBLE 1
#define PETSC_HAVE_MPI_COMM_F2C 1
#define PETSC_HAVE_MPI_TYPE_GET_ENVELOPE 1
#define PETSC_HAVE_MPI_ALLTOALLW 1
#define PETSC_HAVE_MPICH_CH3_SOCK 1
#define PETSC_HAVE_MPIIO 1
#define PETSC_HAVE_MPI_COMM_SPAWN 1
#define PETSC_HAVE_MPICH_CH3_SOCK_FIXED_NBC_PROGRESS 1
#define PETSC_HAVE_MPI_FINT 1
#define PETSC_HAVE_MPI_IBARRIER 1
#define PETSC_HAVE_MPI_FINALIZED 1
#define PETSC_HAVE_MPI_REPLACE 1
#define PETSC_HAVE_MPI_EXSCAN 1
#define PETSC_HAVE_MPI_C_DOUBLE_COMPLEX 1
#define PETSC_HAVE_MPI_COMBINER_DUP 1
#define PETSC_BLASLAPACK_UNDERSCORE 1
#define PETSC_LEVEL1_DCACHE_LINESIZE 32
#define PETSC_LEVEL1_DCACHE_SIZE 32768
#define PETSC_LEVEL1_DCACHE_ASSOC 2
#define PETSC_USE_GDB_DEBUGGER 1
#define PETSC_HAVE_FORTRAN_GET_COMMAND_ARGUMENT 1
#define PETSC_HAVE_GFORTRAN_IARGC 1
#define PETSC_USE_BYTES_FOR_SIZE 1
#define PETSC_USE_INFO 1
#define PETSC_Alignx(a,b)   
#define PETSC_USE_BACKWARD_LOOP 1
#define PETSC_USE_DEBUG 1
#define PETSC_USE_LOG 1
#define PETSC_IS_COLOR_VALUE_TYPE short
#define PETSC_USE_CTABLE 1
#define PETSC_USE_SCALAR_REAL 1
#define PETSC_HAVE_ISINF 1
#define PETSC_HAVE_ISNAN 1
#define PETSC_USE_REAL_DOUBLE 1
#define PETSC_MEMALIGN 16
#define PETSC_HAVE_DYNAMIC_LIBRARIES 1
#define PETSC_HAVE_SHARED_LIBRARIES 1
#define PETSC_USE_SHARED_LIBRARIES 1
#define PETSC_HAVE_SYS_SYSCTL_H 1
-----------------------------------------
Using C/C++ compile: /Users/balay/petsc.test/arch-darwin-c-debug/bin/mpicc -c 
-fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 
-fno-inline -O0   -I/Users/balay/petsc.test/include 
-I/Users/balay/petsc.test/arch-darwin-c-debug/include     
mpicc -show: clang -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing 
-Wno-unknown-pragmas -g3 -fno-inline -O0 -Wl,-flat_namespace 
-I/Users/balay/petsc.test/arch-darwin-c-debug/include 
-L/Users/balay/petsc.test/arch-darwin-c-debug/lib -lpmpich -lmpich -lopa -lmpl 
-lpthread
Using Fortran compile: /Users/balay/petsc.test/arch-darwin-c-debug/bin/mpif90 
-c -fPIC  -Wall -Wno-unused-variable -Wno-unused-dummy-argument -g   
-I/Users/balay/petsc.test/include 
-I/Users/balay/petsc.test/arch-darwin-c-debug/include     
mpif90 -show: gfortran -fPIC -Wall -Wno-unused-variable 
-Wno-unused-dummy-argument -g -Wl,-flat_namespace 
-I/Users/balay/petsc.test/arch-darwin-c-debug/include 
-I/Users/balay/petsc.test/arch-darwin-c-debug/include 
-L/Users/balay/petsc.test/arch-darwin-c-debug/lib -lmpichf90 -lpmpich -lmpich 
-lopa -lmpl -lpthread
-----------------------------------------
Using C/C++ linker: /Users/balay/petsc.test/arch-darwin-c-debug/bin/mpicc
Using C/C++ flags: -Wl,-multiply_defined,suppress -Wl,-multiply_defined 
-Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first 
-Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
-Wl,-commons,use_dylibs -Wl,-search_paths_first  -fPIC -Wall -Wwrite-strings 
-Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0
Using Fortran linker: /Users/balay/petsc.test/arch-darwin-c-debug/bin/mpif90
Using Fortran flags: -Wl,-multiply_defined,suppress -Wl,-multiply_defined 
-Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first 
-Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress 
-Wl,-commons,use_dylibs -Wl,-search_paths_first  -fPIC  -Wall 
-Wno-unused-variable -Wno-unused-dummy-argument -g
-----------------------------------------
Using libraries: -L/Users/balay/petsc.test/arch-darwin-c-debug/lib 
-L/Users/balay/petsc.test/arch-darwin-c-debug/lib  -lpetsc -llapack -lblas 
-lpthread -L/usr/lib/clang/4.2/lib/darwin -lmpichf90 -lgfortran 
-L/usr/local/lib/gcc/x86_64-apple-darwin12.3.0/4.8.1 -L/usr/local/lib 
-lgfortran -lgcc_ext.10.5 -lquadmath -lm -lm -lclang_rt.osx -lmpichcxx -lstdc++ 
-L/usr/bin/../lib/clang/4.2/lib/darwin -lclang_rt.osx -ldl -lpmpich -lmpich 
-lopa -lmpl -lpthread -lSystem -lclang_rt.osx -ldl 
------------------------------------------
Using mpiexec: /Users/balay/petsc.test/arch-darwin-c-debug/bin/mpiexec
==========================================
Building PETSc using GNU Make with 2 build threads
==========================================
make[2]: Entering directory `/Users/balay/petsc.test'
/usr/bin/python conf/gmakegen.py --petsc-arch=arch-darwin-c-debug
make[2]: Leaving directory `/Users/balay/petsc.test'
make[2]: Entering directory `/Users/balay/petsc.test'
Use "/usr/bin/make V=1" to see the verbose compile lines.
          CC arch-darwin-c-debug/obj/src/sys/utils/arch.o
          CC arch-darwin-c-debug/obj/src/sys/utils/fhost.o
          CC arch-darwin-c-debug/obj/src/sys/utils/fuser.o
          CC arch-darwin-c-debug/obj/src/sys/utils/memc.o
          CC arch-darwin-c-debug/obj/src/sys/utils/mpiu.o
          CC arch-darwin-c-debug/obj/src/sys/utils/psleep.o
0  clang 0x0000000100c57bb2 main + 12932498
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple 
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free 
-disable-llvm-verifier -main-file-name mpiu.c -pic-level 2 -mdisable-fp-elim 
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 136 -g 
-coverage-file 
/Users/balay/petsc.test/arch-darwin-c-debug/obj/src/sys/utils/mpiu.o 
-resource-dir /usr/bin/../lib/clang/4.2 -dependency-file 
arch-darwin-c-debug/obj/src/sys/utils/mpiu.d -MT 
arch-darwin-c-debug/obj/src/sys/utils/mpiu.o -MP -I 
/Users/balay/petsc.test/include -I 
/Users/balay/petsc.test/arch-darwin-c-debug/include -I 
/Users/balay/petsc.test/arch-darwin-c-debug/include -fmodule-cache-path 
/var/folders/4m/zbggpg253zq_yr5lzn_53s_w0000gn/T/clang-module-cache -O0 -Wall 
-Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Wall -Wwrite-strings 
-Wno-strict-aliasing -Wno-unknown-pragmas -fconst-strings 
-fdebug-compilation-dir /Users/balay/petsc.test -ferror-limit 19 
-fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fno-inline 
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed 
-fobjc-default-synthesize-properties -fdiagnostics-show-option -o 
arch-darwin-c-debug/obj/src/sys/utils/mpiu.o -x c src/sys/utils/mpiu.c 
1.      src/sys/utils/mpiu.c:21:12 
<Spelling=/Users/balay/petsc.test/include/petsclog.h:348:128>: current parser 
token ')'
2.      src/sys/utils/mpiu.c:11:1: parsing function body 
'PetscSequentialPhaseBegin_Private'
3.      src/sys/utils/mpiu.c:11:1: in compound statement ('{}')
4.      src/sys/utils/mpiu.c:20:13: in compound statement ('{}')
          CC arch-darwin-c-debug/obj/src/sys/utils/sortd.o
          CC arch-darwin-c-debug/obj/src/sys/utils/sorti.o
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see 
invocation)
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to 
http://developer.apple.com/bugreporter/ and include the crash backtrace, 
preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: 
/var/folders/4m/zbggpg253zq_yr5lzn_53s_w0000gn/T/mpiu-DsHhNB.c
clang: note: diagnostic msg: 
/var/folders/4m/zbggpg253zq_yr5lzn_53s_w0000gn/T/mpiu-DsHhNB.sh
clang: note: diagnostic msg: 

********************
make[2]: *** [arch-darwin-c-debug/obj/src/sys/utils/mpiu.o] Error 254
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/Users/balay/petsc.test'
make[1]: *** [gnumake] Error 2
make[1]: Leaving directory `/Users/balay/petsc.test'
**************************ERROR************************************
  Error during compile, check arch-darwin-c-debug/conf/make.log
  Send it and arch-darwin-c-debug/conf/configure.log to [email protected]
********************************************************************

Reply via email to