Commit 261a15fb authored by cvs2svn's avatar cvs2svn
Browse files

This commit was manufactured by cvs2svn to create tag 'COOL_2_8_5-pre1'.

git-svn-id: file:///git/lcgcool.svndb/cool/tags/COOL_2_8_5-pre1@16423 4525493e-7705-40b1-a816-d608a930855b
parent 3cff5306
#============================================================================
# $Id: requirements,v 1.36 2009-04-28 13:13:41 avalassi Exp $
#============================================================================
package PyCool
#============================================================================
#============================================================================
# Build rules
#============================================================================
use CoolKernel v*
use CoolApplication v*
use Python v* LCG_Interfaces
use Reflex v* LCG_Interfaces
# Workaround for LCGCMT bug #45934 with CMT v1r20p20070208
# -> Remove "-import= -import=Reflex" (kills macro <dictionary>_use_linkopts)
# -> Note that Reflex_linkopts are already added to that macro by 'use Reflex'
pattern reflex_dictionary \
private ;\
document reflex_dictionary_generator <dictionary>Gen <headerfiles> dictionary=<dictionary> libdirname=lib ; \
library <dictionary>Dict -s=../$(tag)/dict/<dictionary> *.cpp ; \
macro <dictionary>_reflex_selection_file " <selectionfile> " ; \
macro <dictionary>_rootmap $(<PACKAGE>ROOT)/$(tag)/<dictionary>Dict.rootmap \
<project>_with_installarea $(CMTINSTALLAREA)/$(tag)/lib/<project>Dict.rootmap ;\
macro <dictionary>_reflex_options " <options> $(gccxmlopts) --select=<selectionfile> --gccxmlpath=$(GCCXML_home)/bin" ; \
macro <dictionary>Dict_dependencies "$(<package>_linker_library) <dictionary>Gen" ;\
macro <dictionary>Dict_shlibflags "$(libraryshr_linkopts) $(cmt_installarea_linkopts) $(<package>_linkopts) $(<dictionary>Dict_use_linkopts) " ;\
end_private
apply_pattern reflex_dictionary dictionary=lcg_PyCool \
selectionfile=../dict/PyCool_selection.xml \
headerfiles=$(PyCool_root)/dict/PyCool_headers.h
include_path none
#============================================================================
private
#============================================================================
# Debug options for genreflex (show the full gccxml invocation)
###macro_prepend gccxmlopts "" target-winxp " --debug=1"
# Debug options for gccxml in genreflex (print all #define)
###macro_prepend gccxmlopts '' target-winxp ' --gccxmlopt="-E -dM"'
# Add missing options to genreflex for Windows (MarcoC - Nov 2006)
macro_prepend gccxmlopts "" target-winxp " -D__MT__"
# Disable vc9 warnings (workaround for bug #45757)
macro_prepend use_cppflags "" target-vc9 " /D_SCL_SECURE_NO_WARNINGS"
macro_append Boost_linkopts " $(Boost_linkopts_thread)"
macro_append CORAL_linkopts " $(CORAL_libs)"
# Change the name of the generated rootmap file
macro lcg_PyCool_rootmap "$(CMTINSTALLAREA)/$(tag)/lib/lcg_PyCool.rootmap"
#============================================================================
# Tests
#============================================================================
apply_pattern lcg_test_python
# Fake target for examples
action examples "echo No examples in this package"
macro_remove cmt_actions_constituents "examples"
DICT_FILES = $(LOCALTOP)/$(THISDIR)/PyCool_headers.h
SELECTION_FILE = $(LOCALTOP)/$(THISDIR)/PyCool_selection.xml
// $Id: PyCool_headers.h,v 1.88 2009-12-16 19:38:51 avalassi Exp $
#ifndef DICT_PYCOOL_HEADERS_H
#define DICT_PYCOOL_HEADERS_H 1
// Workaround to avoid "_mingw.h: No such file or directory" warning from
// boost/config/platform/win32.hpp (and possiblyavoid any related problems)
#ifdef _WIN32
#ifdef __MINGW32__
#undef __MINGW32__
#endif
#endif
// Workaround for SEAL IntTraits 'integer constant too large for "long" type'
// (gccxml emulation of VC++ needs long long literal constants ending in LL)
// See http://savannah.cern.ch/bugs/?func=detailitem&item_id=9704
//#ifdef _WIN32
//#define LONG_LONG_MAX 0x7fffffffffffffffLL // max signed __int64 value
//#define LONG_LONG_MIN 0x8000000000000000LL // min signed __int64 value
//#define ULONG_LONG_MAX 0xffffffffffffffffLL // max unsigned __int64 value
//#endif
// Workaround for 'conversion from void* to const char*' errors
// (the problem occurs within asserts, hence disable all asserts!)
// See http://www.gccxml.org/Bug/bug.php?op=show&bugid=895
// See also SealBase/DebugAids.h:83 (NDEBUG is defined as 1 else problems)
#ifdef _WIN32
#define NDEBUG 1
#include <assert.h>
#endif
// Disable compilation warning C4345 ('behavior change: an object of POD type
// constructed with an initializer of the form () will be default-initialized')
#ifdef _WIN32
#pragma warning ( disable : 4345 )
#endif
// Disable icc warnings from Reflex code
// Disable icc warning #177: variable was declared but never referenced
// Disable icc warning #444: destructor for base class is not virtual
// Disable icc warning #522: function redeclared "inline" after being called
#ifdef __ICC
#pragma warning ( disable: 177 )
#pragma warning ( disable: 444 )
#pragma warning ( disable: 522 )
#endif
// Standard headers
#include <typeinfo>
#include <vector>
#include <stdexcept>
#include <sstream>
// Boost headers
#include "boost/shared_ptr.hpp"
// TODO: (MCl) re-introduce the Python bindings for Coral Date and TimeStamp.
// They have been removed because causing problems with GCCXML after
// they have been moved to Boost. (bug #35712)
// CoralBase headers
#include "CoralBase/Attribute.h"
#include "CoralBase/AttributeException.h"
#include "CoralBase/AttributeList.h"
#include "CoralBase/AttributeListException.h"
#include "CoralBase/AttributeListSpecification.h"
#include "CoralBase/AttributeSpecification.h"
//#include "CoralBase/Date.h"
#include "CoralBase/Exception.h"
//#include "CoralBase/TimeStamp.h"
// CoolKernel headers
#include "CoolKernel/ChannelId.h"
#include "CoolKernel/ChannelSelection.h"
#include "CoolKernel/CompositeSelection.h"
#include "CoolKernel/ConstRecordAdapter.h"
#include "CoolKernel/DatabaseId.h"
#include "CoolKernel/Exception.h"
#include "CoolKernel/FieldSelection.h"
#include "CoolKernel/FieldSpecification.h"
#include "CoolKernel/FolderSpecification.h"
#include "CoolKernel/FolderVersioning.h"
#include "CoolKernel/HvsTagLock.h"
#include "CoolKernel/IDatabase.h"
#include "CoolKernel/IDatabaseSvc.h"
#include "CoolKernel/IField.h"
#include "CoolKernel/IFieldSpecification.h"
#include "CoolKernel/IFolder.h"
#include "CoolKernel/IFolderSet.h"
#include "CoolKernel/IFolderSpecification.h"
#include "CoolKernel/IHvsNode.h"
#include "CoolKernel/IHvsNodeRecord.h"
#include "CoolKernel/IObject.h"
#include "CoolKernel/IObjectIterator.h"
#include "CoolKernel/IRecord.h"
#include "CoolKernel/IRecordSelection.h"
#include "CoolKernel/IRecordSpecification.h"
#include "CoolKernel/ITime.h"
#ifdef COOL300
#include "CoolKernel/ITransaction.h"
#endif
#include "CoolKernel/Record.h"
#include "CoolKernel/RecordException.h"
#include "CoolKernel/RecordSpecification.h"
#include "CoolKernel/Time.h"
#include "CoolKernel/ValidityKey.h"
#include "CoolKernel/pointers.h"
#include "CoolKernel/types.h"
// CoolApplication headers
#include "CoolApplication/Application.h"
#include "CoolApplication/DatabaseSvcFactory.h"
#include "CoolApplication/IApplication.h"
#include "CoolApplication/MessageLevels.h"
// RelationalCool helpers for PyCool
#include "../../RelationalCool/src/PyCool_helpers.h"
// Pythonize a subset of CORAL RelationalAccess too
#include "RelationalAccess/IConnectionService.h"
#include "RelationalAccess/IConnectionServiceConfiguration.h"
#include "RelationalAccess/IWebCacheControl.h"
#include "RelationalAccess/IWebCacheInfo.h"
// Workaround for bug #44524 (forward declaration is not enough with ROOT 5.22)
#ifdef _WIN32
#include "RelationalAccess/IConnectionServiceConfiguration.h"
#include "RelationalAccess/IMonitoringReporter.h"
#endif
// Needed to be able to cast Reflex objects (e.g. constants) to python
#include "Reflex/Object.h"
// Reflex changed namespace between ROOT 5.18 and 5.19
#include "RVersion.h"
#if ROOT_VERSION_CODE <= ROOT_VERSION(5,18,0)
namespace Reflex = ROOT::Reflex;
#endif
//----------------------------------------------------------------------------
namespace dummy
{
// Force instantiation for dictionary inclusion
class _instantiations
{
public:
std::type_info *aTypeInfo;
boost::detail::shared_count aSharedCount;
coral::Blob aBlob;
//coral::Date aDate;
//coral::TimeStamp aTimeStamp;
cool::FolderSpecification aFolderSpecification;
cool::IDatabasePtr aIDatabasePtr;
cool::IFolderPtr aIFolderPtr;
cool::IFolderSetPtr aIFolderSetPtr;
cool::IObjectPtr aIObjectPtr;
cool::IObjectIteratorPtr aIObjectIteratorPtr;
cool::IObjectVector aIObjectVector;
cool::IObjectVector::iterator aIObjectVectorIterator;
cool::IObjectVectorPtr aIObjectVectorPtr;
#ifdef COOL300
cool::ITransactionPtr aITransactionPtr;
#endif
cool::Record aRecord;
cool::RecordSpecification aRecordSpecification;
cool::Time aTime;
std::vector<cool::ChannelId> aChannelIdVector;
/// Marco's workaround for ROOT bug #22513: vector dictionary is
/// not generated correctly if the vector iterator is included!!
//std::vector<cool::ChannelId>::iterator aChannelIdVectorIterator;
std::map<cool::ChannelId, std::string> aChannelNameMap;
cool::Application aApplication;
};
// This is needed to declare all FieldSelection ctors to genreflex
template<typename T> void dummyMethod( const T& refValue )
{
cool::FieldSelection dummy( "",
cool::StorageType::Bool,
cool::FieldSelection::EQ,
refValue );
}
}
//----------------------------------------------------------------------------
namespace cool
{
namespace PyCool
{
namespace Helpers
{
// Helper for IObject
cool::IObjectPtr IObjectPtr( cool::IObject* obj )
{
cool::IObjectPtr objPtr( obj );
return objPtr;
}
// Helpers for coral::Blob
unsigned char getBlobByte(coral::Blob &b, long pos)
{
if ( pos < b.size() ) {
return ((unsigned char*)b.startingAddress())[pos];
}
else {
throw std::out_of_range("coral::Blob index out of range");
}
return 0;
}
void setBlobByte(coral::Blob &b, long pos, unsigned char val)
{
if ( pos < b.size() ) {
((unsigned char*)b.startingAddress())[pos] = val;
}
else {
throw std::out_of_range("coral::Blob index out of range");
}
}
// Helper to convert IRecord to its string representation
std::string toString(cool::IRecord &r)
{
std::ostringstream s;
r.print(s);
return s.str();
}
/*
// Helper to instantiate a FieldSelection
// WARNING: this does not show up in dir(gbl.cool.PyCool.Helpers)
template<typename T> FieldSelection
createFieldSelection( const std::string& name,
const StorageType::TypeId typeId,
const FieldSelection::Relation relation,
const T& refValue )
{
return FieldSelection( name, typeId, relation, refValue );
}
*/
template <typename T>
class ReflexCast {
public:
static T& Cast(const Reflex::Object& obj){
return *(reinterpret_cast<T*>(obj.Address()));
}
};
/*
// Marco: This does not work with ROOT 5.18
// It looks like a templated member functions cannot have
// "_" or numbers in the name.
struct Typedefs {
#define TD(X) typedef cool::X X; template <typename T> inline T function_##X() const {return T();}
TD(Bool);
TD(UChar);
//TD(SChar);
TD(Int16);
TD(UInt16);
TD(Int32);
TD(UInt32);
TD(UInt63);
TD(Int64);
TD(UInt64);
TD(Float);
TD(Double);
TD(String255);
TD(String4k);
TD(String64k);
TD(String16M);
TD(Blob64k);
TD(Blob16M);
TD(ValidityKey);
TD(ChannelId);
#undef TD
};
*/
struct Typedefs {
#define TD(N, X) typedef cool::X X; \
inline void type_id_##N##__##X () {} \
template <typename T> inline T function##N() const {return T();}
TD(a, Bool)
TD(b, UChar)
//TD(c, SChar)
TD(d, Int16)
TD(e, UInt16)
TD(f, Int32)
TD(g, UInt32)
TD(h, UInt63)
TD(i, Int64)
TD(j, UInt64)
TD(k, Float)
TD(l, Double)
TD(m, String255)
TD(n, String4k)
TD(o, String64k)
TD(p, String16M)
TD(q, Blob64k)
TD(r, Blob16M)
TD(s, ValidityKey)
TD(t, ChannelId)
#undef TD
};
}
}
}
//----------------------------------------------------------------------------
// Instantiate all known coral::Attribute types
// NB This is pythonizing CORAL, not COOL!
// ==> Must include _all_ types supported by _CORAL_ (COOL is irrelevant here!)
#define INST_CORAL_ATTR_FUNCT(t) \
template t& coral::Attribute::data<t>(); \
template const t& coral::Attribute::data<t>() const; \
template void coral::Attribute::setValue<t>(const t&)
// Include all types declared in CoralBase/src/AttributeSpecification.cpp
INST_CORAL_ATTR_FUNCT(bool); // cool::Bool
INST_CORAL_ATTR_FUNCT(char); // [NO cool::Char]
// INST_CORAL_ATTR_FUNCT(signed char); // cool::SChar
INST_CORAL_ATTR_FUNCT(unsigned char); // cool::UChar
INST_CORAL_ATTR_FUNCT(short); // cool::Int16
INST_CORAL_ATTR_FUNCT(unsigned short); // cool::UInt16
INST_CORAL_ATTR_FUNCT(int); // cool::Int32
INST_CORAL_ATTR_FUNCT(unsigned int); // cool::UInt32
INST_CORAL_ATTR_FUNCT(long); // [NO cool equivalent]
INST_CORAL_ATTR_FUNCT(unsigned long); // [NO cool equivalent]
INST_CORAL_ATTR_FUNCT(long long); // cool::Int64
INST_CORAL_ATTR_FUNCT(unsigned long long); // cool::SInt64
INST_CORAL_ATTR_FUNCT(float); // cool::Float
INST_CORAL_ATTR_FUNCT(double); // cool::Double
INST_CORAL_ATTR_FUNCT(long double); // [NO cool equivalent]
INST_CORAL_ATTR_FUNCT(std::string); // cool::String255/4k/64k/16M
INST_CORAL_ATTR_FUNCT(coral::Blob); // cool::Blob64k/16M
//INST_CORAL_ATTR_FUNCT(coral::Date); // [NO cool equivalent]
//INST_CORAL_ATTR_FUNCT(coral::TimeStamp); // [NO cool equivalent]
//----------------------------------------------------------------------------
// Instantiate all known cool IField types
// NB This is pythonizing COOL, not CORAL!
// ==> Must include _all_ types supported by _COOL_ (CORAL is irrelevant here!)
#define INST_COOL_IFIELD_FUNCT(t) \
template const cool::t& cool::IField::data<cool::t>() const; \
template void cool::IField::setValue<cool::t>(const cool::t&); \
template class cool::PyCool::Helpers::ReflexCast<cool::t>; \
template void dummy::dummyMethod<cool::t>(const cool::t&)
/*
template cool::FieldSelection \
cool::PyCool::Helpers::createFieldSelection<t>(const std::string&,\
const StorageType::TypeId,\
const FieldSelection::Relation,\
const t& )
*/
/*
namespace cool { namespace PyCool { namespace Helpers {\
FieldSelection createFieldSelection2( const std::string& name,\
const StorageType::TypeId typeId,\
const FieldSelection::Relation relation,\
const t& refValue )\
{ return FieldSelection( name, typeId, relation, refValue ); } } } }
*/
// Include all types declared in CoolKernel/CoolKernel/StorageType.h
// (and in CoolKernel/CoolKernel/types.h), avoiding duplicates
INST_COOL_IFIELD_FUNCT(Bool);
// INST_COOL_IFIELD_FUNCT(SChar);
INST_COOL_IFIELD_FUNCT(UChar);
INST_COOL_IFIELD_FUNCT(Int16);
INST_COOL_IFIELD_FUNCT(UInt16);
INST_COOL_IFIELD_FUNCT(Int32);
INST_COOL_IFIELD_FUNCT(UInt32);
INST_COOL_IFIELD_FUNCT(UInt63);
INST_COOL_IFIELD_FUNCT(Int64);
//INST_COOL_IFIELD_FUNCT(UInt64); // error - duplicate
INST_COOL_IFIELD_FUNCT(Float);
INST_COOL_IFIELD_FUNCT(Double);
INST_COOL_IFIELD_FUNCT(String255);
//INST_COOL_IFIELD_FUNCT(String4k); // error - duplicate
//INST_COOL_IFIELD_FUNCT(String64k); // error - duplicate
//INST_COOL_IFIELD_FUNCT(String16M); // error - duplicate
INST_COOL_IFIELD_FUNCT(Blob64k);
//INST_COOL_IFIELD_FUNCT(Blob16M); // error - duplicate
// Instantiate all known cool typedefs.
// This is needed to be able to produce a correct mapping between COOL type name and
// template signature.
#define INST_COOL_TYPEDEFS_HELPER(N, T) \
template cool::T cool::PyCool::Helpers::Typedefs::function##N<cool::T>() const
INST_COOL_TYPEDEFS_HELPER(a, Bool);
INST_COOL_TYPEDEFS_HELPER(b, UChar);
// INST_COOL_TYPEDEFS_HELPER(c, SChar);
INST_COOL_TYPEDEFS_HELPER(d, Int16);
INST_COOL_TYPEDEFS_HELPER(e, UInt16);
INST_COOL_TYPEDEFS_HELPER(f, Int32);
INST_COOL_TYPEDEFS_HELPER(g, UInt32);
INST_COOL_TYPEDEFS_HELPER(h, UInt63);
INST_COOL_TYPEDEFS_HELPER(i, Int64);
INST_COOL_TYPEDEFS_HELPER(j, UInt64);
INST_COOL_TYPEDEFS_HELPER(k, Float);
INST_COOL_TYPEDEFS_HELPER(l, Double);
INST_COOL_TYPEDEFS_HELPER(m, String255);
INST_COOL_TYPEDEFS_HELPER(n, String4k);
INST_COOL_TYPEDEFS_HELPER(o, String64k);
INST_COOL_TYPEDEFS_HELPER(p, String16M);
INST_COOL_TYPEDEFS_HELPER(q, Blob64k);
INST_COOL_TYPEDEFS_HELPER(r, Blob16M);
INST_COOL_TYPEDEFS_HELPER(s, ValidityKey);
INST_COOL_TYPEDEFS_HELPER(t, ChannelId);
//----------------------------------------------------------------------------
//#endif
#endif // DICT_PYCOOL_HEADERS_H
<lcgdict>
<selection>
<!-- COOL -->
<!-- typedefs -->
<!-- class patterns -->
<class pattern="*&lt;*cool::*&gt;" />
<class pattern="cool::*" />
<!-- enums -->
<enum name="cool::ChannelSelection::Order"/>
<enum name="cool::FolderVersioning::Mode"/>
<enum name="cool::HvsTagLock::Status"/>
<enum name="cool::IHvsNode::Type"/>
<enum name="cool::MSG::Level"/>
<enum name="cool::StorageType::TypeId"/>
<!-- variables -->
<variable pattern="cool::*" />
<!-- CORAL -->
<class pattern="*&lt;*coral::*&gt;" />
<class pattern="coral::Blob" /> -->
<!-- <class pattern="coral::Date" /> -->
<!-- <class pattern="coral::TimeStamp" /> -->
<class pattern="coral::*Attribute*" />
<class pattern="coral::*attribute*" />
<class pattern="coral::ConnectionService" />
<class pattern="coral::IConnectionService" />
<class pattern="coral::IConnectionServiceConfiguration" />
<class pattern="coral::IWebCacheControl" />
<class pattern="coral::IWebCacheInfo" />
<!-- BOOST -->
<class name="boost::detail::shared_count" rootmap="false"/>
<!-- <class name="boost::noncopyable_::noncopyable" rootmap="false"/> -->
<class pattern="std::iterator&lt;boost::shared_ptr&lt;cool::IObject&gt;&gt;*" />
<!-- STD -->
<class name="std::type_info" rootmap="false"/>
<class name="std::vector&lt;unsigned int&gt;" rootmap="false"/>
<class name="std::vector&lt;std::basic_string&lt;char&gt;&gt;" rootmap="false"/>
<class name="std::map&lt;unsigned int,std::string&gt;" rootmap="false"/>
<!-- Workaround for bug #43416 -->
<!--class pattern="std::_Tree&lt;std::_Tmap_traits&lt;unsigned int,std::string,*&gt;&gt;" rootmap="false"/-->
<!-- Disable the next line on Windows to remove a warning (task #5836) -->
<!--class name="std::vector&lt;unsigned int&gt;::iterator" rootmap="false"/-->
<!-- HELPERS -->
<function pattern="cool::PyCool::Helpers::*"/>
</selection>
<exclusion>
<class pattern="boost::shared_ptr&lt;*&gt;">
<method pattern="operator*" />
</class>
<!-- These cause warnings about reference data members not supported -->
<!-- <class name="cool::ConstRecordAdapter"/> -->
<!-- <class name="cool::FieldSpecification"/> -->
<!-- Marco: Excluded because causing problems with gccxml 0.7.0 and gcc 4.1 -->
<class pattern="_Is_normal_iterator*"/>
<class pattern="__type_traits*"/>
<class pattern="*__copy_backward_dispatch*"/>
<!-- ROOT gets a bit confused by "signed char" -->
<variable pattern="cool::SChar*" />
<!-- Workaround for bug #44524 on Windows (thanks to Axel!) -->
<class pattern="boost::detail::sp*" />
</exclusion>
</lcgdict>
1. Building from PyCool/dict executes two commands:
export PYTHONPATH="M:\external\Boost\1.32.0_python242\win32_vc71\lib\python2.4\site-packages;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\lib;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\python;M:\external\root\5.08.00\win32_vc71\root\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python";
wine /afs/cern.ch/sw/lcg/external/Python/2.4.2/win32_vc71/python.exe M:\\app\\releases\\SEAL\\SEAL_1_7_9\\win32_vc71_dbg\\bin\\lcgdict.py M:\\app\\releases\\COOL\\internal\\avalassi\\COOL_HEAD\\src\\PyCool\\dict\\PyCool_headers.h -s M:\\app\\releases\\COOL\\internal\\avalassi\\COOL_HEAD\\src\\PyCool\\dict\\PyCool_selection.xml -o M:\\app\\releases\\COOL\\internal\\avalassi\\COOL_HEAD\\tmp\\win32_vc71_dbg_wine\\src\\PyCool\\dict\\PyCool_headers_dict.cpp --split --reflex --gccxmlpath=M:\\external\\gccxml\\0.6.0_patch3\\win32_vc71\\bin
-I/afs/cern.ch/sw/lcg/app/releases/COOL/internal/avalassi/COOL_HEAD/src/PyCool -I/afs/cern.ch/sw/lcg/app/releases/COOL/internal/avalassi/COOL_HEAD/src/CoolApplication -I/afs/cern.ch/sw/lcg/app/releases/COOL/internal/avalassi/COOL_HEAD/src/CoolKernel -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Foundation/SealBase -I/win32_vc71_dbg_wine/include -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Foundation/SealPlatform -I/afs/cern.ch/sw/lcg/app/releases/CORAL/CORAL_1_2_1/src/CoralBase -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Framework/SealKernel -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Foundation/PluginManager -I/afs/cern.ch/sw/lcg/app/releases/POOL/POOL_2_2_7/src/AttributeList -I/afs/cern.ch/sw/lcg/app/releases/POOL/POOL_2_2_7/src/POOLCore -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Dictionary/Reflection -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Framework/SealServices -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src/Dictionary/Reflex -I/afs/cern.ch/sw/lcg/external/uuid/1.38/win32_vc71/include -I/afs/cern.ch/sw/lcg/external/Boost/1.32.0_python242/win32_vc71/include/boost-1_32 -I/afs/cern.ch/sw/lcg/external/Python/2.4.2/win32_vc71/include -I/afs/cern.ch/sw/lcg/external/pcre/4.4/win32_vc71/include -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/src -I/afs/cern.ch/sw/lcg/app/releases/SEAL/SEAL_1_7_9/win32_vc71_dbg/include -I/afs/cern.ch/sw/lcg/app/releases/POOL/POOL_2_2_7/src -I/afs/cern.ch/sw/lcg/app/releases/CORAL/CORAL_1_2_1/src -I/opt/avalassi/wine/win32/dosdevices/c:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/include -I/opt/avalassi/wine/win32/dosdevices/c:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include -D_GNU_SOURCE -DGNU_SOURCE -DWIN32 -D_MBCS -D_WINDOWS -DSEAL_KERNEL_BUILD_ARCHIVE -D_DEBUG -DLCGDICT_STRING
where in the second case I separated the command from the long include path.
2. Build by hand a simplified test case
Just execute two commands (export and wine)...
but first you must be in bash and create a directory tmp.
bash
export PYTHONPATH="M:\external\Boost\1.32.0_python242\win32_vc71\lib\python2.4\site-packages;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\lib;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\python;M:\external\root\5.08.00\win32_vc71\root\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python";
\rm -rf tmp
mkdir -p tmp
wine /afs/cern.ch/sw/lcg/external/Python/2.4.2/win32_vc71/python.exe M:\\app\\releases\\SEAL\\SEAL_1_7_9\\win32_vc71_dbg\\bin\\lcgdict.py wineTest.h -s wineTest.xml -o tmp/wineTest_dict.cpp --split --reflex --gccxmlpath=M:\\external\\gccxml\\0.6.0_patch3\\win32_vc71\\bin
This hangs on "Parsing file wineTest.h with GCC_XML".
From another window,
ps -xfa | more
reveals the two processes that are stuck:
18451 pts/4 S 0:00 \_ /opt/avalassi/wine/wine-20050930-install/bin/wine-preloader /opt/avalassi/wine/wine-20050930-install/bin/wine-pthread c:\windows\system32\wcmd.exe /c M:\external\gccxml\0.6.0_patch3\win32_vc71\bin\gccxml wineTest.h -fxml=tmp\wineTest.xml -D__REFLEX__
18452 pts/4 S 0:12 \_ /opt/avalassi/wine/wine-20050930-install/bin/wine-preloader /opt/avalassi/wine/wine-20050930-install/bin/wine-pthread M:\external\gccxml\0.6.0_patch3\win32_vc71\bin\gccxml wineTest.h -fxml=tmp\wineTest.xml -D__REFLEX__
These are the two typical processes that must be killed to complete the build.
3. Execute gccxml from wine directly
bash
export PYTHONPATH="M:\external\Boost\1.32.0_python242\win32_vc71\lib\python2.4\site-packages;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\lib;M:\app\releases\SEAL\SEAL_1_7_9\win32_vc71_dbg\python;M:\external\root\5.08.00\win32_vc71\root\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\bin;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\lib;M:\app\releases\COOL\internal\avalassi\COOL_HEAD\win32_vc71_dbg_wine\python";
\rm -rf tmp
mkdir -p tmp
wine /afs/cern.ch/sw/lcg/external/gccxml/0.6.0_patch3/win32_vc71/bin/gccxml wineTest.h -fxml=tmp/wineTest.xml -D__REFLEX__
This hangs, indeed. It is the simplest example that hangs.
Note that wineTest.xml here is the output of gccxml, not the input
to Reflex (and in fact it is in a different temporary directory!)
4. Recipe to kill the processes from another window
a. Wait for "Parsing file" on the build window
b. On the second window, type
ps -xfa | grep gccxml | grep -v grep