Opened 7 years ago
Closed 7 years ago
#56410 closed defect (invalid)
'port selfupdate' from 2.4.2 to 2.4.3 fails on PPC running OSX10.5.8
Reported by: | josephsacco | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.4.3 |
Keywords: | leopard powerpc legacy-os | Cc: | |
Port: |
Description (last modified by mf2k (Frank Schima))
Running 'port selfupdate' fails on a PPC running OSX10.5.8. The problem seems to be with readline:
readline.c:126 error filename_completion_function undeclared (first use in this function)
-Joseph
Attachments (1)
Change History (16)
comment:1 Changed 7 years ago by josephsacco
comment:2 Changed 7 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Keywords: | leopard powerpc added; selfupdate removed |
In the future, please use WikiFormatting.
comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
I guess there is something different about your system that is causing this problem. Please attach a log file of running selfupdate; it might help us identify what the problem is. selfupdate doesn't generate a logfile, so you'll have to do make one manually (e.g. sudo port -d selfupdate 2>&1 | tee ~/Desktop/selfupdate.log
) then attach selfupdate.log from your Desktop to this ticket.
comment:4 Changed 7 years ago by raimue (Rainer Müller)
Keywords: | legacy-os added |
---|
comment:5 Changed 7 years ago by josephsacco
Ryan,
The bad news is when 'port selfupdate' failed, I installed the MacPorts update using the prebuilt dmg archive, so my ancient PPC is now at version 2.4.3. Grrr....
I do have a hunch...
Poking around the source code for the "base", readline.c contains the following:
#ifdef HAVE_READLINE_READLINE_H #include <readline/readline.h> #endif ... /* Work-around libedit incompatibilities */ #if HAVE_DECL_RL_FILENAME_COMPLETION_FUNCTION # define FILENAME_COMPLETION_FUNCTION rl_filename_completion_function #elif HAVE_DECL_FILENAME_COMPLETION_FUNCTION # define FILENAME_COMPLETION_FUNCTION filename_completion_function #endif #if HAVE_DECL_RL_USERNAME_COMPLETION_FUNCTION # define USERNAME_COMPLETION_FUNCTION rl_username_completion_function #elif HAVE_DECL_USERNAME_COMPLETION_FUNCTION # define USERNAME_COMPLETION_FUNCTION username_completion_function #endif #if HAVE_DECL_RL_COMPLETION_MATCHES # define COMPLETION_MATCHES rl_completion_matches #elif HAVE_DECL_COMPLETION_MATCHES # define COMPLETION_MATCHES completion_matches #endif
readline @7.0.003_1 is active, so let's look at <readline/readline.h> and see where filename_completion_function is declared:
/* Completion functions. */ extern int rl_complete_internal PARAMS((int)); extern void rl_display_match_list PARAMS((char **, int, int)); extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); extern char *rl_username_completion_function PARAMS((const char *, int)); extern char *rl_filename_completion_function PARAMS((const char *, int)); extern int rl_completion_mode PARAMS((rl_command_func_t *)); #if 0 /* Backwards compatibility (compat.c). These will go away sometime. */ extern void free_undo_list PARAMS((void)); extern int maybe_save_line PARAMS((void)); extern int maybe_unsave_line PARAMS((void)); extern int maybe_replace_line PARAMS((void)); extern int ding PARAMS((void)); extern int alphabetic PARAMS((int)); extern int crlf PARAMS((void)); extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); extern char *username_completion_function PARAMS((const char *, int)); extern char *filename_completion_function PARAMS((const char *, int)); #endif
Appears the declaration for file_name_completion_function has been commented out.
-Joseph
comment:6 Changed 7 years ago by raimue (Rainer Müller)
selfupdate will not link with ports, it should use /usr/include/readline/readline.h
.
To reproduce the problem even after you upgraded, you could force to rebuild MacPorts from source using sudo port -f selfupdate
(and probably also use -d
to see the debug output).
comment:7 Changed 7 years ago by kencu (Ken)
I have one of every system there is, and I have port 2.4.3 installed on all my systems, Tiger Intel and Tiger PPC on up. I install from source on anything older than 10.10, rather than use sudo port selfupdate
. None of the systems had any problems installing in that fashion.
comment:8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Right. And our Leopard PPC build system upgraded itself without error too.
Changed 7 years ago by josephsacco
Attachment: | selfupdate.log added |
---|
log file from sudo port -d -f selfupdate
comment:9 Changed 7 years ago by josephsacco
Rainer,
Thanks for reminding me about using the '-f' flag to force the build. The log file from an attempted update using '-f -d' flags has been attached.
-Joseph
comment:10 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Do you have anything in /usr/local, such as an installation of readline?
comment:11 Changed 7 years ago by josephsacco
Ryan,
There is no installation of readline in /usr/local. The problem is "ultimately" caused by the installation of readline in /opt/local as can be seen from running:
/usr/bin/cc -c -M -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 -Wextra -Wall -pedantic -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base/src -I/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base/src -I. -I/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base/vendor/vendor-destroot//opt/local/libexec/macports/include -fno-common readline.c readline.o: readline.c \ /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base/src/config.h \ /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ /usr/include/ppc/_types.h /usr/include/stdlib.h \ /usr/include/available.h /usr/include/sys/wait.h \ /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ /usr/include/machine/signal.h /usr/include/ppc/signal.h \ /usr/include/sys/_structs.h /usr/include/machine/_structs.h \ /usr/include/ppc/_structs.h /usr/include/mach/ppc/_structs.h \ /usr/include/sys/resource.h /usr/include/string.h \ /opt/local/include/readline/readline.h \ /opt/local/include/readline/rlstdc.h \ /opt/local/include/readline/rltypedefs.h \ /opt/local/include/readline/keymaps.h \ /opt/local/include/readline/chardefs.h /usr/include/ctype.h \ /usr/include/runetype.h /usr/include/strings.h \ /opt/local/include/readline/tilde.h \ /opt/local/include/readline/history.h /usr/include/time.h \ /usr/include/_structs.h /opt/local/include/tcl.h \ /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h \ /opt/local/include/tclDecls.h /opt/local/include/tclPlatDecls.h \ readline.h
Note the presence of -I/opt/local/include
If that directory is removed from the header file search path, readline.c will compile.
So where did that header file search path includes come from?
The Makefile in ./pextlib1.0 contains include ../../Mk/macports.autoconf.mk
, which includes:
UNIVERSAL_ARCHFLAGS = -arch i386 -arch ppc READLINE_CFLAGS = MD5_CFLAGS = SQLITE3_CFLAGS = CURL_CFLAGS = -I/opt/local/include
CURL_CFLAGS is picked up my the Makefile in ./pextlib1.0
# tracelib.o has an additional dependency tracelib.o: ../darwintracelib1.0/sandbox_actions.h CFLAGS+= ${CURL_CFLAGS} ${MD5_CFLAGS} ${READLINE_CFLAGS} LIBS+= ${CURL_LIBS} ${MD5_LIBS} ${READLINE_LIBS}
So the culprit appears to be an installation of the MacPorts version of curl.
-Joseph
comment:12 Changed 7 years ago by kencu (Ken)
uses curl-config
, and must be picking up the one in ${prefix}/bin
instead of the one in /usr/bin
.
I believe it should be respecting --with-curlprefix
and using /
if none is specified during configure -- that's the way it used to work, at least.
You haven't configured MacPorts to depend on itself by using --with-curlprefix=/opt/local
have you?
comment:13 Changed 7 years ago by josephsacco
Ryan,
Found the problem, "Pilot error."
As you had said earlier, "I guess there is something different about your system that is causing this problem." You were correct...
Long ago I had moved the OSX10.5.8 version of curl and had replaced it and its config file with soft links to the Macports curl installation.
Sigh... Sorry for waiting everyone's time.
Onwards,
-Joseph
comment:14 Changed 7 years ago by josephsacco
And yes... Once the OSX 10.5.8 version of curl is back in place, all is well. Here is some of the output from updating to 2.4.4:
===> making install in tests make[1]: Nothing to be done for `install'. [ ! -f "/opt/local/etc/macports/mp_version" ] || rm -vf "/opt/local/etc/macports/mp_version" /usr/bin/install -c -d -o "root" -g "admin" -m "755" "/opt/local/share/macports/" /usr/bin/install -c -o "root" -g "admin" -m 444 setupenv.bash "/opt/local/share/macports/" /usr/bin/install -c -o "root" -g "admin" -m 444 ./macports-pubkey.pem "/opt/local/share/macports/" /opt/local/libexec/macports/bin/tclsh8.5 ./src/upgrade_sources_conf_default.tcl "/opt/local" /opt/local/libexec/macports/bin/tclsh8.5 ./src/images_to_archives.tcl This could take a while... /opt/local/libexec/macports/bin/tclsh8.5 ./src/dedup_portfiles.tcl Congratulations, you have successfully upgraded the MacPorts system.
The fun continues,
-Joseph
comment:15 Changed 7 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | new → closed |
The prebuilt dmg archive available on mac ports.org does work... :-)
-Joseph