#51969 closed defect (invalid)
building mp from source with readline fails (uses files from existing installation)
Reported by: | mojca (Mojca Miklavec) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.3.4 |
Keywords: | Cc: | ||
Port: |
Description
On a machine with an existing MP installation I tried to set up a parallel test installation with
./configure --prefix="$PREFIX" --with-frameworks-dir="$PREFIX/Library/Frameworks" --with-applications-dir="$PREFIX/Applications" --enable-readline
but the build failed with:
clang -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 -Wextra -Wall -pedantic -I/opt/local/include -DHAVE_CONFIG_H -I/path/to/MacPorts-2.3.4/src -I/path/to/MacPorts-2.3.4/src -I. -I/path/to/MacPorts-2.3.4/vendor/vendor-destroot//opt/test-local/libexec/macports/include -fno-common readline.c -o readline.o readline.c:130: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:51:39: note: expanded from macro 'USERNAME_COMPLETION_FUNCTION' # define USERNAME_COMPLETION_FUNCTION username_completion_function ^ /opt/local/include/readline/readline.h:457:14: note: 'rl_username_completion_function' declared here extern char *rl_username_completion_function PARAMS((const char *, int)); ^ 1 error generated. make[2]: *** [readline.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1
I have no time to debug this right now, so I wanted to note it down before I forget.
Change History (4)
comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 8 years ago by neverpanic (Clemens Lang)
That happens when configuring with an existing copy of MacPorts (that has readline installed) in $PATH
, which is why you should not do this.
See also https://guide-origin.macports.org/#installing.macports.source.multiple, which explicitly documents this. I think this should be closed invalid.
comment:3 Changed 8 years ago by mojca (Mojca Miklavec)
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 Changed 8 years ago by mojca (Mojca Miklavec)
Thank you. I wasn't sure whether there were supposed to be any measures to give priority to the built-in readline and I didn't have any time to investigate, but I'm happily closing this as invalid.
Note: See
TracTickets for help on using
tickets.
I'm not sure why the build with readline would fail, but I personally run
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
before building MacPorts from source to avoid these kinds of problems.