Only export relevant symbols to shared library. - #303
Merged
Conversation
troels
force-pushed
the
hide-default-symbols
branch
3 times, most recently
from
November 25, 2019 01:09
ea0ce88 to
335acaa
Compare
Currently the shared library are exporting all functions, some of which collides with other DBI drivers, such as RPostgres. Change default symbol visibility to hidden and export only functions that should be reachable from the R code, either via the R macro attribute_visible (in C) or the Rcpp macro RcppExport (in C++).
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I have problems using RPostgres and RSQLite from the same R-process.
I get stacktraces such as these:
After wading through the code with gdb it appears that RSQLite's result_release collides with RPostgres' result_release in their respective shared libraries. The best way to fix that is probably to only export symbols from the shared library which will be needed by R.
So I suggest changing default symbol visibility to hidden, so the two libraries can coexist peacefully.
See here for more information:
RcppCore/Rcpp#720