|
From: Pecevski D. <de...@ig...> - 2008-10-06 10:34:30
|
Hi Chris,
To fix the reported problem, change the lines 330 and 331 in
pcsim_module_builder.py to:
C.constructors( arg_types = [ "::SimNetwork &", "::SimObjectFactory *",
"::boost::shared_ptr<Point3DSet>" ], allow_empty = True ).call_policies
= cp.with_custodian_and_ward(1, 4, cp.default_call_policies())
C.constructors( arg_types = [ "::SimNetwork &",
"::std::vector<SimObjectFactory*, std::allocator<SimObjectFactory*> >
const &", "::SpatialFamilyIDGenerator const &",
"::boost::shared_ptr<Point3DSet>" ], allow_empty = True ).call_policies
= cp.with_custodian_and_ward(1, 5, cp.default_call_policies())
While testing this, I also run into problems with undefined references
for the xerces library. To fix this additional problem you
should change all the TARGET_LINK_LIBRARIES commands in the
CMakeLists.txt file located in the pcsim extension module root directory
to include the ${XERCES_LIBS} libraries, i.e.
TARGET_LINK_LIBRARIES(
${MYPYPCSIM}
${PCSIM_MODULE_NAME}
pcsim
${MPI_LIBS}
${GSL_LIBS}
${BOOST_LIBS}
${STLP_LIBS}
)
to
TARGET_LINK_LIBRARIES(
${MYPYPCSIM}
${PCSIM_MODULE_NAME}
pcsim
${XERCES_LIBS}
${MPI_LIBS}
${GSL_LIBS}
${BOOST_LIBS}
${STLP_LIBS}
)
and so on.
The fixes I described here will be updated in the repository and
included in the next PCSIM release.
Cheers,
Dejan
Christopher Nolan wrote:
>
> Hi all,
>
>
>
> (This is my third attempt sending this email, I believe the address
> was invalid on previous attempts, so my apologies if this message ends
> up spamming the list)
>
>
>
> I'm building an extension module containing a new
> ConnectionDecisionPredicate, however when I try to build according to
> the instructions in the extension template README, I've been getting
> an error. To make sure it wasn't my code, I created a new extension
> template, made a copy of the
> LateralEuclidianDistanceConnectionPredicate, changed its class name
> etc. to TestEuclidianDistanceConnectionPredicate, and tried to build
> that as the sole target of the extension. This build resulted in the
> same error. I've pasted the whole build output at the bottom, but in
> short it is failing at line 332 of pcsim_module_builder.py:
>
>
>
> C.constructor( arg_types = [ "::SimNetwork &",
> "::std::vector<SimObjectFactory*, std::allocator<SimObjectFactory*> >
> const &", "::SpatialFamilyIDGenerator const &",
> "::boost::shared_ptr<Point3DSet>" ] ).call_policies =
> cp.with_custodian_and_ward(1, 5, cp.default_call_policies())
>
>
>
> Any ideas? (the default template builds without problems)
>
>
>
> Cheers,
>
> Chris.
>
>
>
> ---
>
> Build output:
>
>
>
> Build type = Release
>
> Platform = linux-unknown
>
> Make tool = /usr/bin/make
>
> Make command = /usr/bin/make -i
>
> Python executable : /usr/bin/python version 2.5
>
> Python libraries : /usr/lib/python2.5/config
>
> Python includes : /usr/include/python2.5
>
> Doxygen executable : /usr/bin/doxygen
>
> GCCXML executable : /usr/local/bin/gccxml
>
> Boost C++ library boost_python : /usr/lib/libboost_python-mt.so
>
> Boost C++ library boost_thread : /usr/lib/libboost_thread-mt.so
>
> Boost C++ library boost_date_time : /usr/lib/libboost_date_time-mt.so
>
> Boost C++ libraries : /usr/lib
>
> Boost C++ include path : /usr/include
>
> MPICH2 library: /usr/lib/libmpich.so
>
> MPICH2 include path : /usr/include
>
> GNU Scientific library : /usr/lib/libgsl.so
>
> Xerces library : /usr/lib/libxerces-c.so
>
> CppUnit : /usr/lib/libcppunit.so
>
> -- Configuring done
>
> -- Generating done
>
> -- Build files have been written to:
> /home/cnolan/Development/pcsim_ext/test/build
>
> [ 33%] Generating pytest/pytest.main.cpp, pytest/pytest.indicator.cpp
>
>
>
> INFO Parsing source file
> "/home/cnolan/Development/pcsim_ext/test/build/pytest.h" ...
>
>
>
> INFO gccxml cmd: /usr/local/bin/gccxml --gccxml-cxxflags -pthread
> -I"." -I"src" -I"/home/cnolan/Development/pcsim-active/pcsim/simutils"
> -I"/home/cnolan/Development/pcsim-active/pcsim/simcore"
> -I"/home/cnolan/Development/pcsim-active/pcsim/construction"
> -I"/home/cnolan/Development/pcsim-active/pcsim/simobjects"
> -I"/usr/include" -I"/usr/include" -I"/usr/include"
> -I"/home/cnolan/Development/pcsim-active/python"
> -D"MPICH_IGNORE_CXX_SEEK" -D"BOOST_HAS_THREADS"
> -D"BOOST_PYTHON_MAX_ARITY=30"
> "/home/cnolan/Development/pcsim_ext/test/build/pytest.h"
> -fxml="/tmp/tmp7uXm-d.xml"
>
>
>
> INFO GCCXML version - 0.9
>
> /usr/lib/python2.5/site-packages/pygccxml/parser/scanner.py:335:
> UserWarning: unable to find out array size from expression ""
>
> warnings.warn( msg )
>
>
>
> DISABLED warning W1007: The function has more than %d arguments ( %d
> ). You should adjust BOOST_PYTHON_MAX_ARITY macro. For more DISABLED
> compilation error W1033: Py++ can not expose unnamed variables
> DISABLED compilation error W1014: "%s" is not supported. See
> Boost.Python documentation: http://www.boost.org/libs/python/doc/v2/
>
> DISABLED warning W1043: Py++ created an ugly alias ("%s") for template
> instantiated class.
>
> DISABLED compilation error W1036: Py++ can not expose pointer to
> Python immutable member variables. This could be changed in futu
> DISABLED execution error W1040: The declaration is unexposed, but
> there are other declarations, which refer to it. This could cau
> Traceback (most recent call last):
>
> File
> "/home/cnolan/Development/pcsim-active/scripts/generate_boost_python_wrapper_code.py",
> line 192, in <module>
>
> pypcsim_module.specify_exclusions( M, options)
>
> File
> "/home/cnolan/Development/pcsim-active/python/pcsim_module_builder.py",
> line 332, in specify_exclusions
>
> C.constructor( arg_types = [ "::SimNetwork &",
> "::std::vector<SimObjectFactory*, std::allocator<SimObjectFactory*> >
> const &", "::SpatialFamilyIDGenerator const &",
> "::boost::shared_ptr<Point3DSet>" ] ).call_policies =
> cp.with_custodian_and_ward(1, 5, cp.default_call_policies())
>
> File
> "/usr/lib/python2.5/site-packages/pygccxml/declarations/scopedef.py",
> line 520, in constructor
>
> , recursive=recursive )
>
> File
> "/usr/lib/python2.5/site-packages/pygccxml/declarations/scopedef.py",
> line 343, in _find_single
>
> found = matcher_module.matcher.get_single( matcher, decls, False )
>
> File
> "/usr/lib/python2.5/site-packages/pygccxml/declarations/matcher.py",
> line 79, in get_single
>
> raise matcher.declaration_not_found_t( decl_matcher )
>
> pygccxml.declarations.matcher.declaration_not_found_t: Unable to find
> declaration. matcher: [(decl type==constructor_t) and (arg 0
> type==::SimNetwork &) and (arg 1
> type==::std::vector<SimObjectFactory*,
> std::allocator<SimObjectFactory*> > const &) and (arg 2
> type==::SpatialFamilyIDGenerator const &) and (arg 3
> type==::boost::shared_ptr<Point3DSet>)]
>
> make[3]: *** [pytest/pytest.main.cpp] Error 1
>
> make[2]: *** [CMakeFiles/generate_wrapper_code.dir/all] Error 2
>
> make[1]: *** [CMakeFiles/generate_code.dir/rule] Error 2
>
> make: *** [generate_code] Error 2
>
> BUILD PROCESS FAILED. ERROR = 512
>
> Command: make generate_code
>
> >>>> cd /home/cnolan/Development/pcsim_ext/test/build
>
> >>>> cmake -D CMAKE_BUILD_TYPE:STRING=Release ..
>
> >>>> cd /home/cnolan/Development/pcsim_ext/test/build
>
> >>>> make generate_code
>
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pcsim-users mailing list
> Pcs...@li...
> https://lists.sourceforge.net/lists/listinfo/pcsim-users
>
|