【问题标题】:Mozart/Oz configure issue on mac os xMac os x 上的 Mozart/Oz 配置问题
【发布时间】:2019-05-16 10:18:16
【问题描述】:

我正在尝试使用以下链接在Mac os x Mojave 上构建Mozart/Ozhttps://github.com/mozart/mozart 并收到以下配置错误。未找到 GNU MP 库。

我使用homebrew 安装了gmp,还尝试了--with-gmp=/usr/local/opt/gmp/lib 和--with-gmp=/usr/local/Cellar/gmp/6.1.2_2 /但得到了同样的错误。谁能帮我解决这个问题?

checking for --with-gmp... yes
checking for gmp.h... -I/Users/rr/Software/mozart/gmp/packages/include
checking for __gmpz_init in -lgmp (default)... no
checking for __gmpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp... no
checking for mpz_init in -lgmp (default)... no
checking for mpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp... no
checking for mpz_init in -lgmp2 (default)... no
checking for mpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp2... no

configure: warning: required GNU MP lib not found
configure: error: 
The GNU Multiple Precision Arithmetic Library (gmp)
version 2 or higher is required
to build the system.  It can be retrieved from:

    ftp://ftp.gnu.org/pub/gnu/gmp/

The latest version at this time is 4.1.2 and is available
packaged as the following archive:

    ftp://ftp.gnu.org/pub/gnu/gmp/gmp-4.1.2.tar.gz

You may find a mirror archive closer to you by consulting:

    http://www.gnu.org/order/ftp.html

configure: error: /Users/rr/Software/mozart/mozart/platform/emulator/configure failed for emulator
configure: error: /Users/rr/Software/mozart/mozart/platform/configure failed for platform

【问题讨论】:

    标签: oz mozart


    【解决方案1】:

    1:安装 Mozart2

    1.1:链接:https://mozart.github.io/

    1.2Applications/Mozart2 应该是这样的: https://i.imgur.com/BQbXrey.png

    另外,由于 StackOverflow 声誉低,我无法嵌入图片,对此我深表歉意。

    2:为oscozemulator 添加别名

    2.1:打开.bash_profile

    open ~/.bash_profile
    

    2.2:将以下内容添加到文件并保存

    alias ozc='/Applications/Mozart2.app/Contents/Resources/bin/ozc'
    alias ozemulator='/Applications/Mozart2.app/Contents/Resources/bin/ozemulator'
    alias ozem='/Applications/Mozart2.app/Contents/Resources/bin/ozemulator'
    alias ozengine='/Applications/Mozart2.app/Contents/Resources/bin/ozengine'
    alias ozwish='/Applications/Mozart2.app/Contents/Resources/bin/ozwish'
    

    3:基本用法

    3.1:在.oz-文件中编写代码 示例:circle.oz

    functor
    import
        System 
        Application(exit:Exit)
    define
        proc {Circle R}
            local A C D Pi in
                Pi = 3.14
                A = Pi*R*R
                D = 2.0*R
                C = Pi*D 
                {System.showInfo 
                    'A: '    # A # '\n' #
                    'D: ' # D # '\n' #
                    'C: '  # C
                }
            end
        end
        {Circle 20.0}
        {Exit 0}
    end
    

    3.2:编译代码在ozc

    ozc -c circle.oz
    

    3.3:在ozemulator运行编译代码

    ozem circle.ozf # .ozf is a compiled .oz file
    

    【讨论】:

      猜你喜欢
      • 2016-12-15
      • 2011-11-26
      • 2012-08-15
      • 2016-09-26
      • 1970-01-01
      • 1970-01-01
      • 2011-08-24
      • 1970-01-01
      • 2010-09-23
      相关资源
      最近更新 更多