Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#41188 closed defect (wontfix)

port selfupdate failed: Error installing new MacPorts base: shell command failed - THE SEQUEL

Reported by: kelly@… Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: base Version: 1.9.2
Keywords: Cc:
Port:

Description

This might superficially seem similar to http://trac.macports.org/ticket/36432, but it's not the same - I tried all that already. I DO have xcode tools installed, as well as the latest XCode, and ALL software on my machine that's in the App Store is currently up-to-date.

! uname -a
Darwin [username] 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

It seems that my curl is messed up ever since I updated to Mountain Lion - it worked fine before then. I have been trying everything imaginable to fix it, and was going to try to reinstall via MacPorts, hence this bug report. Here are the current curl results:

! which curl
/usr/bin/curl

Found an article on stackexchange saying to reinstall curl using MacPorts and when I tried it failed, saying my ports needed to be updated. So I tried doing this as well.

! sudo port selfupdate -v
--->  Updating the ports tree
--->  Updating MacPorts base sources using rsync
MacPorts base version 1.9.2 installed,
MacPorts base version 2.2.1 downloaded.
--->  MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0777; Tcl-Package in /Library/Tcl

Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)

NOTE: I can't even FIND the log in Mavericks!! And when I search the net I get conflicting reports on this as well! It's driving me crazy, honestly. Plus I feel as dumb as the dumbest dumb thing.

--AND--

! sudo port install pv
Password:
Error: Unable to open port: invalid command name "compiler.blacklist-append"
Error: Unable to execute port: upgrade gettext failed
To report a bug, see <http://guide.macports.org/#project.tickets>

--AND--

! sudo port install curl
Error: Unable to open port: can't read "subport": no such variable
To report a bug, see <http://guide.macports.org/#project.tickets>

Clearly, things are a huge mess, and I REALLY can't afford to start over with a complete clean Mountain Lion / Mavericks install. I'm a developer for a living and it would take at least 10+ hours to recreate everything in my environment. SO - any help appreciated.

Thank you, kbell

Attachments (2)

port selfupdate -d.txt (3.6 KB) - added by kelly@… 11 years ago.
config.log.txt (9.1 KB) - added by kelly@… 11 years ago.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 11 years ago by kelly@…

Cc: kelly@… added
Last edited 11 years ago by kelly@… (previous) (diff)

comment:2 Changed 11 years ago by neverpanic (Clemens Lang)

Cc: kelly@… removed
Component: portsbase
Keywords: Mountain Lion Mavericks removed
Owner: changed from macports-tickets@… to cal@…

You don't need to Cc yourself.

Your version is MacPorts is 1.9.2, which is really really old. That also explains the errors you see when you try to install some ports: These ports need features added in later versions of MacPorts.

We need to figure out why MacPorts fails to build (and thus update itself) on your system. Please run sudo port -d selfupdate, copy the output to a textfile and attach that.

comment:3 in reply to:  2 Changed 11 years ago by kelly@…

Replying to cal@…:

I attached a file and also a pastebin (below)

http://pastebin.com/sfEqbL5Q

Last edited 11 years ago by kelly@… (previous) (diff)

Changed 11 years ago by kelly@…

Attachment: port selfupdate -d.txt added

comment:4 Changed 11 years ago by kelly@…

Also, FWIW, I have been using an alternate coding environment almost this whole time, which is why I didn't update before now. With Lion, my MySQL got SO screwed up (there were "fixes" all over the Net, and then there were tons of people who never could get it fixed, like me) - so I stopped using my local dev environment altogether and used a clean VM, instead. Then Mountain Lion came along and fixed the MySQL bug (finally). But by then, I was pretty comfy in my VM and didn't bother switching.

Now, however, I have to get my local dev sitch sorted because I'm beta-testing a new product for a friend and it runs on all my local stuff. So here I am - trying to update MacPorts in hopes it will fix my curl problem (and install pipe viewer, etc...).

Thanks for the help!

Last edited 11 years ago by kelly@… (previous) (diff)

comment:5 Changed 11 years ago by neverpanic (Clemens Lang)

It seems there is a problem with your C compiler. Can you attach /opt/local/var/macports/sources/rsync.macports.org/release/base/config.log?

comment:6 Changed 11 years ago by kelly@…

Clearly you're on the right track... (I ran nano and it was empty, and didn't exist unless I saved it - no overwrite prompt).

Also, I am hearing a lot of stuff about the paths being changed in Mavericks, and that previous bash profiles (especially $PATH settings) aren't being honored (http://apple.stackexchange.com/questions/107441/os-x-mavericks-bash-profile-paths-dont-work. I wonder if this is ALSO part of the problem. None of this stuff was happening until Mavericks - the ONLY problem I was having before Mavericks was with curl...

Last edited 11 years ago by kelly@… (previous) (diff)

comment:7 Changed 11 years ago by danielluke (Daniel J. Luke)

Did you run xcode-select --install after installing Mavericks?

comment:8 in reply to:  7 Changed 11 years ago by kelly@…

Replying to dluke@…:

Did you run xcode-select --install after installing Mavericks?

yes (this was 4.5 hours ago now):

! xcode-select --install
xcode-select: note: install requested for command line developer tools

...then it ran without problems, and returned me to the bash prompt. I saw the instructions regarding this in your post (though I thought I had run it after installing Mavericks the day it was released, but I must not have), so I ran it today, after the first attempt at self-update failed.

I did update XCode immediately after I installed Mavericks, along with all the other updates indicated by the AppStore at that time.

Last edited 11 years ago by kelly@… (previous) (diff)

comment:9 Changed 11 years ago by neverpanic (Clemens Lang)

The same or a similar issue was probably happening before Mavericks, or you wouldn't still be at MacPorts 1.9.2.

If there is no /opt/local/var/macports/sources/rsync.macports.org/release/base/config.log, please run sudo port -d selfupdate again and check again. The step that failed should have created this file in this directory.

If that doesn't help either, run

cd /opt/local/var/macports/sources/rsync.macports.org/release/base && PATH=/bin:/usr/bin CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0777 --enable-readline

and check for the file again.

Last edited 11 years ago by neverpanic (Clemens Lang) (previous) (diff)

comment:10 Changed 11 years ago by kelly@…

failed again, same point (the Tcl library?). Ran the second command:

! sudo cd /opt/local/var/macports/sources/rsync.macports.org/release/base && PATH=/bin:/usr/bin CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0777 --enable-readline
./configure: line 2292: config.log: Permission denied
./configure: line 2302: config.log: Permission denied

File is still listing as a NEW FILE in nano...

Should I repair permissions and try again? I've done it already once since Mavericks update, but this sure looks like a likely candidate...

comment:11 Changed 11 years ago by neverpanic (Clemens Lang)

No, the problem is configure couldn't write config.log because of a permission problem. Solution is to add sudo at the right place. Use:

cd /opt/local/var/macports/sources/rsync.macports.org/release/base && sudo env PATH=/bin:/usr/bin CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0777 --enable-readline

comment:12 Changed 11 years ago by kelly@…

ah, ok sure. Here is the result:

! cd /opt/local/var/macports/sources/rsync.macports.org/release/base && sudo env PATH=/bin:/usr/bin CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0777 --enable-readline
Password:
checking build system type... i386-apple-darwin13.0.0
checking host system type... i386-apple-darwin13.0.0
checking target system type... i386-apple-darwin13.0.0
checking MacPorts version... 2.2.1
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.1
checking for gcc... /usr/bin/llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/base':
configure: error: C compiler cannot create executables
See `config.log' for more details

comment:13 Changed 11 years ago by neverpanic (Clemens Lang)

Now check for /opt/local/var/macports/sources/rsync.macports.org/release/base/config.log and attach it.

Changed 11 years ago by kelly@…

Attachment: config.log.txt added

comment:14 Changed 11 years ago by neverpanic (Clemens Lang)

The problem seems to be

./configure: line 3342: /usr/bin/llvm-gcc-4.2: No such file or directory

Can you grab the binary installer for Mavericks from https://distfiles.macports.org/MacPorts/MacPorts-2.2.1-10.9-Mavericks.pkg and run it? That's probably easier than running the necessary commands manually.

The problem seems to be that your version of MacPorts used to use llvm-gcc-4.2 to build itself – however, Mavericks removed this compiler, causing your selfupdate to fail.

comment:15 Changed 11 years ago by neverpanic (Clemens Lang)

After you've done that, verify that sudo port -df selfupdate works.

comment:16 in reply to:  15 Changed 11 years ago by kelly@…

Replying to cal@…:

After you've done that, verify that sudo port -df selfupdate works.

I never in a million years would have figured that out, so thank you SO much!! It's installing now, taking a few minutes here (it's been stuck at about 85% for a few minutes). I'll report back as soon as it's done and I try the selfupdate. It says "less than a minute" remaining, but it's been that way for over 10 minutes now...

Last edited 11 years ago by kelly@… (previous) (diff)

comment:17 Changed 11 years ago by kelly@…

Any idea on what the upper limit of this install timing should be? It's at just under 20 minutes now, and still hung on the very last bit. It asked for permissions to the rsync folder (which I granted), and that was the last bit of progress made. The progress bar hasn't moved from this spot in over 15 minutes. Advice?

comment:18 Changed 11 years ago by neverpanic (Clemens Lang)

Take a look at the installer log (press command+L). If you see new output coming up, leave it running, it might actually take quite a while. Apple's installer tells users this is only going to take a minute, but that's not true and we have no influence over that.

comment:19 Changed 11 years ago by kelly@…

Believe it or not, it was hung on a problem I would never have seen if I hadn't opened the Console and taken a look... you have to accept the XCode LICENSE - VIA THE TERMINAL - can you believe? It's a totally separate process!

SO, once I ran through the prompts and typed "agree" at the end of this command:

sudo xcodebuild -license

the installer finally completed.

I ran the selfupdate, and "Congratulations, you have successfully upgraded the MacPorts system." YAY!!!

comment:20 Changed 11 years ago by kelly@…

I'm running

port upgrade outdated

now; this might take awhile...

You're a saint - thank you so much!

Last edited 11 years ago by kelly@… (previous) (diff)

comment:21 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: wontfix
Status: newclosed

That would also explain why the selfupdate was not working before that. Glad you got it working.

Since you probably just updated to Mavericks, also take a look at wiki:Migration.

The core issue you had, that updating from 1.9.2 on Mavericks does not work due to /usr/bin/llvm-gcc-4.2 being used as a compiler can no longer be fixed by us, though. I'm thus closing this ticket wontfix.

comment:22 in reply to:  21 Changed 11 years ago by kelly@…

UNDERSTOOD! Hopefully though, someone else will be able to benefit from our day's toil. Thanks again! Cheers, Kelly

Last edited 11 years ago by kelly@… (previous) (diff)

comment:23 Changed 11 years ago by kelly@…

opened new ticket and deleted comment in this thread. #41370

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.