[R-pkg-devel] portability question
Simon Urbanek
@|mon@urb@nek @end|ng |rom R-project@org
Wed Dec 20 21:51:22 CET 2023
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 <edd using 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 | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
More information about the R-package-devel
mailing list