[MacPorts] #57160: macports-base: Options `--enable-readline` and `--with-curlprefix` fail on Lion
MacPorts
noreply at macports.org
Tue Sep 25 17:46:33 UTC 2018
#57160: macports-base: Options `--enable-readline` and `--with-curlprefix` fail on
Lion
----------------------+--------------------
Reporter: lemzwerg | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Keywords: | Port:
----------------------+--------------------
[macports-base 60483e6e71054bcd741a55901c52117077ec7c43]\\
[macports-ports a8142c5ae7ce0d22f883033cfb35c00c2bb4c081]
Running
{{{
./configure --enable-readline --with-curlprefix=/opt/local
}}}
followed by
{{{
make
}}}
to update the {{{port}}} program yields a compilation error:
{{{
...
===> making all in src/pextlib1.0
...
clang -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 \
-Wextra -Wall -pedantic -I/opt/local/include -DHAVE_CONFIG_H \
-I/opt/macports/macports-base/src \
-I/opt/macports/macports-base/src -I. \
-I/opt/macports/macports-base/vendor/vendor-
destroot/opt/local/libexec/macports/include \
-I./../compat -fno-common readline.c -o readline.o
readline.c:133:23: error:
use of undeclared identifier 'username_completion_function';
did you mean 'rl_username_completion_function'?
generator_func = USERNAME_COMPLETION_FUNCTION;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
rl_username_completion_function
readline.c:54:39: note:
expanded from macro 'USERNAME_COMPLETION_FUNCTION'
#define USERNAME_COMPLETION_FUNCTION username_completion_function
^
/opt/local/include/readline/readline.h:465:14: note:
'rl_username_completion_function' declared here
extern char *rl_username_completion_function
PARAMS((const char *, int));
^
1 error generated.
}}}
Reason is a sloppy {{{configure.ac}}} test checking the existence of
function {{{rl_username_completion_function}}} (and other readline
functions): It uses different {{{CFLAGS}}} values for configuring and
compiling. In particular, compilation of file {{{readline.c}}} uses the
value of {{{CURL_CFLAGS}}}: It adds {{{-I/opt/local/include}}}, which
enables a newer MacPorts version of {{{readline.h}}} (7.0 GNU, from 2016)
that is not compatible with Lion's version (NetBSD, from 2009).
Looking into {{{src/pextlib1.0/Makefile.in}}} I see
{{{
CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS}
}}}
so I suggest to use those flags for checking readline functions also.
BTW, I circumvented the issue by using
{{{
./configure ac_cv_have_decl_rl_username_completion_function=yes \
--enable-readline \
--with-curlprefix=/opt/local
}}}
which gives me a {{{port}}} program that successfully supports downloading
packages from github.
--
Ticket URL: <https://trac.macports.org/ticket/57160>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list