-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Compile sundials with -fPIC to allow shared libraries to link #3076
Conversation
We also ran into this in BridgeStan I am not sure if doing it universally is the right thing to do, however, since for usages like CmdStan it is not necessary and can supposedly lead to slower assembly being generated |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Ah yeah I see. I've updated |
If that works for you I think that's how we should proceed for now |
Summary
When exposing Stan functions or model methods (log_prob, etc) in
cmdstanr
, R compiles a shared object and links to the CmdStan-built libraries.However this causes an error on Linux system where
-fPIC
is required for linking static libraries to shared libraries, and the user needs SUNDIALS/CVODES functions:Tests
N/A
Side Effects
N/A
Release notes
Added
-fPIC
toSUNDIALS
compilation flags so that downstream shared libraries can link against themChecklist
Copyright holder: Andrew Johnson
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested