After upgrading to ruby-1.8.0, I begin to experience a new problem.
In ruby-1.6.*, the host-os is linux, which is what the setup.rb expects. But in ruby-1.8.0, the host-os is called linux-gnu, which really ruins the day for the setup.rb. I can modify the source with the RPM package. But, this might cause problem for the future release. Any patch from the ruby gurus on this list? Thanks. Liguo |
Hi Liguo,
On 2003.10.31 22:54, Liguo Song wrote: > After upgrading to ruby-1.8.0, I begin to experience a new problem. > > In ruby-1.6.*, the host-os is linux, which is what the setup.rb > expects. But in ruby-1.8.0, the host-os is called linux-gnu, which > really ruins the day for the setup.rb. Hmm. Maybe a Red Hat thing---it's still 'linux' in ruby 1.8.0 on Debian. It's a small fix anyway---wherever it says when 'linux' change it to when 'linux','linux-gnu' I already committed it to cvs. Thanks, Luigi |
I encountered another problem with QuantLib-Ruby with ruby-1.8.
In the setup.rb, there is Config::CONFIG["rubylibdir"].gsub("^#{oldPrefix}","") This line of code will give the following warning during the installation process: warning: string pattern instead of regexp; metacharacters no longer effective The effect of this problem is that the oldPrefix is not cleared as intended. It works OK with ruby-1.6 but not ruby-1.8. Some changes in ruby must caused this problem. Can any experts in ruby offer any solution for this? Thanks. Liguo (Leo) |
It just became a fashion for me to reply myself. A bad habit. :(
This turn out to be another bug report. In ruby-1.8 and later (if there is), string and regex pattern cannot mix together any more in the gsub(). So, please replace the following two lines in setup.rb: archDir = Prefix + \ Config::CONFIG["archdir"].gsub("^#{oldPrefix}","") libDir = Prefix + \ Config::CONFIG["rubylibdir"].gsub("^#{oldPrefix}","") with the following: archDir = Prefix + \ Config::CONFIG["archdir"].gsub(/^#{oldPrefix}/,"") libDir = Prefix + \ Config::CONFIG["rubylibdir"].gsub(/^#{oldPrefix}/,"") The latter format is support by both ruby 1.6 and 1.8. I hope this would solve the last problem with QuantLib-Ruby. Thanks for your guys' patience. :) Liguo (Leo) On Wed, 5 Nov 2003, Liguo Song wrote: > I encountered another problem with QuantLib-Ruby with ruby-1.8. > > In the setup.rb, there is > Config::CONFIG["rubylibdir"].gsub("^#{oldPrefix}","") > This line of code will give the following warning during the > installation process: > warning: string pattern instead of regexp; metacharacters no > longer effective > > The effect of this problem is that the oldPrefix is not cleared as > intended. It works OK with ruby-1.6 but not ruby-1.8. Some changes in > ruby must caused this problem. Can any experts in ruby offer any > solution for this? > > Thanks. > > > Liguo (Leo) > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Quantlib-dev mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |
On 2003.11.05 07:44, Liguo Song wrote:
> It just became a fashion for me to reply myself. A bad habit. :( > > This turn out to be another bug report. > > In ruby-1.8 and later (if there is), string and regex pattern cannot > mix together any more in the gsub(). Ok, I fixed this for 0.3.4 > In the setup.scm, the usage message is still talking about mzscheme. > It is a good source of historical information, but need correction. Tee-hee. I fixed this as well. > Here is another problems that I found in QuantLib-Guile: > "guile -s setup.scm wrap" reports "./SWIG/cashflows.i:27: Unable to > find 'scheduler.i'" Hmm. The file didn't get included in the tarball. It it fixed for 0.3.4. As for 0.3.3, you can work around it by taking scheduler.i from any of the other modules (Python, Ruby, MzScheme) and copying it together with the other .i files in QuantLib-Guile. > Also, I am not able to specify --prefix for the installation. Is > there an solution to this? Not a quick one---I'll have to code it into setup.scm. I'll see what I can do. Later, Luigi |
Free forum by Nabble | Edit this page |