Hi Folks,
I am really struggling to use xdress in my current project. I've been coming back to this for around three weeks now with no luck and it is a serious blocker for me.
Essentially, I have a xdressrc.py file which looks like the following
package = 'runtime' # top-level python package name
packagedir = 'runtime' # location of the python package
# wrappers for non-standard types (uints, complex)
extra_types = 'xdress_extra_types'
# List of C++ standard library container template types
# to instantiate and wrap with Cython. See the type
# system documentation for more details. Note that
# vectors are wrapped as numpy arrays of the appropriate
# type. If the type has no corresponding primitive C++
# type, then a new numpy dtype is created to handle it.
# For example, this allows the wrapping of vector< vector<int> >
# as an np.array(..., dtype=xd_vector_int).
stlcontainers = [
('vector', 'str'),
('vector', 'int32'),
('vector', 'complex'),
('vector', 'float32'),
('vector', 'float64'),
('vector', ('vector', 'float64')),
('set', 'int'),
('set', 'str'),
('set', 'uint'),
('set', 'char'),
('map', 'str', 'str'),
('map', 'str', 'int'),
('map', 'int', 'str'),
('map', 'str', 'uint'),
('map', 'uint', 'str'),
('map', 'uint', 'uint'),
('map', 'str', 'float'),
('map', 'int', 'int'),
('map', 'int', 'bool'),
('map', 'int', 'char'),
('map', 'int', 'float'),
('map', 'uint', 'float'),
('map', 'int', 'complex'),
('map', 'int', ('set', 'int')),
('map', 'int', ('set', 'str')),
('map', 'int', ('set', 'uint')),
('map', 'int', ('set', 'char')),
('map', 'int', ('vector', 'str')),
('map', 'int', ('vector', 'int')),
('map', 'int', ('vector', 'uint')),
('map', 'int', ('vector', 'char')),
('map', 'int', ('vector', 'bool')),
('map', 'int', ('vector', 'float')),
('map', 'int', ('vector', ('vector', 'float64'))),
('map', 'int', ('map', 'int', 'bool')),
('map', 'int', ('map', 'int', 'char')),
('map', 'int', ('map', 'int', 'float')),
('map', 'int', ('map', 'int', ('vector', 'bool'))),
('map', 'int', ('map', 'int', ('vector', 'char'))),
('map', 'int', ('map', 'int', ('vector', 'float'))),
]
functions = [('setup_mapping', 'src/espa_geoloc.*'),
('get_geoloc_info', 'src/espa_geoloc.*'),
('main', 'src/scag.*'),
('input_file_io', 'src/scag.*'),
('output_file_io', 'src/scag.*'),
('model_types_io', 'src/scag.*'),
('next_field', 'src/scag.*'),
('next_blank', 'src/scag.*'),
('spectral_library_io', 'src/scag.*'),
('initialize_models', 'src/scag.*'),
('next_comma', 'src/scag.*'),
('mixture', 'src/scag.*'),
('scag_process_thread', 'src/scag.*'),
('fraction', 'src/scag.*'),
('fit_constraints', 'src/scag.*'),
('shade_normalization', 'src/scag.*'),
('signal_handler', 'src/scag.*')
]
I am using the following dependencies
lmcgibbn@LMC-032857 /usr/local/jpl/snow/trunk/tmscag/trunk(master) $ xdress --version
XDress: 0.5-dev
pycparser (optional): 2.13
lxml (optional): 3.4.2
NumPy (optional): 1.6.2
Cython (optional): 0.21.1
I am trying to use xdress as follows
lmcgibbn@LMC-032857 /usr/local/jpl/snow/trunk/tmscag/trunk(master) $ xdress -p clang -I/usr/include/libxml2 --debug
autoall: discovering API names
autoall: no API names to discover!
dtypes: registering numpy dtypes
stlwrap: registering C++ standard library types
autodescribe: scraping C/C++ APIs from source
autodescribe: describing setup_mapping
Traceback (most recent call last):
File "/usr/local/bin/xdress", line 5, in <module>
pkg_resources.run_script('xdress==0.5-dev', 'xdress')
File "/Library/Python/2.7/site-packages/setuptools-4.0.1-py2.7.egg/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Library/Python/2.7/site-packages/setuptools-4.0.1-py2.7.egg/pkg_resources.py", line 1434, in run_script
execfile(script_filename, namespace, namespace)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/EGG-INFO/scripts/xdress", line 6, in <module>
main()
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/main.py", line 225, in main
plugins.execute()
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/plugins.py", line 374, in execute
self.exit(e)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/plugins.py", line 372, in execute
plugin.execute(rc)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/autodescribe.py", line 2303, in execute
self.compute_functions(rc)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/autodescribe.py", line 2454, in compute_functions
desc = self.compute_desc(fnc, 'func', rc)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/autodescribe.py", line 2389, in compute_desc
clang_includes=rc.clang_includes)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/autodescribe.py", line 2248, in describe
language=language, clang_includes=clang_includes)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/autodescribe.py", line 1163, in clang_describe
clang_includes=clang_includes)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/astparsers.py", line 119, in memoizer
value = f(*args, **kwargs)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/astparsers.py", line 246, in clang_parse
index = cindex.Index.create()
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/clang/cindex.py", line 2204, in create
return Index(conf.lib.clang_createIndex(excludeDecls, 0))
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/clang/cindex.py", line 162, in __get__
value = self.wrapped(instance)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/clang/cindex.py", line 3537, in lib
register_functions(lib, not Config.compatibility_check)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/clang/cindex.py", line 3484, in register_functions
register_function(lib, item, ignore_errors)
File "/Library/Python/2.7/site-packages/xdress-0.5_dev-py2.7.egg/xdress/clang/cindex.py", line 3464, in register_function
raise LibclangError(msg)
xdress.clang.cindex.LibclangError: dlsym(0x7fb9a947c640, clang_isTemplateArg): symbol not found. Please ensure that your python bindings are compatible with your libclang.so version.
My clang version is as follows
lmcgibbn@LMC-032857 /usr/local/jpl/snow/trunk/tmscag/trunk(master) $ clang --version
clang version 3.6.0 (tags/RELEASE_360/final)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
I have been installing llvm and clang from source over and over again, configuring and building the codebases from SVN, failing, uninstalling them, reinstalling them, failing... lather rise repeat and I acknowledge I now need some help to drive this to a solution!
There are various threads on this mailing list which mention the clang version which comes packaged with xdress however I am not having any luck getting past the above issue.
I t would be greatly appreciated if anyone on this list, who has possibly encountered the same or similar issues is able to help me navigate this issue. It is literally driving me mental :(
Thanks in advance.
Lewis