Opened 11 years ago

Closed 11 years ago

#42291 closed defect (invalid)

llvm-3.4: error: invalid version number in '-mmacosx-version-min='

Reported by: watsodw Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: llvm-3.4

Description

Error is: clang: error: invalid version number in '-mmacosx-version-min=';

Running Mountain Lion 10.8.5, Xcode 5.0.2;

Is this version of llvm and clang only for Mavericks?

Attachments (1)

main.log (87.9 KB) - added by watsodw 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by watsodw

Attachment: main.log added

comment:1 in reply to:  description Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; jeremyhu@… removed
Owner: changed from macports-tickets@… to jeremyhu@…
Summary: Install of llvm-3.4 fails.llvm-3.4: error: invalid version number in '-mmacosx-version-min='

Replying to david.w.watson@…:

Is this version of llvm and clang only for Mavericks?

No; apparently there is a bug.

Are you running MacPorts 2.2.1 as indicated, or trunk?

comment:2 Changed 11 years ago by watsodw

I'm running 2.2.1, not trunk.

comment:3 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I can't reproduce this. There are no other reports. The buildbots are all happy. You're going to need to provide more information. There's something interesting about your configuration that is triggering this. Can you please provide additional information?

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

Ah yes. The log shows:

:info:configure checking for sed... /opt/macports/bin/sed

What is this? I assume this is GNU sed, but MacPorts gsed port deliberately installs the binary as gsed, not sed; did you manually create a sed symlink to gsed? If so, that's a problem, and would explain the first error shown in the log:

:info:build sed: invalid option -- E

-E is an option that only works with BSD sed (which is what OS X ships with; GNU sed would require the -r option instead).

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

Resolution: invalid
Status: newclosed

Makefile.rules runs this code on Darwin:

  # Strip a number like 10.4.7 to 10.4
  DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]+).*/\1/')
  # Get "4" out of 10.4 for later pieces in the makefile.
  DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]+).*/\1/')

By using the -E flag, this code assumes that sed is BSD sed; this is a reasonable assumption on Darwin, and making sed be (or be a symlink to) gsed will break this. So if sed is (or is a symlink to) gsed on your system, please remove that. If you want to be able to run gsed by typing sed, the way we intend for you to be able to do that is for you to add /opt/macports/libexec/gnubin to your shell $PATH variable; this won't adversely affect port builds.

Note: See TracTickets for help on using tickets.