Menu

Installation and usage of owlcpp

Help
2013-12-09
2013-12-13
  • Daria Stepanova

    Daria Stepanova - 2013-12-09

    Dear all,

    This question is about installation and usage of the owlcpp library.

    I am working on ubuntu 12.04, the versions of the required libraries are:

    -boost 1.55.0
    -FaCT++ -1.6.2
    -libxml 2-2.9.0
    -raptor 2-2.0.8
    -gcc 4.6.3

    The installation process was done according to the instructions provided in the build.txt file.
    The output of the commands listed in the end of the build.txt file is as follows:

    1). b2 release

    link.jam: No such file or directory
    ...patience...
    ...patience...
    ...patience...
    ...found 10580 targets...

    2). b2 debug test

    link.jam: No such file or directory
    ...patience...
    ...patience...
    ...patience...
    ...found 15027 targets...

    3). b2 release api-py

    link.jam: No such file or directory
    notice: could not find main target api-py
    notice: assuming it is a name of file to create.
    don't know how to make <e>api-py
    ...found 1 target...
    ...can't find 1 target...

    4). b2 release test-py

    link.jam: No such file or directory
    ...patience...
    ...patience...
    ...patience...
    ...found 17366 targets...
    ...updating 38 targets...
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_python.so.1.55.0
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_python.so
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_python.so.1
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_python.so.1.55
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libowlcpp_rdf.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/_rdf.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/terms.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_system.so.1.55.0
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_system.so
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_system.so.1
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_system.so.1.55
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_filesystem.so.1.55.0
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_filesystem.so
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_filesystem.so.1
    ln-UNIX /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libboost_filesystem.so.1.55
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libxml2-gcc46-2_9.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libraptor-gcc46-2_0.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libowlcpp_io.so
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/io_catalog.o
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/io.o
    gcc.link.dll /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/_io.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/_io.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libfactpp_kernel-gcc46.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/libowlcpp_logic.so
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/logic.o
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/factpp_expression.o
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/factpp_kernel.o
    gcc.compile.c++ /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/factpp_expression_manager.o
    gcc.link.dll /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/gcc-4.6/release/_logic.so
    common.copy /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/owlcpp/_logic.so
    capture-output /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/import.test/gcc-4.6/release/import
    passed /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/import.test/gcc-4.6/release/import.test
    capture-output /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/rdf_1.test/gcc-4.6/release/rdf_1
    passed /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/rdf_1.test/gcc-4.6/release/rdf_1.test
    capture-output /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/io_1.test/gcc-4.6/release/io_1
    passed /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/io_1.test/gcc-4.6/release/io_1.test
    capture-output /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/logic_1.test/gcc-4.6/release/logic_1
    passed /home/dasha/Documents/owl-cpp/owlcpp/out/binding/python/test/logic_1.test/gcc-4.6/release/logic_1.test
    ...updated 38 targets...

    5). b2 --clean debug release

    link.jam: No such file or directory
    ...found 1 target...
    ...updating 1 target...
    common.Clean clean
    rm: cannot remove `/home/dasha/Documents/owl-cpp/owlcpp/out/temp': Is a directory

    rm -f "/home/dasha/Documents/owl-cpp/owlcpp/out/temp"
    

    ...failed common.Clean clean...
    ...failed updating 1 target...

    It seems that the installation process succeeded only partially. Therefore, my first question is:

    (1). Are the errors (notifications) from above critical for a proper use of the owlcpp?

    My ultimate goal is to use classes of owlcpp from another system. I started playing around with the files that are stored in owlcpp/apps. After a struggle with connecting the libraries the file owlcpp/apps/print_classes.cpp was successfully compiled. However, it is not clear how one can use the owlcpp library from a different project.

    Thus my second question is:

    (2). Can anyone provide guidelines on the issue of including the owlcpp library into a project? Owlcpp was not installed globally, thus the option -lowlcpp when compiling an external project will not help.

    Sorry if the question is trivial, my limited experience in building and working with big c++ projects does not allow to make fruitful use of the doxygen documentation generated as a result of one of the commends. Moreover, I did not manage to find any instructions on the use of owlcpp apart from build.txt file and information on the website.

    Any help is very much appreciated.
    Kindest regards
    Dasha

     

    Last edit: M Levin 2013-12-10
  • M Levin

    M Levin - 2013-12-10

    Hello Dasha,

    Please see below

    On Mon, Dec 9, 2013 at 5:43 AM, Daria Stepanova dashastepa@users.sf.net wrote:

    Dear all,

    --snip--

    1). b2 release

    link.jam: No such file or directory

    I started seeing a lot of this message with Boost 1.55.0. It seems harmless though.

    ...patience...
    ...patience...
    ...patience...
    ...found 10580 targets...

    This probably means that everything has been built at previous invocation of b2 release. The number of targets is about right.

    --snip--

    3). b2 release api-py

    It should be "b2 release owlcpp-py", actually. This is an error in build.txt (website too!). My bad. Will fix.

    4). b2 release test-py

    link.jam: No such file or directory
    ...patience...
    ...patience...
    ...patience...
    ...found 17366 targets...
    ...updating 38 targets...
    --snip--
    ...updated 38 targets...

    Everything worked here. The Python bindings from target owlcpp-py are also ready to use now.

    5). b2 --clean debug release

    link.jam: No such file or directory
    ...found 1 target...
    ...updating 1 target...
    common.Clean clean
    rm: cannot remove `/home/dasha/Documents/owl-cpp/owlcpp/out/temp': Is a
    directory

    rm -f "/home/dasha/Documents/owl-cpp/owlcpp/out/temp"

    ...failed common.Clean clean...
    ...failed updating 1 target...

    This is what I normally see as well, along with a long list of deleted files.

    Another way to clean is to delete directory out.

    It seems that the installation process succeeded only partially. Therefore,
    my first question is:

    Are the errors (notifications) from above critical for a proper use of the
    owlcpp?

    Nothing critical. All should work.

    My ultimate goal is to use classes of owlcpp from another system. To get
    started it is probably a good idea to try out small examples and see how
    they work.
    Such examples are provided in the folder owlcpp/apps. The compilation of
    print_classes.cpp resulted in a number of errors related to the library
    inclusions.
    The result of compilation is

    print_classes.cpp
    print_classes.cpp:12:39: fatal error: owlcpp/rdf/triple_store.hpp: No such
    file or directory
    compilation terminated.

    After copying the folder owlcpp/include/owlcpp to owlcpp/apps and compiling
    the file print_classes.cpp again, the result is as follows:

    In file included from print_classes.cpp:12:0:
    owlcpp/rdf/triple_store.hpp:8:44: fatal error:
    owlcpp/rdf/detail/map_traits.hpp: No such file or directory
    compilation terminated.

    Compilation with -I option does not resolve the issue.

    Sample applications are part of "release" target. They were compiled when you ran "b2 release". For example, I have
    owlcpp/out/apps/gcc-4.7/release/link-static/print_classes

    Thus my second question is:

    Can anyone provide guidelines on how to start using the cpp library? Which
    .cpp files should I start looking at first?

    The easiest is to use owlcpp with Boost.Build. Make sure your user-config.jam has a statement like
    constant OWLCPP : your_path/owlcpp 0.2.0 ;

    Create a project directory, copy print_classes.cpp to it. Inside project directory create file jamroot.jam with the following:

    use-project /owlcpp : $(OWLCPP[1]) ;
    use-project /boost : $(BOOST[1]) ;
    exe print_classes
    : #sources
    print_classes.cpp
    : #requirements
    <link>static
    <library>/owlcpp//io
    <library>/boost/program_options
    ;

    Run b2 inside your project directory.

    You can modify jamroot.jam to link against shared libraries and to use owlcpp//logic.

    If you see any error messages related to Doxygen target, remove lines 77 through 137 from owlcpp/jamroot.jam. I am fixing this issue shortly.

    To use owlcpp with other build systems, run b2 -d2 to see the exact compiler and linker options.

    Sorry if the question is trivial, my limited experience in building and
    working with big c++ projects does not allow to make fruitful use of the
    doxygen documentation generated as a result of one of the commends.
    Moreover, I did not manage to find any instructions on the use of owlcpp
    apart from build.txt file and information on the website.

    Any help is very much appreciated.
    Kindest regards
    Dasha

    Thank you for catching errors

    Regards

    Mikhail

     
    • Daria Stepanova

      Daria Stepanova - 2013-12-13

      Dear Mikhail,

      Thanks a lot for your answer.

      The file print_classes.cpp in the newly created project folder was successfully compiled with the following options:

      g++ print_classes.cpp -I ../owlcpp/include -I /home/dasha/Documents/owl-cpp/boost_1_55_0/ -L ../owclpp/out/bin/rdf/gcc-4.6/debug/link-static/ -lowlcpp_rdf -L ../owlcpp/out/bin/logic/gcc-4.6/debug/link-static/ -lowlcpp_logic -L ../out/bin/io/gcc-4.6/debug/link-static/ -lowlcpp_io -L /home/dasha/Documents/owl-cpp/boost_1_55_0/bin.v2/libs/filesystem/build/gcc-4.6/debug/link-static/ -L /home/dasha/Documents/owl-cpp/boost_1_55_0/bin.v2/libs/program_options/build/gcc-4.6/debug/link-static/ -lboost_filesystem -lboost_program_options -lboost_system -L /usr/local/lib/ -lraptor2

      Best regards
      Dasha

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.