manuels / cxx2rs

A rust-binding generator for C files
GNU General Public License v2.0
51 stars 3 forks source link

running tests fails with error about undefined symbol in libclang #2

Open NobbZ opened 9 years ago

NobbZ commented 9 years ago
Running test "function_arg.c"...
Traceback (most recent call last):
  File "./cxx2rs.py", line 72, in <module>
    main()
  File "./cxx2rs.py", line 33, in main
    index = clang.cindex.Index.create()
  File "/usr/lib/python2.7/dist-packages/clang/cindex.py", line 2047, in create
    return Index(conf.lib.clang_createIndex(excludeDecls, 0))
  File "/usr/lib/python2.7/dist-packages/clang/cindex.py", line 141, in __get__
    value = self.wrapped(instance)
  File "/usr/lib/python2.7/dist-packages/clang/cindex.py", line 3357, in lib
    lib = self.get_cindex_library()
  File "/usr/lib/python2.7/dist-packages/clang/cindex.py", line 3388, in get_cindex_library
    raise LibclangError(msg)
clang.cindex.LibclangError: /usr/lib/x86_64-linux-gnu/libclang-3.5.so.1: undefined symbol: _ZN4llvm24llvm_start_multithreadedEv. To provide a path to libclang use Config.set_library_path() or Config.set_library_file().
Traceback (most recent call last):
  File "./run_tests.py", line 82, in <module>
    main()
  File "./run_tests.py", line 79, in main
    run_test(fname_cxx)
  File "./run_tests.py", line 52, in run_test
    actual_output = subprocess.check_output(cmd).split()
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['./cxx2rs.py', 'cxx', '././tests/function_arg.c']' returned non-zero exit status 1
manuels commented 9 years ago

Hmm, checkout this line: https://github.com/manuels/cxx2rs/blob/master/parser.py#L2

Maybe you have to adjust the path.

manuels commented 9 years ago

I just pulled a patch by @mardiros. Maybe that fixed your problem