gimli-org / gimli

Geophysical Inversion and Modeling Library :earth_africa:
https://www.pygimli.org
Other
365 stars 133 forks source link

make pygimli fails #18

Closed valentah closed 9 years ago

valentah commented 9 years ago

I'm trying to compile pygimli on fedora 22. Finally I succeeded with cmake and make, but pygimli build failes with python 2.7 and also with python 3.4 (Error 2). Could you, please, give me some hint what is wrong?

Python 2.7:

[honza@bezinka build]$ make pygimli
[100%] Built target gimli
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file generate_pygimli_code.py, line 178
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file generate_pygimli_code.py, line 179
INFO caster_path=/home/honza/src/gimli1/thirdParty/dist-GNU-5.1.1-64/bin/castxml
INFO working_directory=../src
INFO include_paths=['/usr/include', '/home/honza/src/gimli1/trunk/src']
INFO define_symbols=['PYGIMLI_CAST', 'HAVE_BOOST_THREAD_HPP']
INFO indexing_suite_version=2
Traceback (most recent call last):
  File "/home/honza/src/gimli1/trunk/python/generate_pygimli_code.py", line 582, in <module>
    generate(defined_symbols, options.extraIncludes)
  File "/home/honza/src/gimli1/trunk/python/generate_pygimli_code.py", line 248, in generate
    caster=caster
  File "/home/honza/src/gimli1/thirdParty/dist-GNU-5.1.1-64/pyplusplus/module_builder/boost_python_builder.py", line 85, in __init__
    , caster=caster)
TypeError: __init__() got an unexpected keyword argument 'caster'
python/CMakeFiles/pggen.dir/build.make:49: recipe for target 'pggen' failed
make[3]: *** [pggen] Error 1
CMakeFiles/Makefile2:1287: recipe for target 'python/CMakeFiles/pggen.dir/all' failed
make[2]: *** [python/CMakeFiles/pggen.dir/all] Error 2
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/pygimli.dir/rule' failed
make[1]: *** [CMakeFiles/pygimli.dir/rule] Error 2
Makefile:173: recipe for target 'pygimli' failed
make: *** [pygimli] Error 2

Python 3.4:

[honza@bezinka build]$ make pygimli
[100%] Built target gimli
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 978, in emit
    msg = self.format(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 828, in format
    return fmt.format(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 565, in format
    record.message = record.getMessage()
  File "/usr/lib64/python3.4/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 582, in <module>
    generate(defined_symbols, options.extraIncludes)
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 178, in generate
    logger.debug("Install SRC:  ", os.path.abspath(__file__))
Message: 'Install SRC:  '
Arguments: ('/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 978, in emit
    msg = self.format(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 828, in format
    return fmt.format(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 565, in format
    record.message = record.getMessage()
  File "/usr/lib64/python3.4/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 582, in <module>
    generate(defined_symbols, options.extraIncludes)
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 179, in generate
    logger.debug("Execute from: ", os.getcwd())
Message: 'Execute from: '
Arguments: ('/home/honza/src/gimli3/build/python',)
INFO caster_path=/home/honza/src/gimli3/thirdParty/dist-GNU-5.1.1-64/bin/castxml
INFO working_directory=../src
INFO include_paths=['/usr/include', '/home/honza/src/gimli3/trunk/src']
INFO define_symbols=['PYGIMLI_CAST', 'HAVE_BOOST_THREAD_HPP']
INFO indexing_suite_version=2
Traceback (most recent call last):
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 582, in <module>
    generate(defined_symbols, options.extraIncludes)
  File "/home/honza/src/gimli3/trunk/python/generate_pygimli_code.py", line 248, in generate
    caster=caster
  File "/home/honza/src/gimli3/thirdParty/dist-GNU-5.1.1-64/pyplusplus/module_builder/boost_python_builder.py", line 85, in __init__
    , caster=caster)
TypeError: __init__() got an unexpected keyword argument 'caster'
python/CMakeFiles/pggen.dir/build.make:49: recipe for target 'pggen' failed
make[3]: *** [pggen] Error 1
CMakeFiles/Makefile2:1287: recipe for target 'python/CMakeFiles/pggen.dir/all' failed
make[2]: *** [python/CMakeFiles/pggen.dir/all] Error 2
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/pygimli.dir/rule' failed
make[1]: *** [CMakeFiles/pygimli.dir/rule] Error 2
Makefile:173: recipe for target 'pygimli' failed
make: *** [pygimli] Error 2
florian-wagner commented 9 years ago

The castxml support is new and has not been tested much. Have you tried with gccxml?

cmake ../trunk -DCASTER='gccxml'
carsten-forty2 commented 9 years ago

I'm working on this at the moment .. there was an api change in pygccxml.

I will commit a fix ASAP.

valentah commented 9 years ago

The cmake ../trunk -DCASTER='gccxml' doesn't work either. Will wait for the carsten's fix.

valentah commented 9 years ago

Thank you carsten, almost got it, but failed on the very end:

[100%] Built target _pygimli_
[100%] Built target pg
Built target pgbuild
Updating needed dll. build/bin/*dll -> trunk/python/pygimli
cp: cannot stat '/home/honza/src/gimli3/build/bin/*.dll': No such file or directory
python/CMakeFiles/pgcopydll.dir/build.make:49: recipe for target 'pgcopydll' failed
make[3]: *** [pgcopydll] Error 1
CMakeFiles/Makefile2:1289: recipe for target 'python/CMakeFiles/pgcopydll.dir/all' failed
make[2]: *** [python/CMakeFiles/pgcopydll.dir/all] Error 2
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/pygimli.dir/rule' failed
make[1]: *** [CMakeFiles/pygimli.dir/rule] Error 2
Makefile:173: recipe for target 'pygimli' failed
make: *** [pygimli] Error 2

By the way, new version of the castXML for some reason does not have the target "install", but older version worked fine.