./configure can't find C compiler after OS X Lion installation

前端 未结 6 2179
终归单人心
终归单人心 2021-02-05 19:12

While cc and gcc are perfectly in their right path (/Developer/usr/bin in OS X Lion), running ./configure tries to compile it

6条回答
  •  逝去的感伤
    2021-02-05 19:18

    njamesp is correct; the proper solution to your problem is to get your compiler tool chain correctly installed. But to the question Where do I setup configure's paths?, there are a couple of solutions.

    1. Pass it to configure as a command line option: /path/to/configure CC=/p/a/t/h

    2. (Deprecated-bourne shell) Pass it in the environment: CC=/p/a/t/h /p/t/configure

    3. (Deprecated-csh) env CC=/p/a/t/h /p/t/configure

    4. setup a config.site. Put CONFIG_SITE in your environment as the path of a file, (eg export CONFIG_SITE=$HOME/config.site), put CC=/p/a/t/h in that file

    5. put CC=/p/a/t/h in /usr/local/share/config.site

    All of this assumes that your configure script was generated by autoconf. Options 2 and 3 are discouraged, but if your configure script is ancient option 1 may not work. Option 5 is flexible, and you can use different config.sites depending on prefix. $prefix/share/config.site can be used to set options for projects installed in $prefix.

提交回复
热议问题