Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#43815 closed defect (fixed)

clisp @2.49: error: unknown argument: '-R/opt/local/lib'

Reported by: wanghuan1406@… Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.3.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), cooljeanius (Eric Gallager)
Port: clisp

Description (last modified by ryandesign (Ryan Carsten Schmidt))

hello there
i failed to install common lisp on osx 10.9.3, the returned error is about clang

:info:build clang: error: unknown argument: '-R/opt/local/lib' [-Wunused-command-line-argument-hard-error-in-future]

i've tried set root $ARCHFLAGS, by

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"

but nothing works.

please help me, thx in advanced

Attachments (3)

main.log (13.6 KB) - added by wanghuan1406@… 10 years ago.
main.log
main.2.log (180.6 KB) - added by wanghuan1406@… 10 years ago.
main1.log
patch-src_configure.diff (372 bytes) - added by adexter@… 10 years ago.
Remove -R flag from src/configure.

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by wanghuan1406@…

Attachment: main.log added

main.log

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

Cc: ryandesign@… added
Description: modified (diff)
Keywords: clisp clang 10.9.3 mavericks removed
Milestone: MacPorts Future
Owner: changed from macports-tickets@… to easieste@…
Summary: failed to install clisp 2.49 on OSX 10.9.3clisp @2.49: error: unknown argument: '-R/opt/local/lib'

MacPorts deliberately ignores environment variables you set on the command line, so that won't help.

We need to remove the -R flag from wherever it's being inserted. It has never been supported, using it has been printing a warning for some time, and now with the latest clang it is an error to attempt to use it.

The portfile says clang is blacklisted, but doesn't say why exactly:

# Likely a project bug
# TODO: Report upstream and provide a link to the bug report here.
compiler.blacklist *clang*

Note from the attached log that the port is erroneously using /usr/bin/cc; as of Xcode 5, that'll be clang. The port should be UsingTheRightCompiler, and also whatever clang incompatibilities exist in clisp need to be fixed.

wanghuan1406, I cannot see from the log where this compiler choice is being set, because this was not a clean build. Please clean and try again and attach the new mail.log file.

Version 0, edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (next)

Changed 10 years ago by wanghuan1406@…

Attachment: main.2.log added

main1.log

comment:2 in reply to:  1 Changed 10 years ago by wanghuan1406@…

Replying to ryandesign@…:

MacPorts deliberately ignores environment variables you set on the command line, so that won't help.

We need to remove the -R flag from wherever it's being inserted. It has never been supported, using it has been printing a warning for some time, and now with the latest clang it is an error to attempt to use it.

The portfile says clang is blacklisted, but doesn't say why exactly:

# Likely a project bug
# TODO: Report upstream and provide a link to the bug report here.
compiler.blacklist *clang*

Note from the attached log that the port is erroneously using /usr/bin/cc; as of Xcode 5, that'll be clang. The port should be UsingTheRightCompiler, and also whatever clang incompatibilities exist in clisp need to be fixed.

wanghuan1406, I cannot see from the log where this compiler choice is being set, because this was not a clean build. Please clean and try again and attach the new main.log file.

hi ryandesign

thanks for your reply, i've cleaned and re-build it.

yes, /usr/bin/cc is symbol link file to /usr/bin/clang,

wh1406@Wangs-iMac.local ~ $ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix

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

Ok, so your log says:

:notice:configure --->  Configuring clisp
:debug:configure Using compiler 'System cc'
:debug:configure Executing org.macports.configure (clisp)
:debug:configure Environment:
CC='/usr/bin/cc -m32'

So the real question is: why has MacPorts decided to use "System cc" as the compiler? Only clang is blacklisted by the port. MacPorts should have picked the next-best compiler, llvm-gcc42. That's what it does on my Mavericks system.

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

Reading the code in src/port1.0/portconfigure.tcl, it looks like compiler.fallback gets set to "cc" if $xcodeversion is "none" or "". I haven't looked where that variable is set, but indeed the first line of your log is:

:warn:main Xcode does not appear to be installed; most ports will likely fail to build.

And that message should have been printed in your terminal as well. This suggests you have not installed Xcode. Please install it, then clean the port and try again.

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

Replying to ryandesign@…:

Reading the code in src/port1.0/portconfigure.tcl, it looks like compiler.fallback gets set to "cc" if $xcodeversion is "none" or "". I haven't looked where that variable is set, but indeed the first line of your log is:

:warn:main Xcode does not appear to be installed; most ports will likely fail to build.

And that message should have been printed in your terminal as well. This suggests you have not installed Xcode. Please install it, then clean the port and try again.

it works now :) , after installed Xcode, the default compiler changes to llvm-gcc42 .

Thank you very much :)

comment:6 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 10 years ago by adexter@…

I started receiving this error about the unsupported -R flag after upgrading to Yosemite and Xcode 6.1. It looks like the -R flag is coming from src/configure in the project. I'm attaching my simple patch which enabled me to build.

Changed 10 years ago by adexter@…

Attachment: patch-src_configure.diff added

Remove -R flag from src/configure.

comment:8 Changed 10 years ago by easye

Resolution: fixed
Status: newclosed

The patch is now conditionally included on OS X 10.10 or greater.

Thanks for the help.

Fixed in r127015.

comment:9 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

In 17f1f03f44751d0994f3f1f39dc1be69f71b42b7/macports-ports:

clisp: Disable rpath on macOS the right way

Fixes build on OS X 10.9 with Xcode 6.1 and later.

See: #43815

Note: See TracTickets for help on using tickets.