I think Dirk was just showing me an example of how to branch on OS, which
would be relevant in the event that adding the 's' was harmful.  In this
case it sounds like adding the 's' is the right path forward, which is the
advice I was hoping for.  Thank you both!

On Wed, Dec 20, 2023 at 12:51 PM Simon Urbanek <simon.urba...@r-project.org>
wrote:

> This has nothing to do with Steven's question since he is creating a
> *static* library whereas install_name_tool changes install name ID entry of
> a *dynamic* library. Also the data.table example is effectively a no-op,
> because changing the ID makes no difference as it can't be linked against
> directly anyway. [In general, taking advice from data.table regarding macOS
> doesn't strike me as wise given that the authors can't even get their
> package to work properly on macOS.]
>
> Cheers,
> Simon
>
>
> > On 21/12/2023, at 8:42 AM, Dirk Eddelbuettel <e...@debian.org> wrote:
> >
> >
> > On 20 December 2023 at 11:10, Steven Scott wrote:
> > | The Boom package builds a library against which other packages link.
> The
> > | library is built using the Makevars mechanism using the line
> > |
> > | ${AR} rc $@ $^
> > |
> > | A user has asked me to change 'rc' to 'rcs' so that 'ranlib' will be
> run on
> > | the archive.  This is apparently needed for certain flavors of macs.
> I'm
> > | hoping someone on this list can comment on the portability of that
> change
> > | and whether it would negatively affect other platforms.  Thank you.
> >
> > Just branch for macOS.  Here is a line I 'borrowed' years ago from
> data.table
> > and still use for packages needed to call install_name_tool on macOS.
> You
> > could have a simple 'true' branch of the test use 'rcs' and the 'false'
> > branch do what you have always done.  Without any portability concerns.
> >
> > From
> https://github.com/Rdatatable/data.table/blob/master/src/Makevars.in#L14
> > and indented here for clarity
> >
> >        if [ "$(OS)" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then
> \
> >           install_name_tool -id data_table$(SHLIB_EXT)
> data_table$(SHLIB_EXT); \
> >        fi
> >
> > Dirk
> >
> > --
> > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> >
> > ______________________________________________
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to