Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@splhack
Copy link

@splhack splhack commented Nov 17, 2015

configure script always fails if DEVELOPER_DIR environment variable is set even
though it is the right value (xcode-select -print-path).

$ DEVELOPER_DIR=`xcode-select -print-path` ./configure
...
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

The problem is configure script overrides DEVELOPER_DIR environment variable
with empty string not make variable if --with-developer-dir option is not
present and DEVELOPER_DIR environment variable already exists.

configure script always fails if DEVELOPER_DIR environment variable is set even
though it is the right value (`xcode-select -print-path`).

    $ DEVELOPER_DIR=`xcode-select -print-path` ./configure
    ...
    no terminal library found
    checking for tgetent()... configure: error: NOT FOUND!
          You need to install a terminal library; for example ncurses.
          Or specify the name of the library with --with-tlib.

The problem is configure script overrides DEVELOPER_DIR environment variable
with empty string not make variable if `--with-developer-dir` option is not
present and DEVELOPER_DIR environment variable already exists.
@nuko8
Copy link

nuko8 commented Nov 17, 2015

DEVELOPER_DIR is an internal variable of configure. I'm afraid it is not for a variable to be overwritten via command line. (If it were so, configure would check the value $DEVELOPER_DIR before assigning a certain value to the variable.)

Since the name of the variable happens to be the same as that of an environmental variable for xcrun, both configure and xcrun are made confused by the command line

$ DEVELOPER_DIR=`xcode-select -print-path` ./configure

Here, xcrun is relevant because /usr/bin/gcc is not a real gcc but a stub to invoke a true gcc with the help of xcrun whose behavior depends on DEVELOPER_DIR when it is defined.

That's why a number of messages like

xcrun: error: missing DEVELOPER_DIR path: 

are left in config.log just after gcc is invoked.

Obviously, this implies that the usage of DEVELOPER_DIR in question makes /usr/bin/gcc completely useless. (If necessary, try

$ DEVELOPER_DIR="" gcc --version

to make sure.)

In fact, I observed that configure had been giving "no" to almost all of the checks long before the failure of the terminal library detection finally killed configure.

Since it is clear that there's a risk for DEVELOPER_DIR to interfere with xcrun's environmental variable, it might make sense to rename it.

@splhack
Copy link
Author

splhack commented Nov 17, 2015

In the first place, we still must support building Vim on OS X 10.4? These configure script stuff is actually interference. I don't think --with-developer-dir=PATH option is needed (DEVELOPER_DIR environment variable works).

@splhack
Copy link
Author

splhack commented Nov 17, 2015

Ok, that's fine. Still my patch is correct way to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants