Posted by
Chuck Swiger-4 on
Nov 18, 2009; 4:21pm
URL: http://quantlib.414.s1.nabble.com/building-on-Fedora-11-tp7036p7038.html
On Wed, 2009-11-18 at 11:01 +0100, Luigi Ballabio wrote:
> On Mon, 2009-11-16 at 15:42 -0500, Chuck Swiger wrote:
> > Got QuantLib-SWIG to build and Python runs the examples ok but Perl stil
> > segfaults.
>
> Yes, this has bugged me for a long time. Do you think you can find some
> time to try and debug it? (Or to reduce the error to a smaller,
> self-contained example we can send to the SWIG mailing list?)
>
> Luigi
>
>
Running perl in debug mode step-by-step it fails in the SWIG Perl
example (european-option.pl) on the $volatility line. Will look further
too.
--Chuck
------------------------------------------------------
[chuck@linux7 examples]$ strace -o error-2 perl -de 0
Loading DB routines from perl5db.pl version 1.3
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 0
DB<1> use QuantLib;
DB<2> $todaysDate = new QuantLib::Date(15, $QuantLib::May, 1998);
DB<3> QuantLib::Settings::instance()->setEvaluationDate($todaysDate);
DB<4> $settlementDate = new QuantLib::Date(17, $QuantLib::May, 1998);
DB<5> $cal1 = new QuantLib::Actual365Fixed;
DB<6> $riskFreeRate = new QuantLib::FlatForward($settlementDate,0.05,$cal1);
DB<7> $exercise = new QuantLib::EuropeanExercise(new QuantLib::Date(17,$QuantLib::May, 1999));
DB<8> $payoff = new QuantLib::PlainVanillaPayoff($QuantLib::Option::Put, 8.0);
DB<9> $underlying = new QuantLib::SimpleQuote(7.0);
DB<10> $cal2 = new QuantLib::Actual365Fixed;
<typo line>
DB<12> $volatility = new QuantLib::BlackConstantVol($todaysDate, new QuantLib::TARGET, 0.10, $
cal2);
Signal SEGV at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/QuantLib.pm line 283
1
QuantLib::TARGET::DESTROY('QuantLib::TARGET=HASH(0xa8deafc)') called at /usr/lib/perl5/5.
10.0/perl5db.pl line 641
eval {...} called at /usr/lib/perl5/5.10.0/perl5db.pl line 641
DB::eval called at /usr/lib/perl5/5.10.0/perl5db.pl line 3434
DB::DB called at -e line 1
tail of strace output:
stat64("/usr/lib/perl5/5.10.0/i386-linux-thread-multi/List/Util.pm", {st_mode=S_IFREG|0644, st_size=6698, ...}) = 0
open("/usr/lib/perl5/5.10.0/i386-linux-thread-multi/List/Util.pm", O_RDONLY|O_LARGEFILE) = 6
ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf861af8) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(6, 0, [0], SEEK_CUR) = 0
read(6, "# List::Util.pm\n#\n# Copyright (c)"..., 4096) = 4096
_llseek(6, 1066, [1066], SEEK_SET) = 0
_llseek(6, 0, [1066], SEEK_CUR) = 0
close(6) = 0
stat64("/usr/lib/perl5/5.10.0/i386-linux-thread-multi/auto/List/Util/Util.so", {st_mode=S_IFREG|0755, st_size=49080, ...}) = 0
stat64("/usr/lib/perl5/5.10.0/i386-linux-thread-multi/auto/List/Util/Util.bs", 0x9cec0c0) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.10.0/i386-linux-thread-multi/auto/List/Util/Util.so", O_RDONLY) = 6
read(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\33\0\0004\0\0\0\250"..., 512) = 512
fstat64(6, {st_mode=S_IFREG|0755, st_size=49080, ...}) = 0
mmap2(NULL, 51896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x39c000
mmap2(0x3a8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0xb) = 0x3a8000
close(6) = 0
write(5, "Signal SEGV at /usr/local/lib/per"..., 369) = 369
kill(15845, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users