Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#45512 closed defect (worksforme)

selfupdate 2.3.1 > 2.3.2 fails, OS X 10.6.8, Xcode 3.2.6

Reported by: el_duderino_@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description

Today, upgrading MacPorts base from 2.3.1 to 2.3.2 failed twice. I have been using MacPorts for years and I remember at least two successful base upgrades, so I think my setup is not fundamentally flawed.

In my first attempt I had changed /bin/bash and /bin/sh to patched Versions (3.2.57(1)), so I changed them back to the unpatched Versions shipped with the system (3.2.48(1)) but to no avail. After that, I have no idea what could be the reason.

I attached the log of my second attempt (debug mode), when I was using the unpatched bash version.

Thank you in advance & thank you in general for all the hard work!

Attachments (1)

2014-10-10--selfupdate-macports-failed.log (409.4 KB) - added by el_duderino_@… 10 years ago.
log of attempt to update MacPorts base from 2.3.1 to 2.3.2

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by el_duderino_@…

log of attempt to update MacPorts base from 2.3.1 to 2.3.2

comment:1 Changed 10 years ago by el_duderino_@…

I messed up the logfile's name. It should be 2014-10-20…, of course.

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: base selfupdate 2.3.1 2.3.2 removed

Do you have a copy of readline installed in prefix /usr/local? If so, please remove it, along with anything else you may have installed in prefix /usr/local.

comment:3 Changed 10 years ago by el_duderino_@…

Hi Ryan,

I don't have readline in /usr/local/ but a lot of other things. I'll move /usr/local/ somewhere else and try upgrading again.

Last edited 10 years ago by el_duderino_@… (previous) (diff)

comment:4 Changed 10 years ago by el_duderino_@…

…and it didn't work. Here's the log: http://pastebin.com/Wmii4yGL

comment:5 in reply to:  4 Changed 10 years ago by el_duderino_@…

Replying to el_duderino_@…:

…and it didn't work. Here's the log: http://pastebin.com/Wmii4yGL

and a permanent (not expiring after 30 days) version of said log http://pastebin.com/pd4L33aj although there’s virtually no difference to the very first log 2014-10-10--selfupdate-macports-failed.log.

comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

The error message you're getting suggests a problem with readline. If it's not a rogue copy of readline in /usr/local, I don't know, maybe your system copy of readline got replaced somehow? Or are there other copies of readline elsewhere on your system? Are there any nonstandard directories in your $PATH, and if so, do any of them contain copies of readline?

We can investigate this further, but you can also bypass the selfupdate process and instead update to MacPorts 2.3.2 by downloading the installer from our web site.

comment:7 in reply to:  6 ; Changed 10 years ago by el_duderino_@…

Replying to ryandesign@…:

The error message you're getting suggests a problem with readline. If it's not a rogue copy of readline in /usr/local, I don't know, maybe your system copy of readline got replaced somehow? Or are there other copies of readline elsewhere on your system? Are there any nonstandard directories in your $PATH, and if so, do any of them contain copies of readline?

There were indeed a lot of non-standard directories in my PATH and in two of them (or rather their subdirectories) were copies of readline (e.g. in LibreOffice). I altered my PATH through export PATH = but it didn't work. I changed my .profile and re-sourced – it didn't work. I did . ~/.profile && gfind $(echo $PATH | sed -e 's/:/\ /g') -iname *readline* to make sure there was no copy of readline in my PATH – it still didn't work.

I also checked my copy of /usr/include/readline. There are two symlinks in that directory: history.h and readline.h. Both point to /usr/include/editline/readline.h. readline.h is from October 2010 and hasn't been altered since. I don't know if it is supposed to be that way.

We can investigate this further, but you can also bypass the selfupdate process and instead update to MacPorts 2.3.2 by downloading the installer from our web site.

Downloading and simply installing sounds fine! Do I risk losing my ports or anything else with that?

comment:8 in reply to:  7 ; Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to el_duderino_@…:

There were indeed a lot of non-standard directories in my PATH and in two of them (or rather their subdirectories) were copies of readline (e.g. in LibreOffice). I altered my PATH through export PATH = but it didn't work. I changed my .profile and re-sourced – it didn't work. I did {{{. ~/.profile && gfind $(echo $PATH | sed -e 's/:/\ /g') -iname *readline*}}} to make sure there was no copy of readline in my PATH – it still didn't work.

But did you change your shell startup files and open a new terminal? Sometimes forcing an existing shell to pick up the changes you want can be tricky and unintuitive.

Downloading and simply installing sounds fine! Do I risk losing my ports or anything else with that?

Nope. Your ports won’t be touched.

comment:9 in reply to:  8 ; Changed 10 years ago by el_duderino_@…

Replying to larryv@…:

But did you change your shell startup files and open a new terminal? Sometimes forcing an existing shell to pick up the changes you want can be tricky and unintuitive.

I’m nor entirely sure, what I did when but I even re-started the computer at one time. For the sake of it I just tried one last time: This time I simply commented out the whole path variable in .profile, closed Terminal.app, opened it again, and did this:

$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin:/usr/X11/bin
$ /opt/local/bin/gfind $(echo $PATH | sed -e 's/:/\ /g') -iname *readline*
$ sudo /opt/local/bin/port -d selfupdate
[...]
readline.c: In function ‘attempted_completion_function’:
readline.c:130: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:130: error: (Each undeclared identifier is reported only once
readline.c:130: error: for each function it appears in.)
make[2]: *** [readline.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/usr/bin/cc ./configure --prefix=/opt/local --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 2
DEBUG: Error installing new MacPorts base: command execution failed
    while executing
"macports::selfupdate [array get global_options] base_updated"
Error: Error installing new MacPorts base: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

So I think this really isn’t working. I’m kind of bugged that I can’t find the error and do it “the proper way” but my curiosity only goes so far… If I can keep my ports and simply upgrade by using the installer, I’ll give it a try. If this fails as well, I’ll be back, I promise. ;-)

Thank you all for your responses and in general for working on this great project!

comment:10 Changed 10 years ago by el_duderino_@…

It did work with the installer.

Thank you!

comment:11 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: worksforme
Status: newclosed

I'm glad that worked. There's no problem with upgrading MacPorts by running the latest installer from our website; it's just less convenient than typing "sudo port selfupdate" but the end result is the same.

The fact that your PATH was still nonstandard, even after commenting out the PATH variable in ~/.profile, suggests that your PATH is being set somewhere else. Other possibilities might include ~/.bash_profile, ~/.bashrc, /etc/profile, /etc/bashrc, /etc/paths, or the contents of /etc/paths.d, if you want to investigate further.

comment:12 in reply to:  9 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to el_duderino_@…:

$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin:/usr/X11/bin
$ /opt/local/bin/gfind $(echo $PATH | sed -e 's/:/\ /g') -iname *readline*

Note that this script you ran would find executable programs whose names contain "readline", but readline does not provide an executable of that name (nor any executable, in fact); executables aren't the problem: the problem is the readline library (which would be in a "lib" directory) and header files (which would be in an "include" directory).

Note: See TracTickets for help on using tickets.