<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 28, 2017 at 3:12 PM, Denis Davydov <span dir="ltr"><<a href="mailto:davydden@gmail.com" target="_blank">davydden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear all,<br>
<br>
Yesterday I updated to the latest XCode and now have problems configuring PETSc (see below).<br>
I must say that a number of other packages which need MPI fortran wrappers compiled fine.<br></blockquote><div><br></div><div>This looks like bad parsing of the junk spit out by the C compiler:</div><div><br></div><div> <span style="font-size:12.8px">-Wl,-rpath,/Applications/</span><span style="font-size:12.8px">Xco<wbr>de.app/Contents/Developer/</span><span style="font-size:12.8px">Tool<wbr>chains/XcodeDefault.</span><span style="font-size:12.8px">xctoolchai<wbr>n/usr/lib -L/Applications/Xcode.app/</span><span style="font-size:12.8px">Cont<wbr>ents/Developer/Toolchains/</span><span style="font-size:12.8px">Xcod<wbr>eDefault.xctoolchain/usr/</span><span style="font-size:12.8px">lib -lLTO </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">you can just turn that off</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> </span><span style="font-size:12.8px">--with-clib-</span><span class="gmail-il" style="font-size:12.8px;background-color:rgb(255,255,255)">autodetect</span><span style="font-size:12.8px">=0 --with-fortranlib-</span><span class="gmail-il" style="font-size:12.8px;background-color:rgb(255,255,255)">autodetect</span><span style="font-size:12.8px">=0 --with-cxxlib-</span><span class="gmail-il" style="font-size:12.8px;background-color:rgb(255,255,255)">autodetect</span><span style="font-size:12.8px">=0</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">but then you are responsible for putting any compiler libraries in LIBS that we needed to make Fortran and C work together.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> Thanks,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> Matt</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Regards,<br>
Denis.<br>
<br>
==========================<br>
<br>
<br>
Executing: /Users/davydden/spack/opt/spac<wbr>k/darwin-sierra-x86_64/clang-<wbr>8.1.0-apple/openmpi-2.1.0-rh7b<wbr>rts6lzesj46zopjj5rzmkcyiktx7/<wbr>bin/mpif90 -c -o /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest.o -I/var/folders/5k/sqpp24tx3yld<wbr>s4fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest.F<br>
Successful compile:<br>
Source:<br>
program main<br>
<br>
end<br>
Executing: /Users/davydden/spack/opt/spac<wbr>k/darwin-sierra-x86_64/clang-<wbr>8.1.0-apple/openmpi-2.1.0-rh7b<wbr>rts6lzesj46zopjj5rzmkcyiktx7/<wbr>bin/mpif90 -c -o /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest.o -I/var/folders/5k/sqpp24tx3yld<wbr>s4fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest.F<br>
Successful compile:<br>
Source:<br>
program main<br>
<br>
end<br>
Executing: /Users/davydden/spack/opt/spac<wbr>k/darwin-sierra-x86_64/clang-<wbr>8.1.0-apple/openmpi-2.1.0-rh7b<wbr>rts6lzesj46zopjj5rzmkcyiktx7/<wbr>bin/mpif90 -o /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/config.setCompilers/<wbr>conftest.o -lto_library -Wl,-rpath,/Applications/Xcode<wbr>.app/Contents/Developer/Toolch<wbr>ains/XcodeDefault.xctoolchain/<wbr>usr/lib -L/Applications/Xcode.app/Cont<wbr>ents/Developer/Toolchains/Xcod<wbr>eDefault.xctoolchain/usr/lib -lLTO -Wl,-rpath,/Users/davydden/spa<wbr>ck/opt/spack/darwin-sierra-x86<wbr>_64/clang-8.1.0-apple/hwloc-1.<wbr>11.6-pkbyijayr66g3wq3hojj3l44q<wbr>c7kjno3/lib -L/Users/davydden/spack/opt/sp<wbr>ack/darwin-sierra-x86_64/clang<wbr>-8.1.0-apple/hwloc-1.11.6-pkby<wbr>ijayr66g3wq3hojj3l44qc7kjno3/<wbr>lib -Wl,-rpath,/Users/davydden/spa<wbr>ck/opt/spack/darwin-sierra-x86<wbr>_64/clang-8.1.0-apple/openmpi-<wbr>2.1.0-rh7brts6lzesj46zopjj5rzm<wbr>kcyiktx7/lib -L/Users/davydden/spack/opt/sp<wbr>ack/darwin-sierra-x86_64/clang<wbr>-8.1.0-apple/openmpi-2.1.0-rh7<wbr>brts6lzesj46zopjj5rzmkcyiktx7/<wbr>lib -ldl -lmpi -lSystem -Wl,-rpath,/Applications/Xcode<wbr>.app/Contents/Developer/Toolch<wbr>ains/XcodeDefault.xctoolchain/<wbr>usr/bin/../lib/clang/8.1.0/<wbr>lib/darwin -L/Applications/Xcode.app/Cont<wbr>ents/Developer/Toolchains/Xcod<wbr>eDefault.xctoolchain/usr/bin/.<wbr>./lib/clang/8.1.0/lib/darwin -lclang_rt.osx -ldl<br>
Possible ERROR while running linker: exit code 256<br>
stderr:<br>
ld: can't map file, errno=22 file '/Applications/Xcode.app/Conte<wbr>nts/Developer/Toolchains/Xcode<wbr>Default.xctoolchain/usr/lib' for architecture x86_64<br>
collect2: error: ld returned 1 exit status<br>
Popping language FC<br>
compilers: Error message from compiling {Cannot compile/link FC with /Users/davydden/spack/opt/spac<wbr>k/darwin-sierra-x86_64/clang-<wbr>8.1.0-apple/openmpi-2.1.0-rh7b<wbr>rts6lzesj46zopjj5rzmkcyiktx7/<wbr>bin/mpif90.}<br>
**** Configure header /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/confdefs.h ****<br>
#if !defined(INCLUDED_UNKNOWN)<br>
#define INCLUDED_UNKNOWN<br>
<br>
#ifndef PETSC_HAVE_DLFCN_H<br>
#define PETSC_HAVE_DLFCN_H 1<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_RTLD_NOW<br>
#define PETSC_HAVE_RTLD_NOW 1<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_RTLD_LOCAL<br>
#define PETSC_HAVE_RTLD_LOCAL 1<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_RTLD_LAZY<br>
#define PETSC_HAVE_RTLD_LAZY 1<br>
#endif<br>
<br>
#ifndef PETSC_C_STATIC_INLINE<br>
#define PETSC_C_STATIC_INLINE static inline<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_RTLD_GLOBAL<br>
#define PETSC_HAVE_RTLD_GLOBAL 1<br>
#endif<br>
<br>
#ifndef PETSC_C_RESTRICT<br>
#define PETSC_C_RESTRICT restrict<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_LIBDL<br>
#define PETSC_HAVE_LIBDL 1<br>
#endif<br>
<br>
#ifndef PETSC_ARCH<br>
#define PETSC_ARCH "arch-darwin-c-opt"<br>
#endif<br>
<br>
#ifndef PETSC_CLANGUAGE_C<br>
#define PETSC_CLANGUAGE_C 1<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_DYNAMIC_LIBRARIES<br>
#define PETSC_HAVE_DYNAMIC_LIBRARIES 1<br>
#endif<br>
<br>
#ifndef PETSC_HAVE_SHARED_LIBRARIES<br>
#define PETSC_HAVE_SHARED_LIBRARIES 1<br>
#endif<br>
<br>
#ifndef PETSC_USE_SHARED_LIBRARIES<br>
#define PETSC_USE_SHARED_LIBRARIES 1<br>
#endif<br>
<br>
#ifndef PETSC_USE_ERRORCHECKING<br>
#define PETSC_USE_ERRORCHECKING 1<br>
#endif<br>
<br>
#endif<br>
**** C specific Configure header /var/folders/5k/sqpp24tx3ylds4<wbr>fgm13pfht00000gn/T/petsc-<wbr>eLXjKy/conffix.h ****<br>
#if !defined(INCLUDED_UNKNOWN)<br>
#define INCLUDED_UNKNOWN<br>
<br>
#if defined(__cplusplus)<br>
extern "C" {<br>
}<br>
#else<br>
#endif<br>
#endif<br>
******************************<wbr>******************************<wbr>*******************<br>
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>
------------------------------<wbr>------------------------------<wbr>-------------------<br>
C libraries cannot directly be used from Fortran<br>
******************************<wbr>******************************<wbr>*******************<br>
File "./config/configure.py", line 405, in petsc_configure<br>
framework.configure(out = sys.stdout)<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/framework.py", line 1090, in configure<br>
self.processChildren()<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/framework.py", line 1079, in processChildren<br>
self.serialEvaluation(self.chi<wbr>ldGraph)<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/framework.py", line 1060, in serialEvaluation<br>
child.configure()<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/compilers.py", line 1438, in configure<br>
self.executeTest(self.checkCLi<wbr>braries)<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/base.py", line 126, in executeTest<br>
ret = test(*args,**kargs)<br>
File "/Users/davydden/spack/var/spa<wbr>ck/stage/petsc-3.7.5-tpsz2lfsp<wbr>kqa7tq2keqowsk4xrebsfwi/petsc-<wbr>3.7.5/config/BuildSystem/<wbr>config/compilers.py", line 313, in checkCLibraries<br>
raise RuntimeError('C libraries cannot directly be used from Fortran')<br>
==============================<wbr>==============================<wbr>====================<br>
Finishing Configure Run at Tue Mar 28 21:56:48 2017<br>
==============================<wbr>==============================<wbr>====================</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-6644161591649763520gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>