我正在尝试在最新版本的Charm++ 10.14上安装macOS。在这个http://charm.cs.illinois.edu/manuals/html/charm++/A.html之后,当我尝试执行./build charm++ netlrts-darwin-x86_64 --with-production -j8时,会得到以下错误:
configure: error: in `/Users/youssefmoawad/Downloads/charm-6.9.0/netlrts-darwin-x86_64/tmp':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [headers] Error 2
-------------------------------------------------
Charm++ NOT BUILT. Either cd into netlrts-darwin-x86_64/tmp and try
to resolve the problems yourself, visit
http://charm.cs.illinois.edu/
for more information. Otherwise, email the developers at charm@cs.illinois.edu当我尝试使用替代方法安装时,通过Spack;首先,我必须安装Spack:https://spack.io。但是,当我执行spack install hdf5时,这就失败了,得到:
Error: InstallError: OpenMPI requires both C and Fortran compilers!
/Users/youssefmoawad/Downloads/spack/var/spack/repos/builtin/packages/openmpi/package.py:337, in die_without_fortran:
334 # avoid delayed build errors in dependents.
335 if (self.compiler.f77 is None) or (self.compiler.fc is None):
336 raise InstallError(
>> 337 'OpenMPI requires both C and Fortran compilers!'
338 )
See build log for details:
/Users/youssefmoawad/Downloads/spack/var/spack/stage/openmpi-3.1.3-6owrpmticip3filnaljkrsyl3zlonwea/openmpi-3.1.3/spack-build.out当我忽略了这一点,并试图无论如何安装Charm++,使用spack install charmpp,我得到:
Error: TypeError: expected str, bytes or os.PathLike object, not NoneType
/Users/youssefmoawad/Downloads/spack/var/spack/repos/builtin/packages/charmpp/package.py:173, in install:
170 # here.
171 options = [
172 os.path.basename(self.compiler.cc),
>> 173 os.path.basename(self.compiler.fc),
174 "-j%d" % make_jobs,
175 "--destination=%s" % prefix,
176 ]
See build log for details:
/Users/youssefmoawad/Downloads/spack/var/spack/stage/charmpp-6.8.2-g3j72njzqjejhutygtdksfdy6sp524us/charm-v6.8.2/spack-build.out我不知道出了什么问题,但我认为这与Fortran编译器有关,在这种情况下,我可以获得安装哪个编译器的帮助吗?
更新我尝试过安装gfortran编译器并成功安装,但仍然遇到上述错误。
发布于 2018-11-28 23:01:09
您使用的是正确的构建线。问题可能是与C++编译器不兼容,例如Charm++将不正确的标志传递给编译器。常规构建不需要gfortran。如果您能够显示config.log中显示的任何错误,这将是有帮助的。如果结果是错误,您可能需要在邮件列表或论坛(https://charm.discourse.group)中报告。
在macOS上安装macOS的另一种方法是使用charm4py:pip3 install charm4py。它附带了作为共享库编译的Charm++,但是通过一个Python接口使用,所以这可能不是您想要的。
https://stackoverflow.com/questions/53489752
复制相似问题