Please don't yell at me...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Please don't yell at me...

Keith Weintraub-2
Folks,
   I posted the message below to the users list but got no response.  
Maybe you developers are more knowledgeable or inclined to reply.

Sorry in advance for posting to both places.

Thanks in advance for any help you can give me,
KW


> Can't debug QuantLib Bond example on Mac in Eclipse.
> From: Keith Weintraub <kw1958 <at> gmail.com>
> Subject: Can't debug QuantLib Bond example on Mac in Eclipse.
> Newsgroups: gmane.comp.finance.quantlib.user
> Date: 2009-03-02 15:31:35 GMT
>
> Folks,
>   I have more info now on my problem. Just not enough for me to  
> solve it with my limited knowledge of this environment.
>
> To reiterate my situation I have successfully built Boost and  
> QuantLib. The QuantLib example program Bonds runs fine from the  
> command line.
>
> I have taken the Bonds example code (exactly) and rebuilt it  
> successfully as a separate project in eclipse (just as if I was  
> writing the code myself). Both the Debug and Release versions build  
> and run successfully (with identical output) from the command line.
>
> I can even run the release version successfully from within Eclipse.
>
> When I try to run the code in the debugger in Eclipse I get the  
> following:
>
>     [Switching to process 574 local thread 0x2d03]
>     Re-enabling shared library breakpoint 1
>     /SourceCache/gdb/gdb-962/src/gdb/dwarf2read.c:7593: internal-
> error: could not find partial DIE in cache
>
>     A problem internal to GDB has been detected,
>     further debugging may prove unreliable.
>
>
> and the debugger will not run.
>
> Any help you can give me with this would be greatly appreciated.
>
> Thanks,
> KW


--


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Please don't yell at me...

Andreas Spengler-2
Keith,

Keith Weintraub schrieb:

>> I have taken the Bonds example code (exactly) and rebuilt it  
>> successfully as a separate project in eclipse (just as if I was  
>> writing the code myself). Both the Debug and Release versions build  
>> and run successfully (with identical output) from the command line.

Have you debugged the example with gdb on the command line?


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Please don't yell at me...

Keith Weintraub-2
In reply to this post by Keith Weintraub-2

Keith Weintraub <kw1958 <at> gmail.com> writes:

>
> Folks,
>    I posted the message below to the users list but got no response.  
> Maybe you developers are more knowledgeable or inclined to reply.
>
> Sorry in advance for posting to both places.
>
> Thanks in advance for any help you can give me,
> KW
>

.... Omitted original users list post that was attached here.


I have some more info. Here is the error message that I captured from running
gdb on the command line (thanks for the suggestion Andreas):

   [Switching to process 545 local thread 0x2d03]
   Re-enabling shared library breakpoint 1
   /SourceCache/gdb/gdb-962/src/gdb/dwarf2read.c:7593: internal-error: could
   not find partial DIE in cache

   A problem internal to GDB has been detected,
   further debugging may prove unreliable.

After that the debugger is dead.

As always thanks in advance for the much needed help,
KW





------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

QuantLib linking causes debugger crash on OS X whether QuantLib used or not.

Keith Weintraub-2
OK. Here is more information:

I have compiled and linked the following program:

   #include <iostream>
   #include <string>

   int main()
   {

    std::cout << "Hello GDB How Art Thee" << std::endl;
   }


Note that QuantLib is not used anywhere. If I link with -lQuantLib gdb crashes.
Whether I use gdb in Eclipse or out of Eclipse it crashes.

If I just run the program from the command line it runs fine whether the program
was linked with QuantLib or not.

If you haven't seen any of my posts before please note that I have the same
problem whether the program uses QuantLib or not.

I am very puzzled but I am sure one of you smart people has the answer.

Thanks for your time,
KW




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib linking causes debugger crash on OS X whether QuantLib used or not.

tamasrs (Bugzilla)
Hello Keith,

I cannot reproduce your problem, please make sure you are using the newest
xcode (it comes with updated gdb, gcc etc):

http://developer.apple.com/technology/xcode.html

Also please compile your example code from terminal instead of eclipse.
(eclipse may use a special flag which cause the problem ) with -g flag  only  
eg:

g++ -o prgname  -g prgsrc.cc -L/usr/local/lib -lQuantLib
and see if gdb is working or not with the produced binary.

Best,

Tamas

On Wednesday 04 March 2009 22:43:28 Keith Weintraub wrote:

> OK. Here is more information:
>
> I have compiled and linked the following program:
>
>    #include <iostream>
>    #include <string>
>
>    int main()
>    {
>
>     std::cout << "Hello GDB How Art Thee" << std::endl;
>    }
>
>
> Note that QuantLib is not used anywhere. If I link with -lQuantLib gdb
> crashes. Whether I use gdb in Eclipse or out of Eclipse it crashes.
>
> If I just run the program from the command line it runs fine whether the
> program was linked with QuantLib or not.
>
> If you haven't seen any of my posts before please note that I have the same
> problem whether the program uses QuantLib or not.
>
> I am very puzzled but I am sure one of you smart people has the answer.
>
> Thanks for your time,
> KW
>
>
>
>
> ---------------------------------------------------------------------------
>--- Open Source Business Conference (OSBC), March 24-25, 2009, San
> Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing
> the Enterprise -Strategies to boost innovation and cut costs with open
> source participation -Receive a $600 discount off the registration fee with
> the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib linking causes debugger crash on OS X whether QuantLib used or not.

Keith Weintraub-2
Tamas,
  Here is what I did and got the same result.


 

 

 


qlTest.cpp and qlTest2.cpp are the same program.

The difference between the two build scripts is obvious. All references to QuantLib in qlTestBuild2.sh have been taken out.

The executables both run fine from the command line.

The qlTest program crashes the debugger: 


The info.plist files (I don't know what Mac OSX does with the "*.dSYM" directory structure) differ so I am including them here as well:



 (I hope the naming is obvious here).

The only think I can think of that might be a little different is that I "built" boost. In other words I did the section 5.1 part of the boost installation page.

I have checked and I think I have the latest version of Xcode as well: 


Here is the g++ version info:

/Users/kw/MyC++/boost_1_38_0 $ g++ -dumpversion
4.0.1

/Users/kw/MyC++/boost_1_38_0 $ g++ -version
i686-apple-darwin9-g++-4.0.1: no input files

And the gdb version info is in the debuggerCrash.txt file above.

If there is something else that will help you help me please let me know.

I really appreciate the help. I am also posting this to the quantlib-dev list (if it goes through).

Thanks so much for your time and in advance for any future help!

KW



--

On Mar 5, 2009, at 3:45 AM, Tamas Sashalmi wrote:

Hello Keith,

I cannot reproduce your problem, please make sure you are using the newest
xcode (it comes with updated gdb, gcc etc):

http://developer.apple.com/technology/xcode.html

Also please compile your example code from terminal instead of eclipse.
(eclipse may use a special flag which cause the problem ) with -g flag  only  
eg:

g++ -o prgname  -g prgsrc.cc -L/usr/local/lib -lQuantLib
and see if gdb is working or not with the produced binary.

Best,

Tamas


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

qlTest.cpp (253 bytes) Download Attachment
qlTest2.cpp (253 bytes) Download Attachment
qlTestBuild.sh (114 bytes) Download Attachment
qlTestBuild2.sh (63 bytes) Download Attachment
debuggerCrash.txt (1K) Download Attachment
Info.plist (778 bytes) Download Attachment
Info2.plist (779 bytes) Download Attachment
Xcode.jpg (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib linking causes debugger crash on OS X whether QuantLib used or not.

tamasrs (Bugzilla)
Hello Keith,

you did not install QuantLib to its default location eg : /usr/local/lib

please go to your QuatLib folder:
cd /Users/kw/MyC++/QuantLib-0.9.7

and type:
sudo make install
(after giving your password the libs will be installed)
and compile your source with :

g++ -o qlTest  -g -I/usr/local/include qlTest.cpp -L/usr/local/lib  -lQuantLib

OR

if you don't want to install system wide (no need password) do:
cd /Users/kw/MyC++/QuantLib-0.9.7
../configure --prefix=/Users/kw/MyC++/QuantLib-0.9.7/build
make
make install

the QuantLib libs will be in : /Users/kw/MyC++/QuantLib-0.9.7/build/libs
and the includefiles will be in : /Users/kw/MyC++/QuantLib-0.9.7/build/includes

so compile your code with:

g++ -o qlTest  -g -I/Users/kw/MyC++/QuantLib-0.9.7/build/includes qlTest.cpp -L/Users/kw/MyC++/QuantLib-0.9.7/build/libs -lQuantLib

I hope this will help,

Best,

Tamas

On Thursday 05 March 2009 13:54:47 Keith Weintraub wrote:

> Tamas,
>    Here is what I did and got the same result.
>
>
>
> qlTest.cpp and qlTest2.cpp are the same program.
>
> The difference between the two build scripts is obvious. All  
> references to QuantLib in qlTestBuild2.sh have been taken out.
>
> The executables both run fine from the command line.
>
> The qlTest program crashes the debugger:
>
> The info.plist files (I don't know what Mac OSX does with the "*.dSYM"  
> directory structure) differ so I am including them here as well:
>
>   (I hope the naming is obvious here).
>
> The only think I can think of that might be a little different is that  
> I "built" boost. In other words I did the section 5.1 part of the  
> boost installation page.
>
> I have checked and I think I have the latest version of Xcode as well:
>
> Here is the g++ version info:
>
> /Users/kw/MyC++/boost_1_38_0 $ g++ -dumpversion
> 4.0.1
>
> /Users/kw/MyC++/boost_1_38_0 $ g++ -version
> i686-apple-darwin9-g++-4.0.1: no input files
>
> And the gdb version info is in the debuggerCrash.txt file above.
>
> If there is something else that will help you help me please let me  
> know.
>
> I really appreciate the help. I am also posting this to the quantlib-
> dev list (if it goes through).
>
> Thanks so much for your time and in advance for any future help!
>
> KW
>
>
>
> --
>
> On Mar 5, 2009, at 3:45 AM, Tamas Sashalmi wrote:
>
> > Hello Keith,
> >
> > I cannot reproduce your problem, please make sure you are using the  
> > newest
> > xcode (it comes with updated gdb, gcc etc):
> >
> > http://developer.apple.com/technology/xcode.html
> >
> > Also please compile your example code from terminal instead of  
> > eclipse.
> > (eclipse may use a special flag which cause the problem ) with -g  
> > flag  only
> > eg:
> >
> > g++ -o prgname  -g prgsrc.cc -L/usr/local/lib -lQuantLib
> > and see if gdb is working or not with the produced binary.
> >
> > Best,
> >
> > Tamas
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev