-
Notifications
You must be signed in to change notification settings - Fork 50
-
Notifications
You must be signed in to change notification settings - Fork 50
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
RQuantLib 0.4.5 doesn't compile on Ubuntu 16.04 #119
Comments
The segfault is highly symptomatic of a binary mismatch in one if the dependencies. Maybe the Boost version you use now is different from the Boost version used to compile QuantLib, maybe Rcpp needs a recompilation, maybe something else. We support this software and make sure it generally works, but we cannot support random combinations of components. It works on 18.04 (which I use), it works for Debian unstable/testing, it works on Ubuntu "trusty" (as used for Travis) and it works on all machines that CRAN uses for testing. Which suggests something may be wrong in your corner. |
@eddelbuettel Thanks for looking into this. I have a Ubuntu 18.04 Windows Sub-system for Linux, which does work. However, it's really puzzling that on the same Ubuntu 16.04 machine, RQuantLib v0.4.4 works just fine, but v0.4.5 doesn't. The boost version and QuantLib version are the same for both installation. I tried on R 3.4.4 initially, it didn't work. So I tried again after updating to R 3.5.1, same exact result. I have tried everything I can think of, that's why I am asking for help here. I am a bit hesitant to upgrade my 16.04 to 18.04 at this point, and probably would just keep using v0.4.4 for now. |
Can you be more explicit and say which of You insist on using an outdated distribution release with current application releases. That may require some work on your end. But the good news is that this generally works when the components match. |
@eddelbuettel |
Beats me. Please see if you can debug it. It works on all platforms we (and CRAN) test on. |
@eddelbuettel Debugging R/Rcpp package is beyond me at this point, so I might just move on to 18.04. I am running Ubuntu 16.04 as virtual machines (vmware and virtualbox), not sure whether this matters. As the first step, I upgraded one of my 16.04 VM to 18.04, RQuantLib 0.4.4 works out of the box with R 3.4.4. I then upgraded R to 3.5.1, it works too. Finally I upgrade to RQuantLib 0.4.5, no issues at all. I plan to upgrade my work ubuntu VM soon. Thanks for looking into this! I will close this issue unless you want to keep it open and let other R/Rcpp experts chime in. |
I will close this. It is a non-issue as RQL works on 18.04 and all other current systems. |
I also have the same issue, using virrtualbox + ubuntu 16.04 This is what I get at the end: installing to /home/steliox1604/R/x86_64-pc-linux-gnu-library/3.4/RQuantLib/libs *** caught segfault *** Traceback:
|
If you used Ubuntu 16.04 with its versions of R, QuantLib and RQuantLib it would just work. If you decide to mix and match you most likely need to recompile all components. So, for startrts, which versions of
are you using, and where did you get them from? |
Thank you,
When I try RQuant from CRAN/Rstudio, I get a different final error message: /usr/bin/ld: /usr/local/lib/libQuantLib.a(cashflow.o): relocation R_X86_64_32S against `_ZNK8QuantLib8CashFlow12exCouponDateEv' can not be used when making a shared object; recompile with -fPIC
|
So you are mixing and matching across
Do you see why that can be a problem? In short, old Ubuntu can be made to work but it work. I have to do that each and every time for the Travis CI checks on GitHub which insist on even older Ubuntu releases. So my PPA there has some versions of QuantLib build for whatever I needed for Travis. But I have given up on that. I now use a simple Docker container running Debian testing so I get
For what it is worth I also offer a Docker run-time container there so it is all pre-made for you... Sadly I do not have the time to help with any and all crossed pairs of versions. If you have the patience to build QL from source you should be able to bend your 16.04 system in change. Good luck! |
You are absolutely right, thank you, I basically wanted to provide feedback from my VM. |
The thing is (some) people get upset when I point out the dissonance. You have Ubuntu 16.04. You use it because you like to be stable. It has packages for R, QuantLib and RQuantLib -- a simple But yes, it is older. So now wanting newest code on a 2+ years old 16.04 ... will have some friction. You can make it work but it is just that: work. Maybe just upgrade to 18.04 as a start? Food for thought. |
Of course. BTW, I also ran sudo apt-get install r-cran-rquantlib, like I said, following your wiki instructions {using synaptic} . |
The setting of Here is what I did:
|
Why? Upstream moved towards wider use of C++11 throughout QuantLib, see Luigi's series of blog posts. |
Just offering a quick and dirty fix for people who don't want to upgrade to 18.04 or who otherwise want to hack from source. I am all for C++11 in QuantLib. |
Upstream is not yet on C++11, as in "allowing C++11 features in the code" (the changes described in the blog posts are still on a branch) but it compiles successfully in C++11/C++14/C++17 mode, since they're part of the build matrix at https://travis-ci.org/lballabio/QuantLib. This said, I wouldn't exclude the possibility of ABI incompatibilities if some parts of the final link (e.g., the Boost libraries?) were compiled in C++03 mode and other parts in C++11 mode. |
Again, it is not our responsibility to ensure compilability under any and all options build and OS options, but I just glanced at my PPAs and under the older (pre R 3.5.*) scheme I still built QL 1.13 under Ubuntu 14.04 (for Travis) -- see https://launchpad.net/~edd/+archive/ubuntu/misc (and https://launchpad.net/~edd/+archive/ubuntu/r-3.5 for a more current one with QL 1.14 built for 18.04 and 18.10 -- my personal use too). I no longer need the build for 14.04 (or 16.04) as I switched Travis to using bespoke Docker containers based on Debian testing. So in a nutshell, I still recommended to get to the more current Ubuntu 18.04. |
I have tried many times to install RQuantLib 0.4.5, but kept getting core dump. I even reinstall boost and recompiled QuantLib, but it makes no difference. However, installation of version 0.4.4 worked just fine. What is so special about 0.4.5?
Following is my Ubuntu 16.04 system details.
R Console outputs during the package installation:
R Console output for successful installation of RQuantLib v0.4.4:
The text was updated successfully, but these errors were encountered: