Generating python wrappers on recent version of the code

8 views
Skip to first unread message

julien

unread,
Jul 20, 2014, 12:45:09 PM7/20/14
to sire-de...@googlegroups.com
Hi Chris, 

I am working with revision 2526 of the code (post April merge of gaetano's code) on my ubuntu 12.04 VM. 

I have done some changes to interface of SireMol::AmberParameters and am running into issues with the generation of new wrappers. 

julien@ubuntu:~/software/devel/siregac/python$ python AutoGenerate/scanheaders.py ~/software/devel/siregac/corelib/src/libs/ .
julien@ubuntu:~/software/devel/siregac/python$ cd Mol/
julien@ubuntu:~/software/devel/siregac/python/Mol$ python ../AutoGenerate/create_wrappers.py 
Generating wrappers including OpenMM from /home/julien/local/openmm6.0/

INFO Parsing source file "active_headers.h" ... 

INFO gccxml cmd: /usr/bin/gccxml  -m64   -I"." -I"/home/julien/software/devel/siregac/corelib/src/libs/" -I"/home/julien/software/devel/siregac/corelib/src/libs//SireMol" -I"/home/julien/sire.app/bundled/include" -I"/home/julien/sire.app/bundled/include/QtCore" -I"/home/julien/sire.app/bundled/include" -I"/home/julien/sire.app/bundled/include" -I"/home/julien/local/openmm6.0//include"  -D"GCCXML_PARSE" -D"SIRE_USE_OPENMM" -D"SIRE_SKIP_INLINE_FUNCTIONS" -D"SIREN_SKIP_INLINE_FUNCTIONS" -D"SIRE_INSTANTIATE_TEMPLATES" -D"SIREN_INSTANTIATE_TEMPLATES"  "active_headers.h" -fxml="/tmp/tmpYjurj5.xml"
Traceback (most recent call last):
  File "../AutoGenerate/create_wrappers.py", line 595, in <module>
    "SIREN_INSTANTIATE_TEMPLATES"] )
  File "/usr/local/lib/python2.7/dist-packages/pyplusplus/module_builder/builder.py", line 90, in __init__
    , indexing_suite_version)
  File "/usr/local/lib/python2.7/dist-packages/pyplusplus/module_builder/builder.py", line 144, in __parse_declarations
    decls = reader.read_files( files, compilation_mode )
  File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/project_reader.py", line 225, in read_files
    return self.__parse_file_by_file(files)
  File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/project_reader.py", line 250, in __parse_file_by_file
    decls = reader.read_file( header )
  File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/source_reader.py", line 198, in read_file
    return self.read_gccxml_file( source_file )
  File "/usr/local/lib/python2.7/dist-packages/pygccxml/parser/source_reader.py", line 225, in read_gccxml_file
    raise error
pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /home/julien/sire.app/bundled/include/QtCore/qchar.h:45,
                 from /home/julien/sire.app/bundled/include/QtCore/qhash.h:45,
                 from /home/julien/sire.app/bundled/include/QtCore/QHash:1,
                 from /home/julien/software/devel/siregac/corelib/src/libs/SireBase/propertymap.h:32,
                 from /home/julien/software/devel/siregac/corelib/src/libs//SireMol/amberparameters.h:32,
                 from active_headers.h:6:
/home/julien/sire.app/bundled/include/QtCore/qglobal.h:996:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
In file included from active_headers.h:10:
/home/julien/software/devel/siregac/corelib/src/libs//SireMol/atombeads.h:44: error: redefinition of 'struct QMetaTypeId<SireMol::AtomProperty<SireMol::BeadNum> >'
/home/julien/software/devel/siregac/corelib/src/libs//SireMol/atombeading.h:44: error: previous definition of 'struct QMetaTypeId<SireMol::AtomProperty<SireMol::BeadNum> >'
/home/julien/software/devel/siregac/corelib/src/libs//SireMol/atombeads.h:49: error: duplicate explicit instantiation of 'class SireMol::AtomProperty<SireMol::BeadNum>'

I tried adding the flags -fPIC or -fPIE to  cflags = "-m64" in the script Autogenerate/create_wrappers.py but that hasn't solved the problem.

I am using

 julien@ubuntu:~/software/devel/siregac/corelib$ gccxml --version
GCC-XML version 0.9.0

Do you think you know what is going on?

Best wishes, 

Julien


Gaetano Calabró

unread,
Jul 20, 2014, 12:48:54 PM7/20/14
to sire-de...@googlegroups.com
Hi Julien,

you cannot use Ubuntu 12.04 to generate the wrapper with the latest version of Sire. You have to install Scientific Linux 5. There is a compatibility problem with QT5 somewhere. I also tried with other ubuntu distribution (9,10,11) an the problem persists. 
 
Cheers,

Gaetano

--
You received this message because you are subscribed to the Google Groups "Sire Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sire-develope...@googlegroups.com.
To post to this group, send email to sire-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/sire-developers.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages