Cant get Quantlib to work with fedora 5 and gcc 4.1.1

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

Cant get Quantlib to work with fedora 5 and gcc 4.1.1

Max Giolitti
Hello,
I cant compile a simple hello world with the #include <ql/quantlib.hpp> at the top.
I traced the error to this line in a boost file #include <utility>. Can someone help?

I did yuminstall quantlib and the boost libraries are already in the system.
thx for your help
Max.

P.S. I noticed that "creating a business model for quantLib" was put under minor tasks to complete. It is not so simple! I can probably help there.


All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

eric ehlers
Hi Max,

I use QL (version 0.3.13) on FC5 with gcc 4.

On 9/8/06, Max Giolitti <[hidden email]> wrote:
> I traced the error to this line in a boost file #include <utility>.

What was the error message?

> I did yuminstall quantlib and the boost libraries are already in the system.

What version of QuantLib and boost do you have?

Regards,
Eric


Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

Max Giolitti
Thank you Eric. (ccing all the alias) I am using 0.3.13 (although yum says .14...) for boost I am using the version in fedora or the 33, i tried both.
This is the error:
In file included from /usr/include/boost/config.hpp:40,
                 from /usr/include/ql/qldefines.hpp:28,
                 from QL.c:18:
/usr/include/boost/config/select_stdlib_config.hpp:20:19: error: utility: No such file or directory

I traced it back to a boost include file that just says (among other things)
#include <utility>.
Not sure how to cleanly configure this.
Thx

eric ehlers <[hidden email]> wrote:
Hi Max,

I use QL (version 0.3.13) on FC5 with gcc 4.

On 9/8/06, Max Giolitti wrote:
> I traced the error to this line in a boost file #include .

What was the error message?

> I did yuminstall quantlib and the boost libraries are already in the system.

What version of QuantLib and boost do you have?

Regards,
Eric


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.
Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

Luigi Ballabio
On Fri, 2006-09-08 at 07:51 -0700, Max Giolitti wrote:
> Thank you Eric. (ccing all the alias) I am using 0.3.13 (although yum
> says .14...) for boost I am using the version in fedora or the 33, i
> tried both.
> This is the error:
> In file included from /usr/include/boost/config.hpp:40,
>                  from /usr/include/ql/qldefines.hpp:28,
>                  from QL.c:18:
> /usr/include/boost/config/select_stdlib_config.hpp:20:19: error:
> utility: No such file or directory

Strange. <utility> is a standard header---it should come with your
compiler. What happens if you write a simple file, say,

======test.cpp====
#include <utility>

int main() { return 0; }
==================

and execute `g++ test.cpp` from a shell?

Later,
        Luigi



----------------------------------------

The purpose of abstraction is not to be vague, but to create a new
semantic level in which one can be absolutely precise.
-- W.E. Dijkstra




Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

Max Giolitti
I get an error also with the simple program luigi suggests.
luigi.c:1:19: error: utility: No such file or directory
.the original error was with the simple program
#include <stdio.h>
#include <ql/quantlib.hpp>
main()
{
          printf ("Hello Linux World!\n");
}
I looked inside the include directories, and I do see a utility directory. Given that to get this far it had to see the boost includes.
this is from config.hpp:
// if we don't have a std library config set, try and find one:
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)
#  include <boost/config/select_stdlib_config.hpp>
#endif
now select stdlib has this:
#include <utility>

I didn't want to modify the boost core files by putting a path, I assume there is something I havent configured.
thanks for the help!

Luigi Ballabio <[hidden email]> wrote:
On Fri, 2006-09-08 at 07:51 -0700, Max Giolitti wrote:
> Thank you Eric. (ccing all the alias) I am using 0.3.13 (although yum
> says .14...) for boost I am using the version in fedora or the 33, i
> tried both.
> This is the error:
> In file included from /usr/include/boost/config.hpp:40,
> from /usr/include/ql/qldefines.hpp:28,
> from QL.c:18:
> /usr/include/boost/config/select_stdlib_config.hpp:20:19: error:
> utility: No such file or directory

Strange. is a standard header---it should come with your
compiler. What happens if you write a simple file, say,

======test.cpp====
#include

int main() { return 0; }
==================

and execute `g++ test.cpp` from a shell?

Later,
Luigi



----------------------------------------

The purpose of abstraction is not to be vague, but to create a new
semantic level in which one can be absolutely precise.
-- W.E. Dijkstra




Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

eric ehlers
Hi Max

On 9/8/06, Max Giolitti <[hidden email]> wrote:
> I get an error also with the simple program luigi suggests.

OK, so there's a problem with the configuration of your compiler.
This is unrelated to QuantLib or Boost.

> luigi.c:1:19: error: utility: No such file or directory

Luigi advised you to name the file test.cpp, not luigi.c as you have
above.  I wonder if you're mistakenly picking up a C environment
rather than a C++ environment?

For me, using the test code suggested by Luigi, whether I name the
file test.cpp or test.c, it compiles fine using the "g++" command.
If, however, I compile instead with the  "gcc" command, I get the
exact same error message as you:

$ gcc test.c
test.c:1:19: error: utility: No such file or directory

Please confirm - what result do you get when performing the test
exactly as described by Luigi - naming the file "test.cpp" (even
though the extension seems not to matter) and using the command "g++
test.cpp"?

(gcc is the compiler, and g++ is a front end which configures the
environment for C++).

My FC5 installation includes gcc version 4.1.0.  On my machine the
location of the "utility" standard header file is:

/usr/include/c++/4.1.0/utility

That's a the standard system include directory, i.e. g++ is configured
such that "include <utility>" finds the above file automatically with
no need to specify the location of the file.

How does the above compare to your environment?

When I installed FC from the CDs, I chose to install the developer
tools, and all of the above was configured automatically.  How did you
install gcc, did you follow a similar procedure, or did you start
without gcc and later install it manually?

Regards,
Eric


Reply | Threaded
Open this post in threaded view
|

Re: Cant get Quantlib to work with fedora 5 and gcc 4.1.1

Max Giolitti
Thanks Eric, by using g++ I was able to make some progress. Now I have the following problem. Using
====hello.cpp=========
#  include <ql/quantlib.hpp>

int main()
{
  printf("Hello World of Linux\n");
  exit(0);
}

and compiling using g++ -o hello hello.cpp I get a large list of errors. The first 2 are

/tmp/ccgkrAL1.o: In function `boost::shared_ptr<QuantLib::Observable>::operator->() const':
hello.cpp:(.text._ZNK5boost10shared_ptrIN8QuantLib10ObservableEEptEv[boost::shared_ptr<QuantLib::Observable>::operator->() const]+0x2f): undefined reference to `boost::assertion_failed(char const*, char const*, char const*, long)'
/tmp/ccgkrAL1.o: In function `boost::shared_ptr<QuantLib::DiscretizedAsset>::operator->() const':
hello.cpp:(.text._ZNK5boost10shared_ptrIN8QuantLib16DiscretizedAssetEEptEv[boost::shared_ptr<QuantLib::DiscretizedAsset>::operator->() const]+0x2f): undefined reference to `boost::assertion_failed(char const*, char const*, char const*, long)'

any wisdom? Sorry for all the amateur questions!

I installed the compiler automatically. The boost libraries where installed automatically, although I didn't know this at the time so I downloaded them and did
bjam "-sTOOLS=gcc" install

on top of what I had.

Max
eric ehlers <[hidden email]> wrote:
Hi Max

On 9/8/06, Max Giolitti wrote:
> I get an error also with the simple program luigi suggests.

OK, so there's a problem with the configuration of your compiler.
This is unrelated to QuantLib or Boost.

> luigi.c:1:19: error: utility: No such file or directory

Luigi advised you to name the file test.cpp, not luigi.c as you have
above. I wonder if you're mistakenly picking up a C environment
rather than a C++ environment?

For me, using the test code suggested by Luigi, whether I name the
file test.cpp or test.c, it compiles fine using the "g++" command.
If, however, I compile instead with the "gcc" command, I get the
exact same error message as you:

$ gcc test.c
test.c:1:19: error: utility: No such file or directory

Please confirm - what result do you get when performing the test
exactly as described by Luigi - naming the file "test.cpp" (even
though the extension seems not to matter) and using the command "g++
test.cpp"?

(gcc is the compiler, and g++ is a front end which configures the
environment for C++).

My FC5 installation includes gcc version 4.1.0. On my machine the
location of the "utility" standard header file is:

/usr/include/c++/4.1.0/utility

That's a the standard system include directory, i.e. g++ is configured
such that "include " finds the above file automatically with
no need to specify the location of the file.

How does the above compare to your environment?

When I installed FC from the CDs, I chose to install the developer
tools, and all of the above was configured automatically. How did you
install gcc, did you follow a similar procedure, or did you start
without gcc and later install it manually?

Regards,
Eric


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail.