Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#47564 closed defect (invalid)

port upgrade fails with error for package gmp

Reported by: vithlani@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port:

Description

Command:

port upgrade outdated

Gives the following error:

port  upgrade outdated
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Fetching distfiles for gmp
--->  Verifying checksums for gmp
--->  Extracting gmp
--->  Applying patches to gmp
--->  Configuring gmp
Error: Failed to configure gmp, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/work/gmp-6.0.0/config.log
Error: org.macports.configure for port gmp returned: configure failure: command execution failed
Please see the log file for port gmp for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Attachments (2)

main.log (5.5 KB) - added by vithlani@… 10 years ago.
main.log with detailed output
main.log.2 (3.8 KB) - added by vithlani@… 10 years ago.

Download all attachments as: .zip

Change History (16)

Changed 10 years ago by vithlani@…

Attachment: main.log added

main.log with detailed output

comment:1 Changed 10 years ago by vithlani@…

The error seems kind of funny because I do have g++ installed and it seems to be detected correctly.

comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)

Do you have the latest Xcode and Command Line Tools installed? The build is not detecting Clang correctly:

:debug:configure Using compiler 'System cc'

What’s the output from these commands?

% xcode-select --print-path
% ls -dl /usr/include

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

Also: "see config.log for details"

comment:4 in reply to:  2 ; Changed 10 years ago by vithlani@…

Replying to larryv@…:

$ xcode-select -p
/Library/Developer/CommandLineTools

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

$ls -dl /usr/include
drwxr-xr-x  257 root  wheel  8738 Apr 16 20:39 /usr/include/

Do you have the latest Xcode and Command Line Tools installed? The build is not detecting Clang correctly:

:debug:configure Using compiler 'System cc'

What’s the output from these commands?

% xcode-select --print-path
% ls -dl /usr/include

comment:5 in reply to:  4 Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to vithlani@…:

$ xcode-select -p
/Library/Developer/CommandLineTools

We don’t support using the CLT as your active developer directory. Try this:

% sudo xcode-select --switch /Applications/Xcode.app
% sudo port clean gmp
% sudo port upgrade outdated

If that still fails, please attach your new main.log and the config.log (which should be in $(port work gmp)/gmp-6.0.0 somewhere).

Changed 10 years ago by vithlani@…

Attachment: main.log.2 added

comment:6 Changed 10 years ago by vithlani@…

$ sudo xcode-select --switch /Applications/Xcode.app
Password:
xcode-select: error: invalid developer directory '/Applications/Xcode.app'

 $ sudo xcode-select --switch /Xcode3.1.4/
 $ sudo port clean gmp
Warning: xcodebuild exists but failed to execute
--->  Cleaning gmp
   
 $ sudo port -v upgrade outdated
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Configuring gmp
Warning: No processor dependent assembly code being used. gmp might be slower.
checking build system type... core2-apple-darwin14.3.0
checking host system type... core2-apple-darwin14.3.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler /usr/bin/cc -O -I/opt/local/include... no
configure: error: could not find a working compiler, see config.log for details
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/work/gmp-6.0.0" && ./configure --prefix=/opt/local --enable-cxx --build=core2-apple-darwin14.3.0
Exit code: 1
Error: Failed to configure gmp, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/work/gmp-6.0.0/config.log
Error: org.macports.configure for port gmp returned: configure failure: command execution failed
Warning: targets not executed for gmp: org.macports.install org.macports.configure org.macports.build org.macports.destroot
Please see the log file for port gmp for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Log has been attached.

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

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

Replying to vithlani@…:

$ sudo xcode-select --switch /Applications/Xcode.app
Password:
xcode-select: error: invalid developer directory '/Applications/Xcode.app'

 $ sudo xcode-select --switch /Xcode3.1.4/

What? Do you have Xcode installed? What OS are you running?

Your log is still missing a ton of information. Please run exactly these commands; do NOT run anything else.

% sudo port clean all
% sudo port upgrade gmp

Then upload main.log and config.log.

comment:8 in reply to:  6 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to vithlani@…:

$ sudo xcode-select --switch /Applications/Xcode.app
Password:
xcode-select: error: invalid developer directory '/Applications/Xcode.app'

Correct, that's invalid. We should have instead asked you to run (and please run this now):

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

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

Replying to ryandesign@…:

Correct, that's invalid. We should have instead asked you to run (and please run this now):

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

I’ve never had a problem using the path to the app itself, and the xcode-select documentation says that that should work. I do remember people having trouble with it; perhaps there was a bug with certain versions of xcode-select.

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

Replying to larryv@…:

I’ve never had a problem using the path to the app itself, and the xcode-select documentation says that that should work. I do remember people having trouble with it; perhaps there was a bug with certain versions of xcode-select.

Oh I see. I agree, it does not print an error for me. So then we're left with: what version of Xcode to you have in /Applications, vithlani?

comment:11 Changed 10 years ago by vithlani@…

Hi,

Thanks for taking the time to look at this issue.

I suspect my XCode is *very* old and that is causing the problem. Version is Xcode3.1.4, and I can't even run it with the latest version of OS X.

I could not:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

As that directory does not exist but I do have something under /Library/Developer. I tried switching to that but still does not work.

Will post detailed output once I get home.

Should I just bite the bullet and upgrade XCode?

comment:12 Changed 10 years ago by vithlani@…

I Installed the latest XCode stable build and it seems to have solved the problem.

Many thanks, please close.

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

Resolution: invalid
Status: newclosed

Alright. For the future, do make sure that your active developer directory is inside /Applications/Xcode.app and not /Library/Developer.

comment:14 in reply to:  13 Changed 10 years ago by vithlani@…

Replying to larryv@…:

Alright. For the future, do make sure that your active developer directory is inside /Applications/Xcode.app and not /Library/Developer.

Will do, I don't use XCode and had an ancient installation just there for making the ports system work and getting command line tools.

Is there a way to get these without XCode?

Note: See TracTickets for help on using tickets.