Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with CRAN-built packages in float/rsparse #32

Open
wrathematics opened this issue Jul 15, 2019 · 3 comments
Open

Issue with CRAN-built packages in float/rsparse #32

wrathematics opened this issue Jul 15, 2019 · 3 comments

Comments

@wrathematics
Copy link
Owner

Noted here dselivanov/rsparse#25

@dselivanov
Copy link
Contributor

we can try similar hook as data.table does - run install_name_tool after installation is done.

@dselivanov
Copy link
Contributor

I've written to r-sig-mac mailing list. Here is answer from Simon:

See R-exts 5.8: you cannot link directly to other package or its libraries. It is not possible is a portable way across platforms for many reasons including those that you are hitting here. If a package exposes some C-level functionality to other packages, you can use it and R provides a way to obtain access to the function - see R-exts 5.4.3.
There are ways to make a static library available, because that allows your package to be installed without actually requiring the presence of the other package at install time. But, again, the package has to make it explicitly available since you cannot guarantee that your package won't break as it's technically internal to the other package. That said, it seems the there is a bug in float since it provides the wrong flags to link against its library (float:::ldflags()). It should really just use system.file("libs","libfloat.a",package="float") - you may want to contact the maintainer of float about that. Flags cannot be hard-coded at install time because the package can be installed in any location, moreover staged install is preformed in a direction separate from the R library anyway.

So I believe we need to try with a static library.

@wrathematics
Copy link
Owner Author

Interesting, thanks. I don't think float:::ldflags(static=TRUE) is bugged (probably too complicated though). It should work as-is. I'll take a look this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants