尝试运行make命令时出错

时间:2019-10-26 07:54:10

标签: makefile macos-mojave dyld g77

我正在尝试安装程序,当我运行make或make -f Makefile时(按照安装说明进行操作),我得到以下输出:

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
    <!-- Customize your theme here. -->
    ...
    <item name="popupTheme">@style/CustomOverFlow</item>
    ...
</style>

<style name="CustomOverFlow" parent="android:Widget.PopupMenu">
    <item name="android:bottomLeftRadius">25dp</item>
    <item name="android:bottomRightRadius">25dp</item>
    <item name="android:topLeftRadius">25dp</item>
    <item name="android:topRightRadius">25dp</item>
    <item name="android:selectableItemBackground">@drawable/rounded_ripple</item>
</style>

我正在使用macOS Mojave 10.14.6。在解决了类似问题的其他一些建议解决方案之后,我已经在Xcode中安装了命令行工具,但是并没有解决问题。有什么建议吗?

预先感谢

编辑: 我摆脱了g77,并通过MacPorts安装了兼容版本的gcc(gcc8)。运行make命令后,我得到以下信息:

g77 -O5 -Wall  -c  prep_output.f  -o prep_output.o 
dyld: Symbol not found: ___keymgr_global
  Referenced from: /usr/local/bin/g77
  Expected in: /usr/lib/libSystem.B.dylib

make: *** [prep_output.o] Abort trap: 6

所以我想程序仍然需要g77设置?这是程序btw([http://www.cfht.hawaii.edu/~arnouts/LEPHARE/install.html])。有没有办法依靠gfortran编译器来构建程序?

预先感谢

P.S。我注意到在安装g77时出现以下错误:

g77 -O5 -Wall  -c  prep_output.f  -o prep_output.o 
make: g77: No such file or directory
make: *** [prep_output.o] Error 1

但是它仍然会安装g77。

1 个答案:

答案 0 :(得分:0)

错误消息表明您安装的g77已损坏。这与make或您要构建的特定项目无关,除非该项目首先尝试使用g77。实际上,这有点令人惊讶,因为g77已经过时了多年(gfortran是当前的GNU Fortran编译器),但是我不确定XCode在这方面究竟会带来什么。 >

另一方面,由于二进制文件的完整路径为/usr/local/bin/g77,因此我进一步倾向于认为您根本没有使用XCode。可能您已经将基于其他系统的g77转储到/usr/local/bin中,并且它与Mojave系统不兼容。

您最好的选择可能是

  1. 摆脱损坏的g77安装。
  2. 安装Fink或MacPorts或类似的项目。
  3. 为gfortran安装Fink / MacPorts /任何软件包(可能是gcc-gfortran或其中的类似软件包),以获取可用的Fortran编译器。
  4. 依靠该编译器来构建您的项目。