tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Math/R package fix



We are noticing this just now because the flag is buried in a file that is used by make almost never, i.e., only if the code within an R package is trying to compile other code itself.  Clearly, there are not many packages that do this or we would have seen something sooner.  I have only encountered one package (R-nimble) that does this.

The original version of the patch would never have worked on any system, though.  It was missing a comma between the -R and the path.  So yes, there are extremely few packages that actually use this and I’m not surprised that it escaped notice.  Nevertheless, it needs fixing.

That said, there is one package I would like to have work.  When I fix the missing comma issue, MacOS clang complains about -R being unknown.  That was the basis for suggesting -rpath, which does work.  I also thought -rpath worked everywhere else.  If not, then we need distinct patches or something.

My MacOS system complains as follows:

# clang -v
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

# clang -Wl,-R,/tmp /dev/null
ld: unknown option: -R

Cheers,
Brook

> On Feb 17, 2022, at 2:38 PM, Dr. Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost> wrote:
> 
> Am Thu, 17 Feb 2022 15:21:15 -0500
> schrieb Greg Troxel <gdt%lexort.com@localhost>: 
> 
>> I am slightly fuzzy on this, but I see -R as the traditional way, which
>> works most places, and -rpath as the new way.
> 
> Yes, -Wl,-R/path is perfectly fine. -rpath[space]/path or -rpath=/path
> is an alterantive, but I do prefer -R for the symmetry to -L.
> 
> I'm not sure -rpath is accepted everywhere if -R isn't. It's the
> preferred way of GNU ld, but it added -R support to be compatible. Is
> it a given fact that -R doesn't work on MacOS? And we notice this just
> now?
> 
> 
> Alrighty then,
> 
> Thomas
> 
> -- 
> Dr. Thomas Orgis
> HPC @ Universität Hamburg



Home | Main Index | Thread Index | Old Index