cxx2rs icon indicating copy to clipboard operation
cxx2rs copied to clipboard

running tests fails with error about undefined symbol in libclang

Open NobbZ opened this issue 9 years ago • 2 comments

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

NobbZ avatar Feb 06 '15 12:02 NobbZ

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

Maybe you have to adjust the path.

manuels avatar Feb 06 '15 16:02 manuels

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

manuels avatar Feb 22 '15 16:02 manuels