Giter VIP home page Giter VIP logo

lldb-sys.rs's People

Contributors

atouchet avatar dzfranklin avatar hghwng avatar slnpacifist avatar waywardmonkeys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lldb-sys.rs's Issues

Why does this package needs llvm source?

Hi!
I'm a newbee to working on library-linked crates and my task is to make this package work in linux. Working on Ubuntu 16.04 64-bit I managed to make it work (still need some experience to send a good PR), however, main question is: why is this crate needs llvm source?
I mean there are bindings generated from LLDB API header files. These header files were taken from some version of LLDB. Is not it better to put all needed files (those are from lldb/include, llvm/include and build/include). There is only one file (Compiler.h from llvm includes) that requires build/include file and this include can be ignored.
What I did for the first time:

  • checked out llvm,
  • checked out lldb into llvm/tools
  • checked out clang in llvm/tools
  • run cmake to generate /build files
  • built this crate using println!("cargo:rustc-link-lib=lldb-3.8"); instead of frameworks and setting needed env variables.

What I did for the second time:

  • copied llvm/includes into a separate directory within a crate source
  • copied lldb/includes into a separate directory within a crate source
  • commented out unnecessary include in Compiler.h
  • built this crate without using any references to external files.

In both cases I got working library that was used to run and close /bin/ls using LLDB (I had lldb 3.8 installed from http://apt.llvm.org/).

Are there reasons for llvm header files to be excluded from this package?

LLDB header files may have moved

Caveat: I'm used to using ptrace and libdwarf directly instead of using LLVM infrastructure, and am also a Rust newbie, so I could well be off the mark here.

Hi,

I've checked out and built LLVM, and set LLVM_ROOT and LLVM_BUILD_ROOT, essentially using the following abbreviated steps:

$ pwd
/Users/ntaylor/code
$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm_project; mkdir build; cd build
$ cmake -DLLDB_INCLUDE_TESTS=OFF -DLLVM_ENABLE_PROJECTS="clang;lldb" -G "Unix Makefiles" ../llvm`
...
$ export LLVM_ROOT=~/code/llvm-project
$ export LLVM_BUILD_ROOT=~/code/llvm-project/build

However, I get the following lldb-sys build error:

$ cargo build
   Compiling lldb-sys v0.0.27
   Compiling libc v0.2.107
The following warnings were emitted during compilation:

warning: In file included from src/lldb/UnityBuild.cpp:1:
warning: src/lldb/Bindings/SBAddressBinding.cpp:10:10: fatal error: 'lldb/API/LLDB.h' file not found
warning: #include "lldb/API/LLDB.h"
warning:          ^~~~~~~~~~~~~~~~~
warning: 1 error generated.

error: failed to run custom build command for `lldb-sys v0.0.27`

A quick glance at where that header lives:

$ pwd
/Users/ntaylor/code/llvm-project
$ find . -name 'LLDB.h'
./lldb/include/lldb/API/LLDB.h
$

Not a problem to fix simply by copying that directory tree into my `build/ directory...

$ cp -r lldb/include/lldb build/include
$ find . -name 'LLDB.h'
./lldb/include/lldb/API/LLDB.h
./build/include/lldb/API/LLDB.h
$ cargo build
   Compiling lldb-sys v0.0.27
   Compiling lldb v0.0.10
   Compiling ivydb v0.1.0 (/Users/ntaylor/code/ivydb)
    Finished dev [unoptimized + debuginfo] target(s) in 1.43s

I wonder whether $LLVM_ROOT/build/include should be passed to rustc to search for headers?

Thanks!

Cannot build on Ubuntu 20.10

System info

> lsb_release -a
Distributor ID:	Pop
Description:	Pop!_OS 20.10
Release:	20.10
Codename:	groovy
> uname -a
Linux daniel-darter 5.11.0-7614-generic #15~1618626693~20.10~ecb25cd-Ubuntu SMP Thu Apr 22 16:00:45 UTC  x86_64 x86_64 x86_64 GNU/Linux
> llvm-config --version
11.0.0

Reproduced on lldb-sys.rs HEAD, v0.0.21, and v0.0.20. Didn't check older.

To reproduce

> gh repo clone endoli/lldb-sys.rs
> cd lldb-sys.rs
> cargo build

The error

src/lldb/Bindings/SBCommandInterpreterBinding.cpp: In function ‘SBCommandInterpreterRunOptionsOpaque* CreateSBCommandInterpreterRunOptions()’:
  src/lldb/Bindings/SBCommandInterpreterBinding.cpp:22:99: error: invalid use of incomplete type ‘class lldb::SBCommandInterpreterRunOptions’
     22 |     return reinterpret_cast<SBCommandInterpreterRunOptionsRef>(new SBCommandInterpreterRunOptions());
        |                                                                                                   ^
  In file included from /usr/lib/llvm-11/include/lldb/API/SBBreakpoint.h:12,
                   from src/lldb/Bindings/SBBreakpointBinding.h:15,
                   from src/lldb/Bindings/LLDBBinding.h:21,
                   from src/lldb/Bindings/SBCommandInterpreterBinding.cpp:10:

(full stderr)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.